## Solving an ODE with eulers formula.

If I have $y''+y'+2y=sin(x)+cos(x)$
can I just say $y=Ae^{ix}$
and then find y' and y'' and then plug them in and solve for A.
so I get that $A= \frac{1}{1+i}$
then i multiply and divided by the complex conjugate.
then I back substitute in Eulers formula.
now since I have my original equation has both a real and an imaginary part.
when I multiply out A times Eulers formula, I will take both real and imaginary parts.
and I get that y=sin(x) and tested this and it works.
But is what i did with Eulers formula ok.
 PhysOrg.com science news on PhysOrg.com >> City-life changes blackbird personalities, study shows>> Origins of 'The Hoff' crab revealed (w/ Video)>> Older males make better fathers: Mature male beetles work harder, care less about female infidelity

Blog Entries: 27
Recognitions:
Gold Member
Homework Help
hi cragar!
 Quote by cragar If I have $y''+y'+2y=sin(x)+cos(x)$ can I just say $y=Ae^{ix}$
not really

for a particular solution for an RHS of sinx + cosx, you should use Aeix + Be-ix

(or Ccosx + Dsinx)
in this case, you're lucky that B = 0
(but don't do it again! )
 if i substitute what you said. Do I take the real or imaginary part in the end. Or do I just take it all.

Blog Entries: 27
Recognitions:
Gold Member
Homework Help