I have the following, probably very simple question. How can I get $\it{Mathematica}$ to power expand function $\cos(y+i \log(x))$ in powers of $x$? This function obeys a well defined Laurent expansion about $x=0$ and I would like $\it{Mathematica}$ to give $\frac1{x}e^{i y}/2+x e^{-iy}/2$ upon evaluation of

Series[Cos[y + I Log[x]], {x, 0, 1}]

However, the result is

Cos[y + I Log[x]]

i.e. the original expression. I can bet that in some circumstances such expansion worked without any effort from my side.

I wonder what is the right way to obtain the expansion of the function $\cos(y+i \log(x))$ in powers of $x$.

Any help is appreciated.


One way to get the desired output is to use TrigToExp

TrigToExp[Cos[y + I Log[x]]]
(* E^(I y)/(2 x) + 1/2 E^(-I y) x *)
  • $\begingroup$ This indeed works, thank you. $\endgroup$ – Weather Report May 8 '14 at 17:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.