Reason from a slope field
The slope field of a differential equation \(dy/dx=F(x,y)\) draws the slope \(F(x,y)\) as a short segment at the points of a grid (topic 7.3). A solution is a differentiable function \(y(x)\) on an interval whose graph has the slope of the field at each of its points:
This topic reads solutions from the field, without a formula for them. It finds their paths, where they rise and fall, which are constant, where they go as \(x\) grows and how they bend.
Following a solution
The slope field of dy/dx = x − y for x from −1 to 4 and y from −1 to 3.5, with a dashed orange line y = x along which every segment is flat. A solution runs through an orange dot at (0, 2) that can be dragged. It is red where it falls, down to its lowest point on the dashed line near (1.1, 1.1), and green where it rises toward the faint straight line y = x − 1. Faint curves through other points never cross it.
Figure 1 shows the slope field of \(dy/dx=x-y\). An initial condition \(y(x_0)=y_0\) means that the graph of the solution passes through \((x_0,y_0)\), here the orange dot at \((0,2)\).
At the dot, the solution has the slope that the field gives there, so its graph leaves the dot in that direction. A short distance farther on, the field gives a new slope, and the graph turns to match it. Press "Trace from the dot" to draw a curve in this way. It grows to the right first and then to the left, with the slope shown in orange at each moving end.
Drag the dot, or use the sliders, to start elsewhere. Each start gives its own solution, which never crosses the faint solution curves. A theorem of later courses, the Existence and Uniqueness Theorem, explains this. It applies when \(F\) is a polynomial in \(x\) and \(y\), or a quotient of two such polynomials. Each solution is continued as far as it can go in both directions. Exactly one such solution then passes through each point where \(F\) is defined. It can end only where its values grow without bound, or where its graph approaches points at which \(F\) is undefined. Two different solutions therefore never meet, since a common point would have two solutions through it.
Along a solution, \(y'=F(x,y)\), so the solution increases where \(F>0\) at the points of its graph and decreases where \(F<0\) (topic 5.3). In Figure 1, \(x-y\) is negative above the line \(y=x\) and positive below it. The solution is therefore red above the line, where it falls, and green below it, where it rises.
Every segment on the dashed orange line \(y=x\) is flat. Along the graph, \(F\big(x,y(x)\big)\) is a continuous function of \(x\), so by the Intermediate Value Theorem it changes sign only where it is 0. A solution can therefore switch between rising and falling only where it meets the points where \(F=0\). The solution through \((0,2)\) meets the dashed line once, at its lowest point.
Constant solutions and the long run
A constant function \(y=c\) has derivative 0, so it is a solution when, and only when, \(F(x,c)=0\) for every \(x\) in an interval. Such a solution is called a constant solution, or an equilibrium solution, and its graph is a horizontal line of flat segments.
A flat segment gives the solution through it a horizontal tangent, but it does not make that solution constant. In Figure 1, each solution that meets the dashed line \(y=x\) has a horizontal tangent there and nowhere else. The line itself has slope 1, so it is not a solution, although its segments are flat.
If the slope depends only on \(y\), as in \(dy/dx=g(y)\), the equation is called autonomous. Each row of segments then has one slope, and the constant solutions are the lines \(y=c\) with \(g(c)=0\). In Figure 2, \(g(y)=\frac14(y+1)(3-y)\), so the constant solutions are the dashed lines \(y=-1\) and \(y=3\).
The slope field of dy/dx = (y + 1)(3 − y)/4 for x from 0 to 6, with dashed lines at y = −1 and y = 3, where every segment is flat. An orange dot on the y-axis at y = −0.5, which can be dragged, starts a solution that rises in an S shape toward y = 3 and is steepest where it crosses y = 1. An orange tangent line touches the solution at a point that a slider moves. Faint solutions above y = 3 fall toward it, and those below y = −1 fall away from y = −1.
Drag the orange dot to move the start. Between the dashed lines, both factors of \(g\) are positive, so every segment rises. A solution that starts there cannot meet the dashed lines, because they are solutions too. Since it is continuous, it stays between them by the Intermediate Value Theorem, and it increases. Its values stay between \(-1\) and 3, so it continues for every \(x\).
Such a solution approaches 3 as \(x\) increases without bound. Take any number \(k\) between the start \(y_0\) and 3. On \([y_0,k]\), \(g\) is continuous and positive, so by the Extreme Value Theorem it has a smallest value \(m>0\) there. While the solution is below \(k\), its slope is at least \(m\). By the Mean Value Theorem, it then rises at least \(m\) for each unit of \(x\). It therefore passes \(k\) within \(\frac{k-y_0}{m}\) units of the start, and after that it stays between \(k\) and 3. Since \(k\) can be as close to 3 as you like, \(\lim_{x\to\infty}y=3\).
Above 3 the slope is negative, so a solution falls toward 3 in the same way. Below \(-1\) the slope is negative too, and it becomes steeper as \(y\) decreases, so a solution falls away from \(-1\) and decreases without bound.
An equilibrium is stable if the solutions that start near it on both sides approach it as \(x\) increases. It is unstable if those on one side or both move away, and some books call the one-sided case semistable. To classify an equilibrium, test the sign of \(g\) on each side of it. A positive slope below and a negative slope above send the solutions on both sides toward it, so it is stable. In Figure 2, \(y=3\) is stable and \(y=-1\) is unstable.
How solutions bend
A solution is concave up where its slope increases as \(x\) increases, and concave down where its slope decreases (topic 5.6). Move the start of Figure 2 between the dashed lines. Then use the second slider to move the orange line to the right. Between \(y=-1\) and \(y=1\), the slope shown under the figure increases, and the tangent line lies below the solution. Between \(y=1\) and \(y=3\), the slope decreases, and the tangent line lies above it.
To find the concavity from the equation, differentiate both sides with respect to \(x\). Because \(y\) is a function of \(x\), the chain rule gives \(\frac{d}{dx}\,g(y)=g'(y)\,y'\), and \(y'=g(y)\), so \(y''=g'(y)\,g(y)\). For Figure 2, \(g'(y)=\frac12(1-y)\), so between the equilibria \(y''>0\) below \(y=1\) and \(y''<0\) above it. A solution that crosses \(y=1\), the height of the largest slope, therefore has an inflection point there, a point where the concavity changes.
If \(F\) involves \(x\) too, differentiate in the same way. Then replace \(y'\) by \(F(x,y)\). For Figure 1, \(y''=1-y'=1-x+y\), which is 0 on the faint straight line \(y=x-1\), itself a solution. Solutions above that line are concave up, and solutions below it are concave down.
Example 1
Follow a solution from its initial point
Figure 3 shows the slope field of \(\dfrac{dy}{dx}=-\dfrac{x}{y}\). Sketch the solution curve through the point \((0,2)\), and find the interval on which this solution is defined.
The slope field of dy/dx = −x/y, whose segments are tangent to circles centered at the origin, with a red dashed line along y = 0, where there are no segments. The solution through the orange point (0, 2) is the upper half of the circle of radius 2, and it ends at red rings at (−2, 0) and (2, 0).
Solution
At \((0,2)\) the slope is 0. Above the \(x\)-axis, the slopes are negative for \(x>0\) and become steeper as \(y\) decreases, so the curve falls to the right. For \(x<0\) they are positive, so the curve also falls to the left. Press "Trace from (0, 2)" to follow it.
The segments appear tangent to circles about the origin, and the chain rule confirms it:
This derivative is 0 on an interval, so by the Mean Value Theorem the sum \(x^2+y^2\) is constant along the solution. It equals 4, its value at the start. The slope \(-x/y\) is undefined on the \(x\)-axis, so the solution's graph cannot reach it. By the Intermediate Value Theorem, the continuous solution therefore stays above the axis. It is the upper half of the circle \(x^2+y^2=4\), which satisfies the equation wherever \(y>0\):
Its graph approaches the \(x\)-axis at \((-2,0)\) and \((2,0)\), where the slope has no value, so the solution is defined for \(-2<x<2\).
Example 2
Determine increasing and decreasing behavior
Let \(y=f(x)\) be the solution of \(\dfrac{dy}{dx}=(x-3)\left(y^2-4\right)\) with \(f(4)=0\). Find the intervals on which \(f\) is increasing and the intervals on which \(f\) is decreasing.
Solution
The right side is 0 for every \(x\) when \(y=2\) or \(y=-2\), so these lines are constant solutions. The graph of \(f\) passes through \((4,0)\), between them, and different solutions never meet. Since \(f\) is continuous, the Intermediate Value Theorem gives \(-2<f(x)<2\). Its values stay between two numbers, so \(f\) is defined for every \(x\).
On the graph, therefore, \(y^2-4<0\), and the slope has the opposite sign to \(x-3\):
Therefore \(f\) is increasing for \(x\le 3\) and decreasing for \(x\ge 3\). It has a relative maximum at \(x=3\), where the segments of the field are flat.
Example 3
Identify equilibrium solutions
Find all constant solutions of \(\dfrac{dy}{dx}=(y-1)(x+y)\). The solution curve through \((-3,3)\) has a horizontal tangent at that point. Explain why this solution is not constant.
Solution
A constant function \(y=c\) is a solution when the right side is 0 at every point of the line \(y=c\):
The factor \(x+c\) is 0 only when \(x=-c\), so for every other \(x\) the factor \(c-1\) must be 0. The only constant solution is \(y=1\).
At \((-3,3)\), the slope is \((3-1)(-3+3)=0\), which gives the horizontal tangent. On the line \(y=3\), however, the slope is \(2(x+3)\), which is not 0 when \(x\ne -3\), so the line is not a solution. A constant solution through \((-3,3)\) would have to be this line, so the solution through \((-3,3)\) is not constant.
Example 4
Predict long-term behavior
Let \(y=f(x)\) be the solution of \(\dfrac{dy}{dx}=y(y-2)(6-y)\) with \(f(0)=1.5\). Find \(\displaystyle\lim_{x\to\infty}f(x)\), and classify each constant solution as stable or unstable.
Solution
The right side is 0 when \(y=0\), 2 or 6, so the constant solutions are \(y=0\), \(y=2\) and \(y=6\). By the Intermediate Value Theorem, the right side keeps one sign between and beyond these zeros, so one value of \(y\) decides each interval:
The start 1.5 lies between 0 and 2, where the slopes are negative. The solution falls and stays between the lines \(y=0\) and \(y=2\), so by the argument for Figure 2 it approaches the lower one:
Solutions near 0 rise toward it from below and fall toward it from above, so \(y=0\) is stable. The same holds for \(y=6\). Solutions near 2 move away from it on both sides, so \(y=2\) is unstable.
Example 5
Determine concavity when supported
Let \(y=f(x)\) be the solution of \(\dfrac{dy}{dx}=y^2-x\) with \(f(9)=3\). Does \(f\) have a relative minimum, a relative maximum, or neither at \(x=9\)? Justify your answer.
Solution
At \((9,3)\), the slope is \(3^2-9=0\), so the graph has a horizontal tangent there, and its concavity decides the answer. Differentiate both sides with respect to \(x\). Because \(y\) depends on \(x\), the chain rule gives \(\frac{d}{dx}\left(y^2\right)=2y\,y'\):
At \((9,3)\), \(y'=0\), so
The graph is concave down at \(x=9\). By the Second Derivative Test, \(f\) has a relative maximum at \(x=9\).
Each example is one of the five skills of topic 7.4 in Which & Why: AP Calculus.