Results 1 to 3 of 3

Math Help - Euler's Method Approximation

  1. #1
    Member
    Joined
    Jan 2011
    Posts
    87

    Euler's Method Approximation

    Hey all,
    I have the IVP \frac{dy}{dt} = y + t^2, y(0) = -1
    Using Euler's method with a step size h = 1, I want to compute the solution to the
    IVP at final time t = 3.

    I have done the following:
    first step:
    y_0 = -1, t_0 = 0, h = 1
    f(t_0,y_0) = -1 * 0^2 = -1
    y_1 = y_0 + h*f(t_0,y_0)
    = -1 + 1 * -1 = -2

    second step:
    y_1 = -2, t_1 = 1, h = 1
    f(t_1,y_1) = -2 * 1^2 = -1
    y_2 = y_1 + h*f(t_1,y_1)
    = -2 + 1 * -1 = -3

    third step:
    y_2 = -3, t_2 = 2, h = 1
    f(t_2,y_2) = -1 * 2^2 = 1
    y_3 = y_2 + h*f(t_2,y_2)
    = -3 + 1 * 1 = -2

    I have solved the Linear DE and got y = e^t-t^2-2t-2
    which when t=3, y = e^{(3)}-(3)^2-2(3)-2 = 3.0855. But Euler's method approximates the third step to be -2.
    Have I done something wrong in my working ? or is it just that this model is not appropriate for this IVP. Thanks
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Prove It's Avatar
    Joined
    Aug 2008
    Posts
    11,547
    Thanks
    1418
    Quote Originally Posted by Oiler View Post
    Hey all,
    I have the IVP \frac{dy}{dt} = y + t^2, y(0) = -1
    Using Euler's method with a step size h = 1, I want to compute the solution to the
    IVP at final time t = 3.

    I have done the following:
    first step:
    y_0 = -1, t_0 = 0, h = 1
    f(t_0,y_0) = -1 * 0^2 = -1 I assume this should be -1 + 0^2
    y_1 = y_0 + h*f(t_0,y_0)
    = -1 + 1 * -1 = -2

    second step:
    y_1 = -2, t_1 = 1, h = 1
    f(t_1,y_1) = -2 * 1^2 = -1 I assume this should be -2 + 1^2
    y_2 = y_1 + h*f(t_1,y_1)
    = -2 + 1 * -1 = -3

    third step:
    y_2 = -3, t_2 = 2, h = 1
    f(t_2,y_2) = -1 * 2^2 = 1 I assume this should be -1 + 2^2 = 3
    y_3 = y_2 + h*f(t_2,y_2)
    = -3 + 1 * 1 = -2

    I have solved the Linear DE and got y = e^t-t^2-2t-2
    which when t=3, y = e^{(3)}-(3)^2-2(3)-2 = 3.0855. But Euler's method approximates the third step to be -2.
    Have I done something wrong in my working ? or is it just that this model is not appropriate for this IVP. Thanks
    See the red alterations...
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Member
    Joined
    Jan 2011
    Posts
    87
    Oops had the correct work on paper.. Thanks Prove IT. Also It should be f(t_2,y_2) = -3 + 2^2 = 1 for the last part.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Euler method vs RK4
    Posted in the Differential Equations Forum
    Replies: 2
    Last Post: January 7th 2010, 02:21 PM
  2. Euler's Method
    Posted in the Differential Equations Forum
    Replies: 2
    Last Post: November 9th 2009, 07:20 AM
  3. Euler's method
    Posted in the Differential Equations Forum
    Replies: 1
    Last Post: October 4th 2009, 05:05 PM
  4. Euler Approximation
    Posted in the Calculus Forum
    Replies: 1
    Last Post: December 13th 2008, 01:41 AM
  5. euler's method
    Posted in the Calculus Forum
    Replies: 1
    Last Post: April 22nd 2008, 02:37 AM

Search Tags


/mathhelpforum @mathhelpforum