Lesson 9-2

13
Lesson 9-2 Direction (Slope) Fields and Euler’s Method

description

Lesson 9-2. Direction (Slope) Fields and Euler’s Method. Solutions to Differential Equations. The solution to a differential equation is a function and it may be general or particular (given an initial condition) There are 3 ways to solve a differential equation: - PowerPoint PPT Presentation

Transcript of Lesson 9-2

Page 1: Lesson 9-2

Lesson 9-2

Direction (Slope) Fieldsand

Euler’s Method

Page 2: Lesson 9-2

Solutions to Differential Equations

The solution to a differential equation is a function and it may be general or particular (given an initial condition)

•There are 3 ways to solve a differential equation:

– Analytically (Separate & Integrate)

– Graphically (with Slope Fields)

– Numerically (with Euler’s Method)

Page 3: Lesson 9-2

Direction or Slope Field

The directional field allows us to visualize the general shape of the solution curves by indicating the direction (the slope at that point) in which the curves proceed at each point.

We draw the curve, given an initial condition, so that it is parallel to the nearby line segments (slopes in the field)

Page 4: Lesson 9-2

y

x

f(0) = -2

Slope Field Example

Page 5: Lesson 9-2

Example 1

Given:

dy -xy²---- = -------- with f(-1) = 2dx 2

Graph the slope field at the twelve indicated points

Page 6: Lesson 9-2

Example 2

Given:

dy -2x---- = -------- with f(1) = -1dx y

Graph the slope field at the twelve indicated points

Page 7: Lesson 9-2

Example 3

Given:

dy ---- = x4(y – 2) with f(0) = 0dx

Graph the slope field at the twelve indicated points

Page 8: Lesson 9-2

Example 4

Given:

dy ---- = x2(y – 2) with f(0) = 3dx

Graph the slope field at the twelve indicated points

Page 9: Lesson 9-2

Euler’s MethodEuler’s method is an iterative process (like fractals in Geometry) in which the next value is dependent on the previous value. It is used in many different applications and is the foundation of an area of mathematics called Time Series Analysis. Some hurricane models are based on these same type of algorithms.

For the first estimate:y1 = y0 + h F(x0, y0) (Stewart’s notation: h is ∆x and F is slope)

y1 = y0 + slope(x0,y0) ∆x (from the notation in your notes)

For the nth estimate:yn = yn-1 + h F(xn-1, yn-1)

yn = yn-1 + slope(xn-1,yn-1) ∆x

These iterative processes are just what spreadsheets were made for. The next slide shows example 3 on page 597 of Stewart

Page 10: Lesson 9-2

Example 3 page 597 MTk

dtdT

i slope x y ∆x= 0.10 1 0 1    1 1.2 0.1 1.1    2 1.42 0.2 1.22    3 1.662 0.3 1.362    4 1.9282 0.4 1.5282    5 2.22102 0.5 1.72102    6 2.543122 0.6 1.943122    7 2.8974342 0.7 2.197434    8 3.28717762 0.8 2.487178    9 3.715895382 0.9 2.815895    

10 4.18748492 1 3.187485    

= x + y = xi + ∆x =yi-1 + ∆xslopei-1

Page 11: Lesson 9-2

Euler Example 1xydxdy 2

Given with y(0) = 1; Use Euler’s method starting at x = 0

with a step size of 0.2 (∆x) to approximate y(1).

yn = yn-1 + slope(xn-1,yn-1) ∆x

dy x----- = ------dx y²

i slope x y ∆x= 0.20 0 0 11 0.2 0.2 12 0.369822 0.4 1.043 0.483513 0.6 1.1139644 0.545809 0.8 1.2106675 0.57407 1 1.319829

Page 12: Lesson 9-2

Euler Example 1 contxydxdy 2

Now find the particular solution to and find y(1).

Compare the exact and approximate values.

Remember the steps to solve simple differential equations!

dy x----- = ------dx y²

dy x----- = ------dx y² y² dy = x dx ∫ y² dy = ∫ x dx

⅓y³ = ½x² + C

y = (3/2)x² + C

y(0) = 1 so C = 1

y(1) = (3/2) + 1 = 1.3572 vs 1.319829

3

3with ∆x = 0.1 Euler’sMethod = 1.339315

Important to notethat the C is underthe cube root!!

Page 13: Lesson 9-2

Summary & Homework• Summary:

– Slope field is just the slope of the function, the value of the derivative graphed at the point

– Euler’s method, an iterative method, allows us to solve for the function analytically

• Homework: – pg 599 – 601: 3-7, 11, 12, (Euler Problem 23)