Unit 1, lesson 4

Direction Fields and Solution Curves

How a first-order equation gives a local slope at each point, how those slopes form a direction field organized by isoclines, and how solution curves and a solution family fit the field exactly.

  • Video 4
  • Direction Fields, Existence and Uniqueness

Let xx be the independent variable and write y′=dy/dxy' = dy/dx. Suppose the equation y′=x−yy' = x - y is given, but no formula for yy is known yet. The equation still answers a smaller question at every point of the plane, namely how steep a solution has to be if it passes through that point. Drawing those answers as short dashes gives a picture of all solutions at once, and this lesson shows how to read that picture, how isoclines organize it, and how it matches the exact family of solutions.

Key terms

Local slope

Definition Let ff be defined on a region RR of the xyxy-plane and consider the first-order equation y′=f(x,y)y' = f(x, y). The local slope at a point (x0,y0)(x_0, y_0) of RR is the number f(x0,y0)f(x_0, y_0). If a solution y=φ(x)y = \varphi(x) passes through that point, so that φ(x0)=y0\varphi(x_0) = y_0, the equation forces

φ′(x0)=f(x0,y0).\varphi'(x_0) = f(x_0, y_0).

So the local slope is the slope of the tangent line of every solution curve through the point.

In plain words The equation does not say where a solution is. It says how steep a solution has to be at each place it might pass through. The height y0y_0 of a point and the slope f(x0,y0)f(x_0, y_0) required there are two different numbers.

Example For y′=x−yy' = x - y, three points at the same height y=1y = 1 require three different slopes.

Point (x,y)(x, y)Local slope x−yx - y
(0,1)(0, 1)−1-1
(1,1)(1, 1)00
(2,1)(2, 1)11

A solution through (0,1)(0, 1) is falling there, one through (1,1)(1, 1) has a horizontal tangent there, and one through (2,1)(2, 1) is rising.

Direction field

Definition The direction field, or slope field, of y′=f(x,y)y' = f(x, y) on RR assigns to each point (x,y)(x, y) of RR a short line segment through that point with slope f(x,y)f(x, y). In practice the segments are drawn at the points of a finite grid, usually all with the same length so that only their angle carries information. Points outside RR, where ff is not defined, get no segment.

In plain words A direction field is a map of instructions, drawn before any initial value is chosen. Each dash shows which way a solution through that spot must head. A drawing shows only finitely many dashes, so it is good evidence about the behavior of solutions but not a proof.

Example For y′=x−yy' = x - y the sign of the slope depends only on the side of the line y=xy = x on which a point lies. Below that line, where y<xy < x, every segment rises. On the line every segment is horizontal, and above it, where y>xy > x, every segment falls. So a solution curve decreases while it stays above the diagonal and increases while it stays below it. For y′=−x/yy' = -x/y the right side is undefined where y=0y = 0, so that field has a gap along the whole xx-axis.

Isocline

Definition For a real number mm, the isocline of slope mm of y′=f(x,y)y' = f(x, y) is the set of points of RR where

f(x,y)=m.f(x, y) = m.

Every segment of the direction field on it has the same slope mm, so a few isoclines with equally tilted segments on each build the field quickly. An isocline is in general not a solution curve. A piece of an isocline that is the graph of a differentiable function y=g(x)y = g(x) on an interval is a solution curve exactly when g′(x)=mg'(x) = m on that interval, that is, when the piece is a straight line of slope mm.

In plain words An isocline collects all the places where solutions have one particular steepness. It tells you where a slope occurs, not which path a solution follows, and solution curves usually cut across it.

Example For y′=x−yy' = x - y, setting x−y=mx - y = m gives the lines

y=x−m.y = x - m.

The isocline of slope 00 is y=xy = x, which carries horizontal segments. The isocline of slope 11 is y=x−1y = x - 1, one unit lower, and the isocline of slope −1-1 is y=x+1y = x + 1, one unit higher. The line y=xy = x rises with slope 11 while the field on it asks for slope 00, so it is not a solution, and solution curves cross it with a horizontal tangent. The line y=x−1y = x - 1 is the exception. Its own slope 11 matches the segments it carries, and indeed (x−1)′=1=x−(x−1)(x - 1)' = 1 = x - (x - 1), so it is a solution curve.

Solution curve

Definition A solution of y′=f(x,y)y' = f(x, y) on an open interval II is a differentiable function φ\varphi on II such that (x,φ(x))(x, \varphi(x)) lies in RR and

φ′(x)=f(x,φ(x))\varphi'(x) = f(x, \varphi(x))

for every xx in II. Its graph is a solution curve, also called an integral curve. At each of its points the curve is tangent to the field segment there. Because xx is the independent variable, a solution curve has exactly one height for each xx in II, and reading it from left to right follows increasing xx.

In plain words A solution curve obeys every local instruction along its whole interval at the same time. Following one dash in a straight line for a short step only approximates the curve, because the required slope keeps changing during the step.

Example Take y=x−1+2e−xy = x - 1 + 2e^{-x} on R\mathbb{R}. Its derivative is y′=1−2e−xy' = 1 - 2e^{-x}, and x−y=1−2e−xx - y = 1 - 2e^{-x} as well, so it is a solution of y′=x−yy' = x - y. It passes through (0,1)(0, 1) with slope −1-1, the local slope there. A straight step of length 0.50.5 along the dash at (0,1)(0, 1) ends at height 1−0.5=0.51 - 0.5 = 0.5, while the curve itself reaches

