1. Not finding help here? Sign up for a free 30min 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!

Series solution for ode by undetermined coefficients

  1. Nov 5, 2009 #1
    1. The problem statement, all variables and given/known data
    Obtain the Taylor series solution up to and including order 3 of the following non linear ode
    [tex]
    y'=x^2+\sin y,y(0)=\frac{\pi}{2}
    [/tex]

    2. Relevant equations
    After substituting the power series form of sin(y) I get:
    [tex]
    y'=x^2+(y-\frac{y^3}{3!}+\frac{y^5}{5!}-\frac{y^7}{7!}.....)
    [/tex]


    3. The attempt at a solution
    We require a series solution of the form:
    [tex]
    y=a_0+a_1x+a_2x^2+a_3x^3+a_4x^4+....
    [/tex]
    Then
    [tex]
    y'=a_1+2a_2x+3a_3x^2+4a_4x^3+...
    [/tex]
    Substituting y and y' in the ode and equating coefficients of like powers of x gives:
    [tex]
    a_1=a_0-\frac{a_0^3}{6}
    [/tex]
    [tex]
    2a_2=a_1-\frac{a_0^2a_1}{2}
    [/tex]
    [tex]
    3a_3=1+a_2-\frac{a_0a_1^2}{2}-\frac{a_2a_0^2}{2}
    [/tex]
    Then expressing all the a's in terms of a_0 and using :
    [tex]
    a_0=y(0)=\frac{\pi}{2}
    [/tex]
    I get a result completely different to the book answer and cannot see my error.
    BOOK ANSWER IS:
    [tex]
    y=\frac{\pi}{2}+x+\frac{1}{6}x^2+
    [/tex]
    1. The problem statement, all variables and given/known data



    2. Relevant equations



    3. The attempt at a solution
    1. The problem statement, all variables and given/known data



    2. Relevant equations



    3. The attempt at a solution
    1. The problem statement, all variables and given/known data



    2. Relevant equations



    3. The attempt at a solution
    1. The problem statement, all variables and given/known data



    2. Relevant equations



    3. The attempt at a solution
    1. The problem statement, all variables and given/known data



    2. Relevant equations



    3. The attempt at a solution
    1. The problem statement, all variables and given/known data



    2. Relevant equations



    3. The attempt at a solution
     
  2. jcsd
  3. Nov 5, 2009 #2
    Could it be that a_1 = sin a_0 instead and you just forgot infinite minus two terms from the expression? I don't get the book answer though, quickly glancing it would seem to me that a_2 = 0.
     
  4. Nov 5, 2009 #3
    Perhaps it should be [tex] \pi / 2 + x + x^3/6 [/tex] ?
     
  5. Nov 5, 2009 #4
    One more thing: it might be pretty hard to solve the way you are trying to. Instead you can be a bit tricky. You are given the initial condition for y(0). This allows you to determine a_0=y_0 instantly. Now it's easy to solve y'(0) from the DE, giving you again instantly a_1. Then you can simply differentiate the DE again, solving y''(0) and y'''(0) as well.
     
  6. Nov 5, 2009 #5
    Hi Clamtrox
    I believe my error is in expanding siny about y=0 instead of about y=pi/2.
    Regards
    John
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook