Question: What's going on ?

Consider the expression below.

r:=1/2 * exp(I*k*theta - 1/2*k^2*sigma^2)* sigma*sqrt(2*Pi) + 1/2 * exp(-I*k*theta - 1/2*k^2*sigma^2)* sigma*sqrt(2*Pi);       -------(1)

BY HAND I can factor out the sigma square root of 2 pi and one of the exponents to give.

sigma * sqrt(2*Pi) * exp(-1/2*k^2*sigma^2) *[(1/2)*(exp(I*k*theta) + exp(-I*k*theta) )] ;     -----(2)

 

when I simplify this expression (2) BY HAND I can write.

 

sigma * sqrt(2*Pi) * exp(-1/2*k^2*sigma^2) * cos(k*theta);  --------(3)

and in fact when I simplify expression (2) in Maple, Maple ALSO gives me expression (3) which is what I want. So my question is how do I go from expression (1) to expression (3) in Maple. How do I get Maple to simplify (1) to (3) ? Without having to manually enter any intermediary simlifications.

Please Wait...