Unfortunately, solve currently does not have that implemented.
In [66]: solve(cos(x), x)
Out[66]:
⎡π⎤
⎢─⎥
⎣2⎦
You could trick it into giving you the solutions you want by doing something like
In [67]: solve(cos(x - n*pi), x)
Out[67]:
⎡π + 2⋅π⋅n⎤
⎢─────────⎥
⎣ 2 ⎦
but that only works if you know ahead of time that the solutions are periodic with period n*pi.
But I think we should implement it in solve to be able to return the kind of solutions that you want.
Aaron Meurer
Part of the problem is that the user shouldn't have to know if multiple solutions (in terms of a parameter n)are necessary, so they shouldn't have to send in an auxiliary variable (n)...but then if the solution has such a parameter, it (being a dummy) is not easily accessible by the user. This is the place where the polys12 'pure' comes in. When you get a solution that has `pi/2 + pure*pi` you will know how to replace and manipulate `pure` as it will be a singleton...or something.
/c
h[2] >>> cos(2*x).rewrite(exp)
exp(-2*I*x)/2 + exp(2*I*x)/2
trigonometric functions in exp/ln expressions with Eulero formulas:
$cos(x)=\frac{e^{ix}+e^{-ix}}{2}$
$sin(x)=\frac{e^{ix}-e^{-ix}}{2i}$
with 'i' imaginary unit, and 'x' a real value (if I'm right, 'x' must
be real).