Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 5 down vote accepted

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 *)
share|improve this answer
This indeed works, thank you. – Weather Report May 8 '14 at 17:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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