[Notes on Diffy Qs home] [PDF version] [Buy paperback on Amazon]

[next] [prev] [prev-tail] [tail] [up]

1.2 Slope fields

Note: 1 lecture, §1.3 in [EP], §1.1 in [BD]

As we said, the general first order equation we are studying looks like

 ′ y = f (x,y).

In general, we cannot simply solve these kinds of equations explicitly. It would be nice if we could at least figure out the shape and behavior of the solutions, or if we could find approximate solutions.

1.2.1 Slope fields

The equation y′ = f(x,y) gives you a slope at each point in the (x,y) -plane. And this is the slope a solution y(x) would have at the point (x,y) . At a point (x,y) , we plot a short line with the slope f (x,y) . For example, if f(x,y) = xy , then at point (2,1.5) we draw a short line of slope 2 × 1.5 = 3 . That is, if y(x) is a solution and y(2) = 1.5 , then the equation mandates that  ′ y (2 ) = 3 . See Figure 1.1.


PIC

Figure 1.1: The slope y′ = xy at (2,1.5) .


To get an idea of how the solutions behave, we draw such lines at lots of points in the plane, not just the point (2,1.5 ) . Usually we pick a grid of such points fine enough so that it shows the behavior, but not too fine so that we can still recognize the individual lines. See Figure 1.2. We call this picture the slope field of the equation. Usually in practice, one does not do this by hand, but has a computer do the drawing.

Suppose we are given a specific initial condition y(x0) = y0 . A solution, that is, the graph of the solution, would be a curve that follows the slopes. For a few sample solutions, see Figure 1.3. It is easy to roughly sketch (or at least imagine) possible solutions in the slope field, just from looking at the slope field itself.


PIC

Figure 1.2: Slope field of y′ = xy .
PIC
Figure 1.3: Slope field of y′ = xy with a graph of solutions satisfying y(0) = 0.2 , y(0) = 0 , and y (0) = −0.2 .


By looking at the slope field we can get a lot of information about the behavior of solutions. For example, in Figure 1.3 we can see what the solutions do when the initial conditions are y(0) > 0 , y(0) = 0 and y(0) < 0 . Note that a small change in the initial condition causes quite different behavior. We can see this behavior just from the slope field imagining what solutions ought to do. On the other hand, plotting a few solutions of the equation  ′ y = − y , we see that no matter what y(0) is, all solutions tend to zero as x tends to infinity. See Figure 1.4. Again that behavior should be clear from simply from looking at the slope field itself.


PIC

Figure 1.4: Slope field of  ′ y = − y with a graph of a few solutions.


1.2.2 Existence and uniqueness

We wish to ask two fundamental questions about the problem

y′ = f(x,y), y(x ) = y . 0 0

(i)
Does a solution exist?
(ii)
Is the solution unique (if it exists)?

What do you think is the answer? The answer seems to be yes to both does it not? Well, pretty much. But there are cases when the answer to either question can be no.

Since generally the equations we encounter in applications come from real life situations, it seems logical that a solution always exists. It also has to be unique if we believe our universe is deterministic. If the solution does not exist, or if it is not unique, we have probably not devised the correct model. Hence, it is good to know when things go wrong and why.

Example 1.2.1: Attempt to solve:

y′ = 1-, y(0) = 0. x

Integrate to find the general solution y = ln|x| + C . The solution does not exist at x = 0 . See Figure 1.5. The equation may have been written as the seemingly harmless  ′ xy = 1 .


PIC

Figure 1.5: Slope field of y′ = 1∕x .
PIC
Figure 1.6: Slope field of  ∘-- y′ = 2 |y| with two solutions satisfying y(0) = 0 .


Example 1.2.2: Solve:

 ∘ -- y′ = 2 |y|, y(0) = 0.

