Linearizing a trigonometric expression: tlin

### 5.23.2 Linearizing a trigonometric expression: tlin

The tlin command linearizes products and integer powers of the trigonometric functions (e.g. in terms of sin(n*x) and cos(n*x)).

- tlin takes one argument:
  expr, an expression containing trigonometric functions.
- tlin(expr) returns the expression with the trigonometric functions linearized.

#### Examples

- Linearize cos(x)*cos(y).
  Input:
  tlin(cos(x)*cos(y))
  Output:

  cos | ⎛ ⎝ | x−y | ⎞ ⎠
  2
  | + |
  cos | ⎛ ⎝ | x+y | ⎞ ⎠
  2

- Linearize cos(x)3.
  Input:
  tlin(cos(x)^3)
  Output:

  3
  4
  | cosx+ |
  cos | ⎛ ⎝ | 3 x | ⎞ ⎠
  4

- Linearize 4cos(x)2−2.
  Input:
  tlin(4*cos(x)^2-2)
  Output:

  2 cos | ⎛ ⎝ | 2 x | ⎞ ⎠