Tutorials › Calculus I › Workshop on Direction Fields and Separable Initial-Value Problems

Slope Fields and Separable Equations · Tutorial 1383 of 1495

Workshop on Direction Fields and Separable Initial-Value Problems

Use slope patterns to predict solution curves, then check those predictions by separating variables and verifying the resulting formulas.

Intermediate 10 min read

What You'll Learn

  • Compute and sketch the slope at points in a direction field for a separable equation.
  • Use the signs of the factors to identify where solution curves rise, fall, or have horizontal tangents.
  • Follow a direction field from a specified initial point to predict a solution’s qualitative behavior.
  • Separate variables on a region where the dependent-variable factor is nonzero.
  • Verify a separated solution by differentiation and substitution into its initial condition.
  • Recognize when dividing by a factor could omit an equilibrium solution.

From an Equation to a Direction Field

A differential equation gives a rule for the slope of a solution curve. For an equation of the form \(y'=f(x)g(y)\), the slope at a point depends on both coordinates: evaluate \(f\) at the point’s \(x\)-coordinate and \(g\) at its \(y\)-coordinate, then multiply. A direction field displays these slopes across the plane as short line segments.

Direction fields are useful because they let us predict how a solution passing through a specified initial point will behave, even before we find a formula. For separable equations, we can then check a prediction by solving for the curve through the initial point. The field and the formula provide two complementary views: one geometric and local, the other algebraic.

Definition: For \(y'=f(x)g(y)\), the direction field assigns the slope \(f(x)g(y)\) to each point \((x,y)\) in the equation’s domain. A solution curve through an initial point \((x_0,y_0)\) is a differentiable function \(y(x)\) satisfying the equation and \(y(x_0)=y_0\).

Reading the Slope Pattern

To sketch a direction field, choose a small grid of points. At each point, calculate \(f(x)g(y)\), then draw a short segment with that slope. A positive slope tilts upward as \(x\) increases; a negative slope tilts downward; and a zero slope is horizontal. The segments are local instructions, not complete solution curves.

For a product \(f(x)g(y)\), the signs of the two factors often reveal the field’s main pattern. Where either factor is zero, the slope is zero. Between those locations, determine the sign of each factor and multiply the signs. For example, if \(f(x)<0\) and \(g(y)>0\), the product is negative, so the segments tilt downward.

Value of \(f(x)g(y)\)Direction of the segmentLocal implication for a solution
PositiveUpward to the rightThe solution is increasing there.
NegativeDownward to the rightThe solution is decreasing there.
ZeroHorizontalThe solution has a horizontal tangent there.

A horizontal segment at one point does not by itself mean that the solution remains horizontal. It says only that the derivative is zero at that point. If an entire horizontal line consists of zero slopes, a constant function on that line may be an equilibrium solution. Whether a particular solution stays on that line is a separate question; the earlier material on separable equations with equilibria addresses that distinction.

Why the Field Gives the Tangent

The direction field’s rule follows directly from the meaning of a solution. If \(y(x)\) satisfies \(y'=f(x)g(y)\), then at every point on its graph the derivative is the slope of the tangent, and the differential equation sets that slope equal to \(f(x)g(y(x))\). Thus the field segment at \((x,y(x))\) has the same slope as the tangent to the solution there.

Justification: At a point \(x=a\) on a differentiable solution, the graph passes through \((a,y(a))\). Its tangent slope is \(y'(a)\). Substituting the solution into the differential equation gives \(y'(a)=f(a)g(y(a))\), exactly the slope assigned by the direction field at \((a,y(a))\).

This explains how to make a qualitative prediction. Start at the initial point and follow the short segments, allowing the slope to change as the curve moves through the field. The prediction is local: the field indicates the direction a solution must take, but it does not by itself determine how far the solution exists or provide an exact value at a later point.

Worked Example: Sketching a Field and Predicting a Minimum

Worked Example: Sketching a Field and Predicting a Minimum

Consider \(y'=x(2-y)\) with \(y(0)=0\). First determine the slope pattern. The slope is zero when \(x=0\) or \(y=2\). For \(x<0\) and \(y<2\), the factor \(x\) is negative and \(2-y\) is positive, so the slope is negative. For \(x>0\) and \(y<2\), both factors are positive, so the slope is positive. Along the initial point \((0,0)\), the slope is \(0(2-0)=0\).

The field therefore predicts that the solution decreases as it approaches \(x=0\) from the left and increases after it passes \(x=0\), as long as it remains below \(y=2\). The initial point is predicted to be a minimum. We can check this by separating on the region \(y\ne2\):

$$ \frac{dy}{2-y}=x\,dx. $$

Integrating gives \(-\ln|2-y|=x^2/2+C\). The initial value \(y(0)=0\) gives \(-\ln 2=C\), so \(\ln|2-y|=\ln 2-x^2/2\). Since the solution starts with \(2-y=2>0\), the corresponding branch is \(2-y=2e^{-x^2/2}\). Hence

$$ y=2-2e^{-x^2/2}. $$

Differentiate: \(y'=2xe^{-x^2/2}\). The right-hand side of the differential equation evaluated at this formula is \(x(2-y)=x(2e^{-x^2/2})=2xe^{-x^2/2}\), so the equation is satisfied. At \(x=0\), the formula gives \(y(0)=2-2=0\), as required. Also \(y'<0\) for \(x<0\) and \(y'>0\) for \(x>0\), confirming the predicted minimum.

Using Separation to Check a Prediction

For \(y'=f(x)g(y)\), separation rewrites the equation as \(dy/g(y)=f(x)\,dx\) wherever \(g(y)\ne0\). Integrating both sides produces a relation between \(x\) and \(y\); the initial condition determines the constant and the appropriate branch. The restriction matters: division by \(g(y)\) is not valid where \(g(y)=0\). A constant solution on such a level must be checked in the original equation rather than discarded by division.

When checking a candidate formula, verify both requirements of the initial-value problem: differentiate it and substitute into the differential equation, then evaluate it at the initial \(x\)-value. A formula that solves the differential equation but misses the specified initial value is not a solution to that initial-value problem.

Worked Example: Decrease Followed by Increase

Worked Example: Decrease Followed by Increase

Consider \(y'=(x-1)(y+1)\), \(y(0)=1\). The field has zero slopes along \(x=1\) and \(y=-1\). Above \(y=-1\), the factor \(y+1\) is positive. Thus, for \(x<1\), the slope is negative, while for \(x>1\), it is positive. Since the initial point lies above \(y=-1\) and to the left of \(x=1\), the field predicts that its solution decreases until \(x=1\), then increases.

Separate where \(y\ne-1\):

$$ \frac{dy}{y+1}=(x-1)\,dx. $$

Integration gives \(\ln|y+1|=x^2/2-x+C\). At \(x=0,\ y=1\), we have \(\ln|2|=C\), so \(C=\ln 2\). The solution branch has \(y+1>0\), and therefore

$$ y=2e^{x^2/2-x}-1. $$

At \(x=1\), its value is \(2e^{-1/2}-1\). Differentiating the formula gives \(y'=2e^{x^2/2-x}(x-1)\). Substitution into the right-hand side gives \((x-1)(y+1)=(x-1)2e^{x^2/2-x}\), the same derivative. At the initial point, \(y(0)=2e^0-1=1\). The derivative is negative for \(x<1\) and positive for \(x>1\), so the formula confirms the field’s decrease-then-increase prediction.

Worked Example: Following the Field Through a Horizontal Tangent

Worked Example: Following the Field Through a Horizontal Tangent

Consider \(y'=(x+1)(y-2)\), \(y(-2)=3\). The slopes are zero along \(x=-1\) and \(y=2\). The initial point is above \(y=2\), where \(y-2>0\). For \(x<-1\), \(x+1<0\), so the solution initially decreases. For \(x>-1\), both factors are positive, so it increases. The field predicts a horizontal tangent at \(x=-1\) and a minimum there.

Separate where \(y\ne2\):

$$ \frac{dy}{y-2}=(x+1)\,dx. $$

After integration, \(\ln|y-2|=x^2/2+x+C\). The initial point gives \(\ln|3-2|=0+C\), so \(C=0\). Because the initial value is above \(2\), use the positive branch:

$$ y=2+e^{x^2/2+x}. $$

Differentiation gives \(y'=(x+1)e^{x^2/2+x}\), while substitution into the equation gives \((x+1)(y-2)=(x+1)e^{x^2/2+x}\). These agree. At \(x=-2\), the formula gives \(2+e^{2-2}=3\). At \(x=-1\), the derivative is zero; it is negative to the left and positive to the right. The minimum value is \(2+e^{-1/2}\), in agreement with the field prediction.

Common Pitfalls

A frequent sign error is to read the sign of one factor and ignore the other. For \(y'=x(2-y)\), at the point \((1,3)\) the slope is \(1(2-3)=-1\), not \(+1\). The segment must tilt downward. Always evaluate both factors, including the sign in expressions such as \(2-y\).

Another mistake is to divide by a factor that can be zero and then assume every solution has been found. For example, dividing \(y'=x(2-y)\) by \(2-y\) excludes \(y=2\). But substituting the constant function \(y(x)=2\) into the original equation gives \(y'=0\) and \(x(2-2)=0\), so it is indeed a solution. The separated formula from the first example describes the branch through \((0,0)\), not this equilibrium branch.

Takeaway: Use the direction field to predict how a specified solution moves, but use the original differential equation to check zero-factor cases. When separation involves division, state the region where that division is valid and separately test any excluded constant solutions.

Check Your Understanding

For each question, use the slope pattern first; where requested, check the prediction by solving the initial-value problem.

  1. For \(y'=x(3-y)\), identify the horizontal-slope lines. What is the slope at \((2,1)\)?
  2. For \(y'=(x+2)(y-1)\), what can the signs of the factors tell you about a solution above \(y=1\) as it passes from \(x<-2\) to \(x>-2\)?
  3. Separate and solve \(y'=x(1-y)\), \(y(0)=0\). Verify the differential equation by differentiation and check the initial value.
  4. For \(y'=x(y+2)\), explain why dividing by \(y+2\) does not account for every possible solution.
  5. At a point where a direction field has a horizontal segment, what does that tell you about the derivative, and what does it not establish by itself?

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon