Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo

1

6.1B EULER’S METHOD

2

Euler’s method is a numerical approach to approximating the particular solution of the differential equation y’ = F(x,y) that passes through the point (x 0 , y 0 ). From the given information you know that the curve passes through the given point and has a slope of F(x 0 , y 0 ).  This gives you a starting point to approximate the solution. Using a small step “h”, move along the tangent line until you arrive at the point (x 1 , y 1 ) where x 1  = x 0  + h and y 1  = y 0  + h ∙ F(x 0 , y 0 ). At each new point, you will adjust your direction by putting in the point coordinates into F to get adjusted slope.  The values of x i  and y i  are shown x 1  = x 0  + h  y 1  = y 0  + h ∙ F(x 0 , y 0 ) x 2  = x 1  + h  y 2  = y 1  + h ∙ F(x 1 , y 1 ) x 3  = x 2  + h  y 3  = y 2  + h ∙ F(x 2 , y 2 ) .  . :  : x n  = x n-1  + h  y n  = y n-1  + h ∙ F(x n-1 , y n-1 ) To get a better approximation, use a smaller step “h”

3

Let’s see this in action! Ex 6, p. 408  Approximating a solution using Euler’s Method. Use Euler’s Method to approximate the particular solution of the differential equation y’ = x – y passing through the point (0,1) Solution:  Using step size h = 0.1, x 0  = 0 and y 0  = 1  x 1  = 0 + 0.1 =0.1  y 1  = 1 + 0.1 ∙ (0 – 1)=0.9 x 2  = 0.1 + 0.1=0.2  y 2  = 0.9 + 0.1 ∙ (0.1 – 0.9)=0.82 x 3  = 0.2 + 0.1=0.3  y 3  = 0.82 + 0.1 ∙ (0.2 – 0.82)=0.758 The note at the bottom of p. 408 gives the exact solution to be y = x – 1 + 2e -x Run your Euler’s program.  It will ask you to  input dy/dx (or y’) = x – y. Use the X,T key for X and alpha Y for Y.  Then it will ask for how many steps. It will ask for your first x and y.  Then what dx = (value for h).  Then it will plot.  If you don’t get the picture you are expecting, change window values. n 0 1 2 3 4 5 6 7 8 9 10 x n 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 y n 1 0.9 0.82 0.76 0.71 0.68 0.66 0.66 0.66 0.68 0.70

4

If you want to show your ordered pairs for the approximate curve, trace and hit the right arrow button.  The calculator will pop from point to point and you could write them down. Notice that the program turns on a plot.  To run the program again you will not have to do anything special.  To do any other kind of graphing, you will want to turn plot off.

5

6.1b p. 409/ 41-57 every other odd, 59, 69, 71

More Related Content

Calc 6.1b

  • 2. Euler’s method is a numerical approach to approximating the particular solution of the differential equation y’ = F(x,y) that passes through the point (x 0 , y 0 ). From the given information you know that the curve passes through the given point and has a slope of F(x 0 , y 0 ). This gives you a starting point to approximate the solution. Using a small step “h”, move along the tangent line until you arrive at the point (x 1 , y 1 ) where x 1 = x 0 + h and y 1 = y 0 + h ∙ F(x 0 , y 0 ). At each new point, you will adjust your direction by putting in the point coordinates into F to get adjusted slope. The values of x i and y i are shown x 1 = x 0 + h y 1 = y 0 + h ∙ F(x 0 , y 0 ) x 2 = x 1 + h y 2 = y 1 + h ∙ F(x 1 , y 1 ) x 3 = x 2 + h y 3 = y 2 + h ∙ F(x 2 , y 2 ) . . : : x n = x n-1 + h y n = y n-1 + h ∙ F(x n-1 , y n-1 ) To get a better approximation, use a smaller step “h”
  • 3. Let’s see this in action! Ex 6, p. 408 Approximating a solution using Euler’s Method. Use Euler’s Method to approximate the particular solution of the differential equation y’ = x – y passing through the point (0,1) Solution: Using step size h = 0.1, x 0 = 0 and y 0 = 1 x 1 = 0 + 0.1 =0.1 y 1 = 1 + 0.1 ∙ (0 – 1)=0.9 x 2 = 0.1 + 0.1=0.2 y 2 = 0.9 + 0.1 ∙ (0.1 – 0.9)=0.82 x 3 = 0.2 + 0.1=0.3 y 3 = 0.82 + 0.1 ∙ (0.2 – 0.82)=0.758 The note at the bottom of p. 408 gives the exact solution to be y = x – 1 + 2e -x Run your Euler’s program. It will ask you to input dy/dx (or y’) = x – y. Use the X,T key for X and alpha Y for Y. Then it will ask for how many steps. It will ask for your first x and y. Then what dx = (value for h). Then it will plot. If you don’t get the picture you are expecting, change window values. n 0 1 2 3 4 5 6 7 8 9 10 x n 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 y n 1 0.9 0.82 0.76 0.71 0.68 0.66 0.66 0.66 0.68 0.70
  • 4. If you want to show your ordered pairs for the approximate curve, trace and hit the right arrow button. The calculator will pop from point to point and you could write them down. Notice that the program turns on a plot. To run the program again you will not have to do anything special. To do any other kind of graphing, you will want to turn plot off.
  • 5. 6.1b p. 409/ 41-57 every other odd, 59, 69, 71