Results 1 to 3 of 3

Math Help - Numerical solution of differential equations (Euler method)

  1. #1
    Newbie
    Joined
    May 2008
    Posts
    11

    Numerical solution of differential equations (Euler method)

    Hello. I'm having problems with solving a pretty straight forward differential equation by using Euler's method.

    Exercise 1:
    Solve x' = 1 + x^2 where x(0)=1.
    Answer 1: This exercise is not the problem (I think). Anyway, the answer is:

    x(t) = \tan{(t+\frac{\pi}{4})}\Rightarrow x' = 1 + (\tan{(t+\frac{\pi}{4})})^2.

    Exercise 2: Solve the differential equation numerically on the interval [0,0.6] with Euler's method using 6 steps.
    Answer 2: I have tried to use x_n = x_{n-1} + h*(1 + x_{n-1}^2) where h=0.1 \land x_0=1, but it doesn't make any sense. The "exact" values for x'(t) are

    x'(0.0) = 2, x'(0.1) = 2,4958... , x'(0.2)=3,2755... etc.

    When I use "my method" the numbers are totally different from them above. Can anyone explain what I do wrong? I must have misunderstand something...
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor

    Joined
    Apr 2005
    Posts
    15,579
    Thanks
    1418
    Quote Originally Posted by kjey View Post
    Hello. I'm having problems with solving a pretty straight forward differential equation by using Euler's method.

    Exercise 1:
    Solve x' = 1 + x^2 where x(0)=1.
    Answer 1: This exercise is not the problem (I think). Anyway, the answer is:

    x(t) = \tan{(t+\frac{\pi}{4})}\Rightarrow x' = 1 + (\tan{(t+\frac{\pi}{4})})^2.

    Exercise 2: Solve the differential equation numerically on the interval [0,0.6] with Euler's method using 6 steps.
    Answer 2: I have tried to use x_n = x_{n-1} + h*(1 + x_{n-1}^2) where h=0.1 \land x_0=1, but it doesn't make any sense. The "exact" values for x'(t) are

    x'(0.0) = 2, x'(0.1) = 2,4958... , x'(0.2)=3,2755... etc.

    When I use "my method" the numbers are totally different from them above. Can anyone explain what I do wrong? I must have misunderstand something...
    Since you haven't shown what you did, no, no one can tell what you did wrong!
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    May 2008
    Posts
    11
    Hehe, good point. Sorry about that. Ok, I use the formula

    x_n =  x_{n-1} + h*f(x,y) = x_{n-1} + h*(1 + x_{n-1}^2).

    I get

    x_1 = x_0 + h*(1 + x_{0}^2) = 1 + 0.1*(1 + 1^2) = 1.2 and so on.

    My point is that I have never solved an exercise with Euler's method before, so I'm wondering if anyone could explain how I can use Euler's method in this one case - maby I will understand much more then.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 2
    Last Post: March 12th 2012, 01:25 AM
  2. Replies: 1
    Last Post: November 23rd 2009, 11:40 PM
  3. Replies: 0
    Last Post: October 27th 2008, 06:34 PM
  4. Replies: 2
    Last Post: October 12th 2008, 04:33 AM
  5. Numerical Approximatin: Euler's Method
    Posted in the Calculus Forum
    Replies: 3
    Last Post: July 20th 2007, 10:17 AM

Search Tags


/mathhelpforum @mathhelpforum