Linearizing a trigonometric expression

### 9.2.2 Linearizing a trigonometric expression

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 expr, an expression containing trigonometric functions.
- tlin(expr) returns the expression with the trigonometric functions linearized.

#### Examples

Linearize cos(x) cos(y).

tlin(cos(x)*cos(y))

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

Linearize cos(x)3.

tlin(cos(x)^3)

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

Linearize 4cos(x)2−2.

tlin(4*cos(x)^2-2)

2 cos | ⎛ ⎝ | 2 x | ⎞ ⎠