Results 1 to 4 of 4

Math Help - Numerical ODE question

  1. #1
    Junior Member
    Joined
    Jan 2011
    Posts
    40

    Numerical ODE question

    hi, I'm wondering how to find the approximate solution of
    dy/dx= e^x y y(0)=1

    at x = 0.1 using the Taylor Series method. The expansion should include the
    first four non-zero terms. Work to six decimal places accuracy.

    Here is what I did but I am unsure which one is correct :
    first attempt:
    y'=e^x y y'(0)=1
    y''=e^x y' y''(0)=1
    y'''=e^x y'' y'''(0)=1
    sub them into Taylor series method:
    y(x0+h)=y(0+0.1)=y(0.1)= 1+h+h^2 /2 + h^3 /6

    second attempt:
    used product rule to differentiate:
    y''=e^x y' + e^x y y''(0)=1+1=2
    y'''=e^x y'' + e^x y' + e^x y' +e^x y y'''(0)=2+1+1+1=5
    sub them into Taylor:
    y(0.1)=1+1*0.1+ 2*(0.1)^2 /2 + 5*(0.1)^3 /6

    thank you
    Last edited by hazeleyes; March 30th 2011 at 02:46 PM.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Senior Member Sambit's Avatar
    Joined
    Oct 2010
    Posts
    355
     \frac{dy}{dx}= e^xy

    =>  \frac{dy}{y}=e^xdx

    Integrating, we have

    =>  ln (y)=e^x+c ( c is a constant)

    Now from the condition y(0)=1, c comes out to be -1

    So y=e^{e^x-1}

    Why are you using Taylor's method?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Junior Member
    Joined
    Jan 2011
    Posts
    40
    because the question is from numerical methods class. cheers
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Behold, the power of SARDINES!
    TheEmptySet's Avatar
    Joined
    Feb 2008
    From
    Yuma, AZ, USA
    Posts
    3,764
    Thanks
    78
    Quote Originally Posted by hazeleyes View Post
    hi, I'm wondering how to find the approximate solution of
    dy/dx= e^x y y(0)=1

    at x = 0.1 using the Taylor Series method. The expansion should include the
    first four non-zero terms. Work to six decimal places accuracy.

    Here is what I did but I am unsure which one is correct :
    first attempt:
    y'=e^x y y'(0)=1
    y''=e^x y' y''(0)=1
    y'''=e^x y'' y'''(0)=1
    sub them into Taylor series method:
    y(x0+h)=y(0+0.1)=y(0.1)= 1+h+h^2 /2 + h^3 /6

    second attempt:
    used product rule to differentiate:
    y''=e^x y' + e^x y y''(0)=1+1=2
    y'''=e^x y'' + e^x y' + e^x y' +e^x y y'''(0)=2+1+1+1=5
    sub them into Taylor:
    y(0.1)=1+1*0.1+ 2*(0.1)^2 /2 + 5*(0.1)^3 /6

    thank you
    Because of the fact that the initial data is given at 0 your first method is the best idea. so you know that

    y(0)=1
    y'=e^{x}y(x) \implies y'(0)=e^{0}y(0)=1
    y''='e^{x}y(x)+e^{x}y'(x) \implies y''(0)=2

    Note in general if you nave two functions (and in your cases  n \ge 2)

    General Leibniz rule - Wikipedia, the free encyclopedia

    you get that
    \displaystyle \frac{d^n}{dx^n}=y^{(n)}(x)=\sum_{k=0}^{n-1}\binom{n-1}{k}\left( \frac{d^k}{dx^k}y \right) \left( \frac{d^{n-1-k}}{dx^{n-1-k}}e^{x}\right)=\sum_{k=0}^{n-1}\binom{n-1}{k}e^{x}y^{k}

    Putting this together you get that the value of the nth derivative is
    (The n-1 comes from the fact we didn't need to use the product rule to take the first derivative it was given by the ODE)
    \displaystyle y^{n}(0)=\sum_{k=0}^{n-1}\binom{n-1}{k}y^{k}(0)

    You can use this to get as many terms as you need the series look like this

    After cranking out a few terms I get that the series looks like

    y=1+x+x^2+\frac{5}{6}x^3+\frac{5}{8}x^4+\frac{13}{  30}x^5

    Now use Taylors remainder theorem to show the error bound is where you want it.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. numerical analisys question..
    Posted in the Differential Geometry Forum
    Replies: 2
    Last Post: May 29th 2010, 03:31 AM
  2. numerical analysis question..
    Posted in the Discrete Math Forum
    Replies: 3
    Last Post: April 10th 2010, 03:36 AM
  3. numerical analysis question
    Posted in the Discrete Math Forum
    Replies: 5
    Last Post: April 6th 2010, 04:50 AM
  4. Need Help in this Numerical Methods question
    Posted in the Calculus Forum
    Replies: 5
    Last Post: January 12th 2009, 12:47 AM
  5. Need Help in this Numerical Methods question
    Posted in the Algebra Forum
    Replies: 3
    Last Post: January 10th 2009, 10:19 PM

Search Tags


/mathhelpforum @mathhelpforum