# Transforming complex exponentials into sin and cos: sincos exp2trig

### 5.23.13 Transforming complex exponentials into sin and cos: sincos exp2trig

The sincos command uses the identity

ei x=cos(x) + isin(x)

to rewrite complex exponentials in terms of sine and cosine.
exp2trig is a synonym for sincos.

- sincos takes one argument:
  expr, an expression containing complex exponentials.
- sincos(expr) rewrites expr in terms of sin and cos.

#### Examples.

- Input:
  sincos(exp(i*x))
  Output:

  cosx+i sinx

- Input:
  exp2trig(exp(-i*x))
  Output:

  cosx−i sinx

- Input:
  simplify(sincos(((i)*(exp((i)*x))^2-i)/(2*exp((i)*x))))
  or:
  simplify(exp2trig(((i)*(exp((i)*x))^2-i)/(2*exp((i)*x))))
  Output:

  −sinx