# Taking derivative of Euler relation [closed]

I have defined the following function, which is the Euler relation for $\cos\,x$.

f[x_] := 1/2*(Exp[I*k*x] + Exp[-I*k*x ] )


I want to take the derivative with respect to x, but I am not getting the "right" answer. How do I do this?

-
"I am not getting the "right" answer." - what then were you expecting? –  Ｊ. Ｍ. May 12 at 17:14
I'm getting a long dump of answers when i type f[x]'. I expect to get each exponential multiplied by i*k. I –  olliepower May 12 at 17:16
Really? The output of D[(Exp[I k x] + Exp[-I k x])/2, x] sure looks reasonable to me. –  Ｊ. Ｍ. May 12 at 17:18
you mean f'[x]? –  Spawn1701D May 12 at 17:20
Since your problem is a simple syntax error I'm voting to close. –  Sjoerd C. de Vries May 12 at 17:53

## closed as too localized by Sjoerd C. de Vries, Szabolcs, m_goldberg, rm -rf♦May 12 at 20:21

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

I'm not sure what you're looking for in a 'right' answer, but here are some ways to take (and view) the derivative of your function:

f'[x]
D[f[x], x]

or try ExpToTrig[D[f[x], x]] to see what it really is. –  bill s May 12 at 17:45