Linearize a trigonometric expression : tlin

### 5.24.3 Linearize a trigonometric expression : tlin

tlin takes as argument an expression containing trigonometric functions.
tlin linearizes products and integer powers of the trigonometric functions (e.g. in terms of sin(n*x) and cos(n*x))
Examples

- Linearize cos(x)*cos(y).
  Input :
  tlin(cos(x)*cos(y))
  Output :
  1/2*cos(x-y)+1/2*cos(x+y)
- Linearize cos(x)3.
  Input :
  tlin(cos(x)`^`3)
  Output :
  3/4*cos(x)+1/4*cos(3*x)
- Linearize 4cos(x)2−2.
  Input :
  tlin(4*cos(x)`^`2-2)
  Output :
  2*cos(2*x)