6.1
Slope Fields and Euler’s
Method
6.1 Day 2 2014
Copyright © Cengage Learning. All rights reserved.
6.1 Day 2: Slope Fields
4
Greg Kelly, Hanford High School, Richland, Washington
A little review:
Consider:
then:
y  x2  3
y  x2  5
y  2 x
or
y  2 x
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:
y  2 x
y  x2  C
find
y
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
5

If we have some more information we can find C.
Given:
y  2 x
 y   2 x
and
y4
when
x 1 ,
find the equation for
y.
This is called an initial value problem. We
need the initial values to find the constant.
y  x2  C
4  12  C
3C
y  x2  3
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.
6

Slope Fields
7
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 form
y' = 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.
8
Slope Fields
If 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
9
curves seem to lurk in the slope field.
Slope Fields
A slope field
shows the
general shape
of all solutions
of a differential
equation.
10
Sketching a Slope Field
Sketch a slope field for the differential equation y  2 x
by sketching short segments of the derivative at
several points.
11

y  2 x
x y y
Draw a segment
with slope of 2.
Draw a segment
with slope of 0.
Draw a segment
with slope of 4.
0
0
0
0
1
0
0
2
0
0
3
0
1
0
2
1
1
2
2
0
4
-1
0
-2
-2
0
-4
12

y  2 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.
13

Slope Fields

Create the slope field for the differential equation
Since dy/dx gives us the slope at any point, we
just need to input the coordinate:
dy x

dx y
y
2
1
x
-2
-1
1
-1
2
At (-2, 2), dy/dx = -2/2 = -1
At (-2, 1), dy/dx = -2/1 = -2
At (-2, 0), dy/dx = -2/0 = undefined
And so on….
This gives us an outline of a
hyperbola
-2
14
Slope Fields
Given:
dy
2
 x ( y  1)
dx
Let’s sketch the slope field …
15
dy
 x 2 ( y  1)
dx
Given f(0)=3, find the particular solution.
Separate the variables
dy
 x 2 dx
y 1

1
dy   x 2 dx
y 1
1
ln y  1  x3  C
3
y 1  e
1 x 3 C
3
1 x3
3
 e eC
1 x3
3
 y  1  Ke , apply IC f (0)  3

y  2e
1 x3
3
1
16
Slope Fields
Match the correct DE with its graph:
dy
H dx  y  2
1. _____
A
B
dy
 x3
F dx
2. _____
dy
 sin x
3. _____
D dx
C
dy
 y  y  1
B dx
8. _____
G
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? 17
F
dy
 x y
dx
G
6. _____
dy
x

E dx y
7. _____
i)
D
dy
 cos x
dx
C
4. _____
dy
 x2  y2 E
A dx
5. _____
In order to determine a slope field
for a differential equation, we
should consider the following:
H
Slope Fields
 Which of the following graphs could be the graph of the
solution of the differential equation whose slope field is
shown?
18
Slope Fields

1998 AP Question: Determine the correct differential
equation for the slope field:
A)
dy
 1 x
dx
dy
 x2
dx
dy
C)
 x y
dx
dy x
D)

dx y
B)
dy
E)
 ln y
dx
19
Homework
 Slope Fields Worksheet
20
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.
21
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
22
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.
y1  y0  deriv  x0 , y0  x, y2  y1  deriv  x1, y1  x, etc
23
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.
24
Example 6 – Solution
cont’d
The first ten approximations are shown in the table.
You can plot these values to see a
graph of the approximate solution,
as shown in Figure 6.7.
Figure 6.7
25
Homework
 Slope Fields Worksheet
 BC add pg. 411 69-73 odd
26