Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Differential Equations' topicStudent Support Forum > General > "Differential Equations"

< Previous CommentHelp | Reply To Comment | Reply To Topic
Author Comment/Response
Peter
10/01/06 06:14am

Hi,

the function TrigToExp does this for you:

In[1]:=
sol = y[x] /. First[DSolve[Derivative[2][y][x] + k^2*y[x] == 0, y[x], x]]
Out[1]=
C[1]*Cos[k*x] + C[2]*Sin[k*x]
In[2]:=
Collect[TrigToExp[sol], Exp[_], Simplify]
Out[2]=
(1/2)*E^(I*k*x)*(C[1] - I*C[2]) + ((1/2)*(C[1] + I*C[2]))/E^(I*k*x)

Peter


URL: ,

Subject (listing for 'Differential Equations')
Author Date Posted
Differential Equations Balu 09/29/06 09:43am
Re: Differential Equations Peter 10/01/06 06:14am
< Previous CommentHelp | Reply To Comment | Reply To Topic