Results 1 to 11 of 11

Math Help - Taylor Series solution

  1. #1
    Newbie
    Joined
    Sep 2008
    Posts
    4

    Taylor Series solution

    Hi all,

    I have to solve y" = x/y where y'(0)=1 & y(0)=2 By Taylor series method to get the value of y at x=0.1 and x=0.5. Use terms through x^5 but am having trouble enough solving the ODE to begin with.

    Any ideas would be most appreciated!!

    Cheers
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by Watto81 View Post
    Hi all,

    I have to solve y" = x/y where y'(0)=1 & y(0)=2 By Taylor series method to get the value of y at x=0.1 and x=0.5. Use terms through x^5 but am having trouble enough solving the ODE to begin with.

    Any ideas would be most appreciated!!

    Cheers
    Put

    y(x)=a_0+a_1x+a_2x^2+a_3x^3+a_4x^4+a_5x^5 + ..

    and from the initial conditions you know that a_0=2,\ a_1=1.

    Then:

     <br />
(a_0+a_1x+a_2x^2+a_3x^3+a_4x^4+a_5x^5 + ..)(2a_2+6a_3x+12a_4x^2+20a_5x^3+..)=x<br />

    Expand the left hand side as far as the term in x^3 (that will give you all the coefficients you will need to solve for the coefficients up to and including a_5) and equate coefficients of like powers of x on both sides.

    RonL
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Sep 2008
    Posts
    4
    Thanks for the reply but you've lost me already. how does that solve the ODE?
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by Watto81 View Post
    Thanks for the reply but you've lost me already. how does that solve the ODE?
    You do not solve the ODE as such, you are working with a series solution which we suppose to be:

    y(x)=\sum_{j=0}^{\infty}a_jx^j

    Then we explore the consequences of our supposition that this satisfies the ODE, in this case we have:

    y(x)y''(x)=x

    We expand the product on the left using the assumed series, and then equate coefficients of like powers on both sides of this equation to solve for as many coefficients as we need.

    The initial conditions for the ODE provide us with starting values for the a's (that is a_0=y(0) , and a_1=y'(0) ).

    RonL
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Sep 2008
    Posts
    4
    Yeah i've been looking at this with some friends and we're gonna need it explained like we're 2 yr olds as we can't get our heads around it at all.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    MHF Contributor
    Joined
    Oct 2005
    From
    Earth
    Posts
    1,599
    Quote Originally Posted by Watto81 View Post
    Yeah i've been looking at this with some friends and we're gonna need it explained like we're 2 yr olds as we can't get our heads around it at all.
    I don't follow this completely, but the general idea is straightforward enough I think.

    Do you see that CaptainBlack just wrote a general Taylor expansion for y(x)? Then he took the second derivative for a few terms. You're D.E. says that yy''=x, so he multiplied these two series expansions. They are infinite expansions but you only need x^5 as your highest term, and when you multiply the LHS of course the powers will add so you really do not need that many terms.

    Does that part make sense? Writing y and y'' in terms of a general Taylor expansion.

    The only part I'm not seeing is when CB says after expanding the product on the LHS equating powers to get coefficients. Equating the product with what? Just x?
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by Jameson View Post
    I don't follow this completely, but the general idea is straightforward enough I think.

    Do you see that CaptainBlack just wrote a general Taylor expansion for y(x)? Then he took the second derivative for a few terms. You're D.E. says that yy''=x, so he multiplied these two series expansions. They are infinite expansions but you only need x^5 as your highest term, and when you multiply the LHS of course the powers will add so you really do not need that many terms.

    Does that part make sense? Writing y and y'' in terms of a general Taylor expansion.

    The only part I'm not seeing is when CB says after expanding the product on the LHS equating powers to get coefficients. Equating the product with what? Just x?
    The right hand side is also a power series which just happens to have only one non zero coefficient, so we are just equating coefficients of power series (in fact polynomials by that point).

    To be honest if I do much more of this problem I will have solved it for you, and that is not my intention.

    RonL
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by CaptainBlack View Post
    Put

    y(x)=a_0+a_1x+a_2x^2+a_3x^3+a_4x^4+a_5x^5 + ..

    and from the initial conditions you know that a_0=2,\ a_1=1.

    Then:

     <br />
(a_0+a_1x+a_2x^2+a_3x^3+a_4x^4+a_5x^5 + ..)(2a_2+6a_3x+12a_4x^2+20a_5x^3+..)=x<br />

    Expand the left hand side as far as the term in x^3 (that will give you all the coefficients you will need to solve for the coefficients up to and including a_5) and equate coefficients of like powers of x on both sides.

    RonL
     <br />
(2+x+a_2x^2+a_3x^3+a_4x^4+a_5x^5 + ..)(2a_2+6a_3x+12a_4x^2+20a_5x^3+..)=x<br />

    so:

    4a_2+x(12a_3+2a_2)+x^2(24a_4+6a_3+2a_2^2)+x^3(40a_  5+12a_4+8a_2a_3) + ..=x

    Hence equating the coefficients of corresponding powers of x on both sides of this; we have:

    4a_2=0

    12a_3+2a_2=1

    24a_4+6a_3+2a_2^2=0

    40a_5+12a_4+8a_2a_3=0

    which you solve for the a 's

    RonL

    (Check the algebra!)
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Newbie
    Joined
    Sep 2008
    Posts
    4
    So i've equated the co-efficients, are these the values for y"', y"" & y""'?
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by CaptainBlack View Post
     <br />
(2+x+a_2x^2+a_3x^3+a_4x^4+a_5x^5 + ..)(2a_2+6a_3x+12a_4x^2+20a_5x^3+..)=x<br />

    so:

    4a_2+x(12a_3+2a_2)+x^2(24a_4+6a_3+2a_2^2)+x^3(40a_  5+12a_4+8a_2a_3) + ..=x

    Hence equating the coefficients of corresponding powers of x on both sides of this; we have:

    4a_2=0

    12a_3+2a_2=1

    24a_4+6a_3+2a_2^2=0

    40a_5+12a_4+8a_2a_3=0

    which you solve for the a 's

    RonL

    (Check the algebra!)
    So we have a_2=0,\ a_3=1/12,\ a_4=-1/48,\ a_5=1/160, so we have:

     <br />
y(x)=2 + x + \frac{1}{12}x^3-\frac{1}{48}x^4+\frac{1}{160}x^5+..<br />

    so y(0.1)\approx 2.10008 and y(0.5) \approx 2.50931

    RonL

    (again check the algebra)
    Follow Math Help Forum on Facebook and Google+

  11. #11
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by Watto81 View Post
    So i've equated the co-efficients, are these the values for y"', y"" & y""'?
    No they are the coefficients of the corresponding powers of x in the power series expansion of y(x)

    RonL
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Getting stuck on series - can't develop Taylor series.
    Posted in the Differential Geometry Forum
    Replies: 6
    Last Post: October 5th 2010, 08:32 AM
  2. Replies: 1
    Last Post: September 30th 2010, 04:12 AM
  3. Taylor Series Solution
    Posted in the Differential Equations Forum
    Replies: 1
    Last Post: February 12th 2010, 05:43 AM
  4. Replies: 0
    Last Post: January 26th 2010, 08:06 AM
  5. Replies: 9
    Last Post: April 3rd 2008, 05:50 PM

Search Tags


/mathhelpforum @mathhelpforum