I have an expression
expr = 1/2 a E^(-3 I ω t) (E^(3 I ω t)+2 Cos[π x/a]) (1+2 E^(3 I ω t) Cos[π x/a]) Sin[π x/a]^2;
expr // TeXForm
$\frac{1}{2} a e^{-3 i t \omega } \sin ^2\left(\frac{\pi x}{a}\right) \left(2 \cos \left(\frac{\pi x}{a}\right)+e^{3 i t \omega }\right) \left(1+2 e^{3 i t \omega } \cos \left(\frac{\pi x}{a}\right)\right)$
It is in complex exponential form, and I need it in trigonometric form. How do I do this? I see that in the Wolfram Language (https://reference.wolfram.com/language/guide/ComplexNumbers.html) there is a function for it, but I do not seem to be able to use that, for when I enter it as an argument, nothing changes. I am using Mathematica 11.3. How would I go about getting this into trigonometric form?
Pi x
and notPix
and same forIwt
try withI w t
. There is also a function callTrigToExp
you can try. SPACE is important in Mathematica, unlike in Latex (most of the time). SoPix
is not the same asPi x
which internally becomesPi*x
. I actually prefer to write explicit*
and not use SPACE. For me, it is more clear and also this way I do not make the same mistake as you did by accident. $\endgroup$