# Convert imaginary exponentials to goniometric expressions?

Can I force Mathematica to re-express something like $$\small \left\{\frac{1}{2}i\left(\frac{1}{16} e^{-2 i (\alpha (1)+4 \alpha (2))} \left(-1+e^{8 i \alpha (2)}\right) \text{d\alpha }(1) \left(2 \left(2 e^{2 i \alpha (2)}-2 e^{6 i \alpha (2)}+e^{8 i \alpha (2)}+1\right) \cos (\alpha (4))+e^{4 i \alpha (2)} (\cos (2 \alpha (4))+3)\right)\right.\right.$$ as an expression with solely goniometric functions instead of these imaginary exponentials?

1/2 I (1/16 E^(-2 I (α[1] + 4 α[2])) (-1 + E^(
8 I α[
2])) (2 (1 + 2 E^(2 I α[2]) - 2 E^(6 I α[2]) +
E^(8 I α[2])) Cos[α[4]] +
E^(4 I α[2]) (3 + Cos[2 α[4]])) dα[1]

• Including Mathematica code for this expression may help you get an answer sooner. – Mr.Wizard Oct 25 '14 at 11:04

You have a missing closing bracket, I think.
Adding that, and applying %//ExpToTrig//FullSimplify gives:

$$-\frac{1}{16} e^{-2 i \alpha (1)} \text{d\alpha }(1) \sin (4 \alpha (2)) (\cos (2 \alpha (4))+4 \cos (\alpha (4)) (\cos (4 \alpha (2))-2 i \sin (2 \alpha (2)))+3)$$
Remark that the FullSimplify puts a little exponential back in.

exp = 1/2 I (1/
16 E^(-2 I (α[1] + 4 α[2])) (-1 +
E^(8 I α[2])) (2 (1 + 2 E^(2 I α[2]) -
2 E^(6 I α[2]) + E^(8 I α[2])) Cos[α[
4]] + E^(4 I α[2]) (3 + Cos[2 α[4]])) )


You can:

cm = ComplexExpand[ExpToTrig[FullSimplify@ExpToTrig[Expand[exp]]]];
re = FullSimplify[
Refine[Re[
cm], {α[1] ∈ Reals, α[2] ∈
Reals, α[3] ∈ Reals, α[4] ∈
Reals}]];
im = FullSimplify[
Refine[Im[
cm], {α[1] ∈ Reals, α[2] ∈
Reals, α[3] ∈ Reals, α[4] ∈
Reals}]];
re + I im


yields:

1/16 I ((3 + 4 Cos[4 α[2]] Cos[α[4]] +
Cos[2 α[4]]) Sin[2 α[1]] +
8 Cos[2 α[1]] Cos[α[4]] Sin[2 α[2]]) Sin[
4 α[2]] -
1/16 (Cos[
2 α[1]] (3 + 4 Cos[4 α[2]] Cos[α[4]] +
Cos[2 α[4]]) -
8 Cos[α[4]] Sin[2 α[1]] Sin[2 α[2]]) Sin[
4 α[2]]


but may be a starting point