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 want to get a cosine from taking the real part of a complex exponential: $cos(x) = Re(exp(i x))$. What I do in Mathematica is

(1/2)*(Exp[x*I] + Conjugate[Exp[x*I]]) // TraditionalForm // FullSimplify

but this gives me 1/2 (E^(-I x^\[Conjugate]) + E^(I x)) instead of cos(x). Why is that?

share|improve this question
FullSimplify[(Exp[x*I] + Conjugate[Exp[x*I]])/2, x ∈ Reals] // TraditionalForm – J. M. Apr 29 '13 at 14:16
up vote 3 down vote accepted


(1/2)*(Exp[x*I] + Conjugate[Exp[x*I]])// ComplexExpand


Also note that TraditionalForm is a formatting tool mainly for displaying the formulas in a nice manner. After you have applied TraditionalForm on an expression other Mathematica built in functions (e.g FullSimplify) may have problem to deal with the expression as an input. Hence better to use TraditionalForm only for displaying expressions.

share|improve this answer

Another approach:

Simplify[ExpToTrig @ Re[E^(I x)], x ∈ Reals]


share|improve this answer


ComplexExpand[Exp[x*I]] /. I -> 0


share|improve this answer

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.