slope fields and euler’s method copyright © cengage learning. all rights reserved. 6.1 6.1 day 2...

24
Slope Fields and Euler’s Method Copyright © Cengage Learning. All rights reserved. 6. 1 6.1 Day 2 2014

Upload: morris-newman

Post on 13-Jan-2016

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Slope Fields and Euler’s Method Copyright © Cengage Learning. All rights reserved. 6.1 6.1 Day 2 2014

Slope Fields and Euler’s Method

Copyright © Cengage Learning. All rights reserved.

6.1

6.1 Day 2 2014

Page 2: Slope Fields and Euler’s Method Copyright © Cengage Learning. All rights reserved. 6.1 6.1 Day 2 2014

4

6.1 Day 2: Slope Fields

Greg Kelly, Hanford High School, Richland, Washington

Page 3: Slope Fields and Euler’s Method Copyright © Cengage Learning. All rights reserved. 6.1 6.1 Day 2 2014

5

A little review:

Consider:2 3y x

then: 2y x 2y x

2 5y x or

It doesn’t matter whether the constant was 3 or -5, since when we take the derivative the constant disappears.

However, when we try to reverse the operation:

Given: 2y x find y

2y x C

We don’t know what the constant is, so we put “C” in the answer to remind us that there might have been a constant.

This is the general solution

Page 4: Slope Fields and Euler’s Method Copyright © Cengage Learning. All rights reserved. 6.1 6.1 Day 2 2014

6

If we have some more information we can find C.

Given: and when , find the equation for .2y x y4y 1x

2y x C 24 1 C

3 C 2 3y x

This is called an initial value problem. We need the initial values to find the constant.

An equation containing a derivative is called a differential equation. It becomes an initial value problem when you are given the initial condition and asked to find the original equation.

2y x

Page 5: Slope Fields and Euler’s Method Copyright © Cengage Learning. All rights reserved. 6.1 6.1 Day 2 2014

7

Slope Fields

Page 6: Slope Fields and Euler’s Method Copyright © Cengage Learning. All rights reserved. 6.1 6.1 Day 2 2014

8

Slope Fields

Solving a differential equation analytically can be difficult or even impossible. However, there is a graphical approach you can use to learn a lot about the solution of a differential equation.

Consider a differential equation of the formy' = F(x, y) Differential equation

where F(x, y) is some expression in x and y.

At each point (x, y) in the xy–plane where F is defined, the differential equation determines the slope y' = F(x, y) of the solution at that point.

Page 7: Slope Fields and Euler’s Method Copyright © Cengage Learning. All rights reserved. 6.1 6.1 Day 2 2014

9

Slope FieldsIf you draw short line segments with slope F(x, y) at selected points (x, y) in the domain of F, then these line segments form a slope field, or a direction field, for the differential equation y' = F(x, y).

Each line segment has the same slope as the solution curve through that point.

A slope field shows the general shape of all the solutions and can be helpful in getting a visual perspective of the directions of the solutions of a differential equation. Slope fields are graphical representations of a differential equation which give us an idea of the shape of the solution curves. The solution curves seem to lurk in the slope field.

Page 8: Slope Fields and Euler’s Method Copyright © Cengage Learning. All rights reserved. 6.1 6.1 Day 2 2014

10

Slope Fields

A slope field

shows the

general shape

of all solutions

of a differential

equation.

Page 9: Slope Fields and Euler’s Method Copyright © Cengage Learning. All rights reserved. 6.1 6.1 Day 2 2014

11

Sketching a Slope Field

Sketch a slope field for the differential equationby sketching short segments of the derivative at several points.

2y x

Page 10: Slope Fields and Euler’s Method Copyright © Cengage Learning. All rights reserved. 6.1 6.1 Day 2 2014

12

Draw a segment with slope of 2.

Draw a segment with slope of 0.

Draw a segment with slope of 4.

2y x

x y y0 0 0

0 1 0

0 0

0 0

2

3

1 0 2

1 1 2

2 0 4

-1 0 -2

-2 0 -4

Page 11: Slope Fields and Euler’s Method Copyright © Cengage Learning. All rights reserved. 6.1 6.1 Day 2 2014

13

2y x

If you know an initial condition, such as (1,-2), you can sketch the curve.

By following the slope field, you get a rough picture of what the curve looks like.

In this case, it is a parabola.

Slope fields show the general shape of all solutions of a differential equation.

We can see that there are several different parabolas that we can sketch in the slope field with varying values of C.

Page 12: Slope Fields and Euler’s Method Copyright © Cengage Learning. All rights reserved. 6.1 6.1 Day 2 2014

14

x

y

Slope Fields Create the slope field for the differential

equationy

x

dx

dy

-2

-1

1

2

-2 -1 1 2

x

y

Since dy/dx gives us the slope at any point, we just need to input the coordinate:

At (-2, 2), dy/dx = -2/2 = -1At (-2, 1), dy/dx = -2/1 = -2At (-2, 0), dy/dx = -2/0 = undefinedAnd so on….

This gives us an outline of a hyperbola