See Figure 1.6. Note that y = 0 is a solution. But another solution is the function

 (| 2 y(x) = |{| x if x ≥ 0, |( −x2 if x < 0.

It is hard to tell by staring at the slope field that the solution is not unique. Is there any hope? Of course there is. We have the following theorem, known as Picard’s theorem1.

Theorem 1.2.1 (Picard’s theorem on existence and uniqueness). If f (x, y) is continuous (as a function of two variables) and ∂f- ∂y exists and is continuous near some (x0,y0) , then a solution to

y′ = f(x,y), y(x 0) = y0,

exists (at least for some small interval of x ’s) and is unique.

Note that the problems  ′ 1 y = ∕x , y(0) = 0 and  ′ ∘-- y = 2 |y| , y(0 ) = 0 do not satisfy the hypothesis of the theorem. Even if we can use the theorem, we ought to be careful about this existence business. It is quite possible that the solution only exists for a short while.

Example 1.2.3: For some constant A , solve:

 ′ 2 y = y , y(0) = A.

We know how to solve this equation. First assume that A ⇔ 0 , so y is not equal to zero at least for some x near 0. So x′ = 1∕y2 , so x = −1∕y + C , so y = -1- C−x . If y(0) = A , then C = 1∕A so

 1 y = 1-----. ∕A − x

If A = 0 , then y = 0 is a solution.

For example, when A = 1 the solution “blows up” at x = 1 . Hence, the solution does not exist for all x even if the equation is nice everywhere. The equation y′ = y2 certainly looks nice.

For most of this course we will be interested in equations where existence and uniqueness holds, and in fact holds “globally” unlike for the equation  ′ 2 y = y .

1.2.3 Exercises

Exercise 1.2.1: Sketch slope field for y′ = ex−y . How do the solutions behave as x grows? Can you guess a particular solution by looking at the slope field?

Exercise 1.2.2: Sketch slope field for y′ = x 2 .

Exercise 1.2.3: Sketch slope field for y′ = y2 .

Exercise 1.2.4: Is it possible to solve the equation  ′ xy y = cosx- for y(0) = 1 ? Justify.

Exercise 1.2.5: Is it possible to solve the equation  √--- y′ = y |x| for y(0) = 0 ? Is the solution unique? Justify.

Exercise 1.2.6: Match equations y′ = 1 − x , y′ = x − 2y , y′ = x (1 − y) to slope fields. Justify.
a) PIC b) PIC c) PIC

Exercise 1.2.7 (challenging): Take y′ = f (x, y) , y(0) = 0 , where f(x,y) > 1 for all x and y . If the solution exists for all x , can you say what happens to y(x) as x goes to positive infinity? Explain.

Exercise 1.2.8 (challenging): Take  ′ (y − x)y = 0 , y(0 ) = 0 . a) Find two distinct solutions. b) Explain why this does not violate Picard’s theorem.

Exercise 1.2.9: Suppose y′ = f(x,y) . What will the slope field look like, explain and sketch an example, if you have the following about f (x,y) . a) f does not depend on y . b) f does not depend on x . c) f(t,t) = 0 for any number t . d) f(x,0) = 0 and f(x,1) = 1 for all x .

Exercise 1.2.10: Find a solution to y′ = |y| , y(0) = 0 . Does Picard’s theorem apply?

Exercise 1.2.11: Take an equation y′ = (y − 2x)g(x,y) + 2 for some function g(x, y) . Can you solve the problem for the initial condition y(0) = 0 , and if so what is the solution?

Exercise 1.2.101: Sketch the slope field of y′ = y3 . Can you visually find the solution that satisfies y(0) = 0 ?

Exercise 1.2.102: Is it possible to solve  ′ y = xy for y(0) = 0 ? Is the solution unique?

Exercise 1.2.103: Is it possible to solve  ′ -x-- y = x2−1 for y(1) = 0 ?

Exercise 1.2.104: Match equations y′ = sin x , y′ = cosy , y′ = ycos(x) to slope fields. Justify.
a) PIC b) PIC c) PIC

Exercise 1.2.105 (tricky): Suppose

 ( ||{ 0 if y > 0, f(y) = ||( 1 if y ≤ 0.

Does y′ = f(y) , y(0) = 0 have a continuously differentiable solution? Does Picard apply, why, or why not?

1Named after the French mathematician Charles Émile Picard (1856–1941)