Solving a Nonhomogeneous 2nd Order ODE with Initial Conditions

  • Thread starter Thread starter nlsherrill
  • Start date Start date
  • Tags Tags
    2nd order
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 2K views
nlsherrill
Messages
320
Reaction score
1

Homework Statement



This was an example the teacher gave us to do in class. Unfortunately, I was a little behind on the notes so was not able to copy down the steps to solving this one. I did, however, get an answer

problem:

y'' + y = e^x + x^3, initial conditions y(0)=2, y'(0)=0


Homework Equations





The Attempt at a Solution



The answer my prof gave was y=(3/2)cos(x)+(11/2)sin(x)+(1/2)e^(x)+x^3-6x

I get how he got the complimentary part, but the particular solution I feel I am very close too, and may have just made some slightly wrong assumption as a 'trial' solution.

what I did for a trial to the particular solution was...

yp=Ae^x +Bx^3+Cx^2+Dx+E and set this equal too e^x + x^3.

I found the second derivative to be (Ae^x + 6Bx + 2c). So far I have:

(Ae^x + 6Bx + 2c) + (Ae^x +Bx^3+Cx^2+Dx+E) = e^x + x^3

I then gathered terms and solved for coefficients to get A=.5, B=1, C=0, D=-6, and E=0.

simplifying I ended up with e^x +x^3 = e^x +x^3... so I did something wrong somewhere I guess.

I understand everything except how my prof got (1/2)e^(x)+x^3-6x as the particular solution. I even got all the terms he listed as the particular solution, but some of them ended up canceling out so my particular I believe is wrong.
 
Physics news on Phys.org
nlsherrill said:

The Attempt at a Solution


I found the second derivative to be (Ae^x + 6Bx + 2c). So far I have:

(Ae^x + 6Bx + 2c) + (Ae^x +Bx^3+Cx^2+Dx+E) = e^x + x^3

I then gathered terms and solved for coefficients to get A=.5, B=1, C=0, D=-6, and E=0.

simplifying I ended up with e^x +x^3 = e^x +x^3... so I did something wrong somewhere I guess.

I understand everything except how my prof got (1/2)e^(x)+x^3-6x as the particular solution. I even got all the terms he listed as the particular solution, but some of them ended up canceling out so my particular I believe is wrong.

According to your PI, you should get yPI= (1/2)ex+x3-6x.

Which is correct.