Page 13: Slope Fields and Euler’s Method Copyright © Cengage Learning. All rights reserved. 6.1 6.1 Day 2 2014

15

Given:

2 ( 1)dy

x ydx

Let’s sketch the slope field …

Slope Fields

Page 14: Slope Fields and Euler’s Method Copyright © Cengage Learning. All rights reserved. 6.1 6.1 Day 2 2014

16

2( 1)d

xy

xy

d

Separate the variables

2

1

yd

y

dxx

21

1dy x dx

y

31ln 1

3y x C

3 31 13 31 x C x Cy e e e

313

313

1 , apply IC

1

(0) 3

2

x

x

y e

y

fK

e

Given f(0)=3, find the particular solution.

Page 15: Slope Fields and Euler’s Method Copyright © Cengage Learning. All rights reserved. 6.1 6.1 Day 2 2014

17

CC

Slope Fields

3xdx

dy

In order to determine a slope field for a differential equation, we should consider the following:

i) If points with the same slope are along horizontal lines, then DE depends only on y

ii) Do you know a slope at a particular point?

iii) If we have the same slope along vertical lines, then DE depends only on x

iv) Is the slope field sinusoidal?

v) What x and y values make the slope 0, 1, or undefined?

vi) dy/dx = a(x ± y) has similar slopes along a diagonal.

vii) Can you solve the separable DE?

1. _____

2. _____

3. _____

4. _____

5. _____

6. _____

7. _____

8. _____

Match the correct DE with its Match the correct DE with its graph:graph:

2ydx

dy

xdx

dycos

xdx

dysin

yxdx

dy

22 yxdx

dy

1 yydx

dy

y

x

dx

dy

AA BB

CC

EE

GG

DD

FF

HH

HH

BB

FF

DD

GG

EE

AA

Page 16: Slope Fields and Euler’s Method Copyright © Cengage Learning. All rights reserved. 6.1 6.1 Day 2 2014

18

Slope Fields

Which of the following graphs could be the graph of the solution of the differential equation whose slope field is shown?

Page 17: Slope Fields and Euler’s Method Copyright © Cengage Learning. All rights reserved. 6.1 6.1 Day 2 2014

19

1998 AP Question: Determine the correct differential equation for the slope field:

Slope Fields

2 B) xdx

dy

xdx

dy1 A)

y

x

dx

dy D)

yxdx

dy C)

ydx

dyln E)

Page 18: Slope Fields and Euler’s Method Copyright © Cengage Learning. All rights reserved. 6.1 6.1 Day 2 2014

20

Homework Slope Fields Worksheet

Page 19: Slope Fields and Euler’s Method Copyright © Cengage Learning. All rights reserved. 6.1 6.1 Day 2 2014

21

Euler’s Method – BC Only

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 (x0, y0).

From the given information, you know that the graph of the solution passes through the point (x0, y0) and has a slope of

F(x0, y0) at this point.

This gives you a “starting point” for approximating the solution.

Page 20: Slope Fields and Euler’s Method Copyright © Cengage Learning. All rights reserved. 6.1 6.1 Day 2 2014

22

Euler’s Method

From this starting point, you can proceed in the direction indicated by the slope.

Using a small step h, move along the

tangent line until you arrive at the

point (x1, y1) where

x1 = x0 + h and y1 = y0 + hF(x0, y0) as shown in Figure 6.6.

Figure 6.6

Page 21: Slope Fields and Euler’s Method Copyright © Cengage Learning. All rights reserved. 6.1 6.1 Day 2 2014

23

Euler’s Method

If you think of (x1, y1) as a new starting point, you can

repeat the process to obtain a second point (x2, y2).

The values of xi and yi are as follows.

1 0 0 0 2 1 1 1, , , ,y y deriv x y x y y deriv x y x etc

Page 22: Slope Fields and Euler’s Method Copyright © Cengage Learning. All rights reserved. 6.1 6.1 Day 2 2014

24

Example 6 – 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). Use a step of h = 0.1.

Solution:Using h = 0.1, x0 = 0, y0 = 1, and F(x, y) = x – y, you have x0 = 0, x1 = 0.1, x2 = 0.2, x3 = 0.3,…, and

y1 = y0 + hF(x0, y0) = 1 + (0 – 1)(0.1) = 0.9

y2 = y1 + hF(x1, y1) = 0.9 + (0.1 – 0.9)(0.1) = 0.82

y3 = y2 + hF(x2, y2) = 0.82 + (0.2 – 0.82)(0.1) = 0.758.

Page 23: Slope Fields and Euler’s Method Copyright © Cengage Learning. All rights reserved. 6.1 6.1 Day 2 2014

25

Example 6 – Solution

Figure 6.7

The first ten approximations are shown in the table.

cont’d

You can plot these values to see a

graph of the approximate solution,

as shown in Figure 6.7.

Page 24: Slope Fields and Euler’s Method Copyright © Cengage Learning. All rights reserved. 6.1 6.1 Day 2 2014

26

Homework Slope Fields Worksheet BC add pg. 411 69-73 odd