y(0.5)=−0.5+2e−0.5≈0.713.\begin{aligned} y(0.5) &= -0.5 + 2e^{-0.5} \\[0.4em] &\approx 0.713. \end{aligned}

The curve stays above the straight step because its slope 1−2e−x1 - 2e^{-x} increases as xx grows.

Solution family

Definition A one-parameter solution family of y′=f(x,y)y' = f(x, y) is a formula y=φ(x,C)y = \varphi(x, C) that gives a solution for every value of the constant CC in some set. An initial condition y(x0)=y0y(x_0) = y_0 selects the members whose curves pass through (x0,y0)(x_0, y_0). When every solution on every interval is a piece of one member, the family describes all solutions of the equation.

In plain words The family is the whole collection of curves that the field allows, one curve for each value of the constant. The initial point decides which constant you get.

Example Write y′=x−yy' = x - y as y′+y=xy' + y = x. Trying a line y=x+ky = x + k gives 1+x+k=x1 + x + k = x, so k=−1k = -1 and y=x−1y = x - 1 is one solution. Adding the solutions Ce−xCe^{-x} of y′+y=0y' + y = 0, with CC any real constant, gives the family

y=x−1+Ce−x.y = x - 1 + Ce^{-x}.

Differentiating gives y′=1−Ce−xy' = 1 - Ce^{-x}, which equals x−yx - y. The family contains every solution. If yy solves the equation on some interval, then D=y−(x−1)D = y - (x - 1) satisfies D′=−DD' = -D, so (exD)′=ex(D′+D)=0(e^{x}D)' = e^{x}(D' + D) = 0 and exDe^{x}D is a constant CC there. The condition y(0)=1y(0) = 1 gives 1=−1+C1 = -1 + C, so C=2C = 2, and the selected member is the curve y=x−1+2e−xy = x - 1 + 2e^{-x} of the previous term. Its derivative 1−2e−x1 - 2e^{-x} is negative for x<ln⁡2x < \ln 2 and positive for x>ln⁡2x > \ln 2, and its height at x=ln⁡2x = \ln 2 is also ln⁡2\ln 2. So the lowest point (ln⁡2,ln⁡2)(\ln 2, \ln 2) lies on the isocline y=xy = x of slope 00. For large xx the term 2e−x2e^{-x} dies out and the curve approaches the line y=x−1y = x - 1. Two members with C1≠C2C_1 \ne C_2 differ by (C1−C2)e−x(C_1 - C_2)e^{-x}, which is never zero, so distinct curves of this family never meet. The uniqueness theorem of the next lesson explains this in general, which a drawing alone cannot do.

Check yourself

  1. For the equation y′=y−xy' = y - x, with independent variable xx, find the local slopes at (0,0)(0, 0), (1,3)(1, 3) and (2,1)(2, 1). Then describe its isoclines and find the one that is itself a solution curve.
Show the answer

The slopes are 0−0=00 - 0 = 0, then 3−1=23 - 1 = 2, then 1−2=−11 - 2 = -1. Setting y−x=my - x = m gives the isocline y=x+my = x + m, so the isoclines are parallel lines of slope 11, and the one of slope mm is the line y=xy = x shifted up by mm. Such a line is a solution exactly when its own slope 11 equals the slope mm it carries, so the answer is y=x+1y = x + 1. Indeed (x+1)′=1(x + 1)' = 1 and (x+1)−x=1(x + 1) - x = 1.

  1. Every field segment on the line y=xy = x is horizontal for the equation y′=y−xy' = y - x. A classmate concludes that y=xy = x is a solution along which yy does not change. What is wrong, and does this equation have any constant solution?
Show the answer

Horizontal segments say that a solution passing through a point of the line has slope 00 at that point. The line itself has slope 11. Substituting y=xy = x gives y′=1y' = 1 but y−x=0y - x = 0, so it is not a solution, and solution curves cross it with a horizontal tangent. A constant y=cy = c would need 0=c−x0 = c - x for every xx in an interval, which holds only at the single point x=cx = c. So the equation has no constant solution.

  1. Find a solution family of y′=y−xy' = y - x by trying a line y=x+ky = x + k and adding the solutions of y′=yy' = y. Then find the solution with y(0)=0y(0) = 0, locate its highest point, and describe the curve as x→−∞x \to -\infty.
Show the answer

Substituting y=x+ky = x + k gives 1=k1 = k, so y=x+1y = x + 1 is a solution. The equation y′=yy' = y has the solutions CexCe^{x}, which gives the family y=x+1+Cexy = x + 1 + Ce^{x}. Differentiating gives y′=1+Cexy' = 1 + Ce^{x}, which equals y−xy - x, so every member solves the equation on R\mathbb{R}. The condition y(0)=0y(0) = 0 gives 1+C=01 + C = 0, so C=−1C = -1 and

y=x+1−ex.y = x + 1 - e^{x}.

Its derivative 1−ex1 - e^{x} is positive for x<0x < 0 and negative for x>0x > 0, so the highest point is (0,0)(0, 0), which lies on the isocline y=xy = x of slope 00. As x→−∞x \to -\infty the term exe^{x} tends to 00, so the curve approaches the line y=x+1y = x + 1, the member with C=0C = 0, from below.

How this lesson connects