1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Second order initial value problem

  1. May 30, 2009 #1
    1. The problem statement, all variables and given/known data
    Solve the initial value problem y" = 2x - y' , y'(0) = 1 , y(0) = 0

    I know this is probably a simple problem but I don't have a book for the class yet and the teacher didn't really cover this material in class but we still have homework due on monday so i need to figure this out. Thanks in advance for any help you can provide.
  2. jcsd
  3. May 30, 2009 #2


    User Avatar
    Homework Helper

    Typically solved by finding a particular solution and a homogeneous solution.

    The homogeneous problem is [itex]y''(x)+y'(x)=0[/itex]. After you have solved this equation you can easily guess another solution that fits the original equation [itex]y''(x)+y'(x)=2x[/itex].

    Do you know how to solve the homogeneous differential equation?
  4. May 30, 2009 #3
    put the y terms on the left


    find the complementary function


    form the quadratic

    k^2 + k = 0

    solve it

    k = -1 or 0

    the complementary function is:

    y = Ae^(-x) + B

    Find the particular integral

    P(x)= ax^2 + bx + c

    P'(x)= ax + b

    P''(x)= a

    P''(x) + P'(x) = 2x

    a + ax + b = 2x

    a = 2 b = -2

    P(x)= 2x^2 - 2x

    Add the complementary function and the particular integral to give the general solution

    y(x)= Ae^(-x) + 2x^2 - 2x + B


    y'(x)= -Ae^(-x) + 2/3 x^3 -2

    plug in the initial values to find A and B

    A + B = 0
    -A -2 = 1

    A = -3
    B = 3

    And voila

    y(x)= -3e^-x + 2x^2 - 2x + 3

    Please note that I didn't stop to check my answer so plug it in and see if it fits.

    That was probably fairly confusing but these are actually quite easy. I started studying these, amongst other things, on Thursday and on Monday I have an exam, so I hope I understand them.
  5. May 30, 2009 #4


    User Avatar
    Homework Helper

    The idea isn't to just do the entire calculation for someone, but to assist with the steps leading up to the answer so they actually learn something.

    Furthermore if you do an entire calculation for someone at least check if you haven't made any mistakes.

    This is wrong.
  6. May 30, 2009 #5
    i put it in my ti-89 and came up with y = -3e^-x + x^2 - 2x + 3

    it would help for somebody to give an example (preferably the actual problem i'm working on)

    what gwillim did would've helped out alot if it'd been right... i'm not asking for the answer ... i just need to know how to work the problem
  7. May 30, 2009 #6

    Okay I'll be watching this thread
  8. May 30, 2009 #7


    User Avatar
    Homework Helper

    We can work through this problem together if you'd like. But first do you know how to solve a homogeneous equation? Are you familiar with the terms homogeneous and particular solution?

    Gwilim you almost did everything right apart from saying that d/dx ax^2=ax instead of 2ax. This results in you being a factor two off.
  9. May 30, 2009 #8
    no not really.... not in terms of what that would mean for the problem i'm working on
  10. May 30, 2009 #9
    all we've covered in class is first order
  11. May 30, 2009 #10
    Oh wow, thanks for pointing that out!
  12. May 30, 2009 #11


    User Avatar
    Homework Helper

    Well lets start at the start then.

    If we have a second order differential equation of the form [itex]ay''(x)+by'(x)+cy=f(x)[/itex] with a,b and c constants then we call this an inhomogeneous second order linear differential equation. The homogeneous linear differential equation is then given by [itex]ay''(x)+by'(x)+cy=0[/itex]. We would like to solve the homogeneous problem first.

    To solve [itex]ay''(x)+by'(x)+cy=0[/itex] we use a trial function [itex]e^{kx}[/itex]. Now plug this equation into the homogeneous differential equation and find the constraints on k.
  13. May 30, 2009 #12
    Then this is a couple of steps more advanced than what you've been prepared for.

    If you have a homogenous equation of the form ay'' + by' + cy = 0 you form a characteristic equation, which is a quadratic of the form ak^2 + bk + c = 0.

    The form the solution takes depends on whether you have distinct real roots, repeated roots or complex roots.

    for distinct real roots you have

    y(x) = Ae^k1x + Be^k2x

    where k1 and k2 are the solutions of the characteristic equation

    for a repeated root you have

    y(x) = Ae^kx + Bxe^kx

    where k is the solution of the characteristic equation

    for complex roots you have

    y(x) = e^px(Asin(wx) + Bcos(wx))

    where p is the real part of the root and w is the positive imaginary part
  14. May 30, 2009 #13


    User Avatar
    Science Advisor

    If all you have covered in class is first order equations, let u= y'. Then the equation becomes u'+ u= 2x. That is a linear first order equation for u. Go ahead and use the condition y'(0)= u(0)= 1 to find the constant of integration. Then just integrate u to find y. Use the condition y(0)= 0 to find the new constant of integration.
  15. May 31, 2009 #14
    can i just integrate the whole equation with respect to x so that:

    y'=x2 - y + C

    plug in values and

    C=1 so that

    y' + y = x2 + 1

    I(x) = e(integral of 1 dx) = ex

    (e^x)y = [tex]\int[/tex](x2+1)ex dx = (x2 - 2x + 3)ex + C

    y = -3e-x + x2 - 2x + 3
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook