9-2 Differential Equation
9-2 Differential Equation
3
Direction Fields
4
Direction Fields
Suppose we are asked to sketch the graph of the solution
of the initial-value problem
y = x + y y(0) = 1
5
Direction Fields
The equation y = x + y tells us that the slope at any point
(x, y) on the graph (called the solution curve) is equal to the
sum of the x- and y-coordinates of the point (see Figure 1).
A solution of y = x + y
Figure 1
6
Direction Fields
In particular, because the curve passes through the point
(0, 1), its slope there must be 0 + 1 = 1. So a small portion
of the solution curve near the point (0, 1) looks like a short
line segment through (0, 1) with slope 1. (See Figure 2.)
10
Direction Fields
If we draw short line segments with slope F (x, y) at several
points (x, y), the result is called a direction field (or slope
field).
11
Example 1
(a) Sketch the direction field for the differential equation
y = x2 + y2 – 1.
(b) Use part (a) to sketch the solution curve that passes
through the origin.
Solution:
(a) We start by computing the slope at several points in the
following chart:
12
Example 1 – Solution cont’d
Figure 5
13
Example 1 – Solution cont’d
Figure 6
14
Direction Fields
Now let’s see how direction fields give insight into physical
situations.
Figure 9 15
Direction Fields
The circuit also contains a resistor with a resistance of
R ohms and zan inductor with an inductance of
L henries (H).
18
Euler’s Method
The basic idea behind direction fields can be used to find
numerical approximations to solutions of differential
equations.
Similarly,
y2 = y1 + hF (x1, y1)
In general, Figure 15
26
Example 3
Use Euler’s method with step size 0.1 to construct a table
of approximate values for the solution of the initial-value
problem
y = x + y y(0) = 1
Solution:
We are given that h = 0.1, x0 = 0, y0 = 1, and F (x, y) = x + y.
So we have
y1 = y0 + hF(x0, y0) = 1 + 0.1(0 + 1) = 1.1
y2 = y1 + hF(x1, y1) = 1.1 + 0.1(0.1 + 1.1) = 1.22
y3 = y2 + hF(x2, y2) = 1.22 + 0.1(0.2 + 1.22) = 1.362
This means that if y (x) is the exact solution, then
y(0.3) 1.362. 27
Example 3 – Solution cont’d
28
Euler’s Method
For a more accurate table of values in Example 3 we could
decrease the step size.
29
Euler’s Method
The following table shows the results of applying Euler’s
method with decreasing step size to the initial-value
problem of Example 3.