Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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
add comment

1 Answer 1

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 at 17:25
add comment

Your Answer

 
discard

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.