Tutorials › AP Calculus › Checking Candidate Curves Against a Differential Equation

Slope Fields and Models · Tutorial 555 of 999

Checking Candidate Curves Against a Differential Equation

You will learn to distinguish a curve that satisfies a differential equation from one that also satisfies a specified initial condition.

Beginner 9 min read

What You'll Learn

  • Define what it means for an explicit function to solve a first-order differential equation on an interval
  • Differentiate a proposed function and substitute it into the equation
  • Check whether the equation holds throughout the interval, not just at one point
  • Test a stated initial condition separately from the differential equation
  • Verify constant functions by checking the equation at every point in the interval
  • Use a residual to organize and interpret a candidate check

Why Check a Candidate Curve?

A differential equation specifies a relationship between an unknown function and its derivative. A proposed curve can be checked directly against that relationship: differentiate the function, substitute the function and derivative into the equation, and see whether the resulting equality holds.

This is different from finding a solution. Here, the candidate function is already given. The task is to decide whether it satisfies the differential equation and, if an initial condition is included, whether it satisfies that condition too. Keeping those checks separate prevents a common confusion: a function may solve the differential equation without solving the particular initial-value problem.

Definition: For a first-order differential equation \(y'=F(x,y)\), a differentiable function \(y=g(x)\) is a solution on an interval \(I\) if \(F(x,g(x))\) is defined and \(g'(x)=F(x,g(x))\) for every \(x\) in \(I\). It solves the initial-value problem \(y'=F(x,y)\), \(y(x_0)=y_0\) if it is a solution on an interval containing \(x_0\) and also satisfies \(g(x_0)=y_0\).

The phrase for every \(x\) in the interval matters. The derivative and the right-hand side must agree along the whole proposed curve, not merely at its initial point or at a few convenient values. If the equation or candidate has a restricted domain, the check must be made on an interval where both sides are defined.

A Direct Test

For \(y'=F(x,y)\), substitute \(y=g(x)\). The left-hand side becomes \(g'(x)\), and the right-hand side becomes \(F(x,g(x))\). The candidate solves the equation on \(I\) exactly when these expressions are equal for every \(x\) in \(I\). If an initial condition is specified, evaluate \(g(x_0)\) separately and compare it with \(y_0\).

1
Identify the candidate and its interval.
Make sure the function is differentiable there and the differential equation is defined along it.
2
Differentiate the candidate.
Compute \(g'(x)\), keeping the derivative as a function of \(x\).
3
Substitute into the differential equation.
Compare \(g'(x)\) with \(F(x,g(x))\), simplifying both sides as needed.
4
State the conclusion and check the initial condition.
The equation must hold throughout the interval. If given, verify \(g(x_0)=y_0\) as a separate condition.

A compact way to organize the comparison is to subtract the right-hand side from the left-hand side after substitution. This difference is called the residual for the candidate.

Definition: For the candidate \(y=g(x)\) in \(y'=F(x,y)\), its residual is \(R(x)=g'(x)-F(x,g(x))\). The candidate solves the differential equation on \(I\) precisely when \(R(x)=0\) for every \(x\in I\).

Why the Test Works

This test follows directly from what it means to satisfy a differential equation. The equation \(y'=F(x,y)\) says that at each input \(x\), the derivative of the solution equals the value of \(F\) at that input and the corresponding function value. When a particular candidate \(g\) is proposed, replacing \(y\) by \(g(x)\) makes that requirement the equality \(g'(x)=F(x,g(x))\).

$$ \begin{aligned} g\text{ solves }y'=F(x,y)\text{ on }I &\iff g'(x)=F(x,g(x))\text{ for every }x\in I\\ &\iff g'(x)-F(x,g(x))=0\text{ for every }x\in I\\ &\iff R(x)=0\text{ for every }x\in I. \end{aligned} $$

Each equivalence is just the same equality written in a different form. This also explains why testing one input is insufficient: \(R(x_0)=0\) at one point does not imply \(R(x)=0\) throughout the interval. An initial condition adds another requirement, \(g(x_0)=y_0\); it does not replace the requirement that the differential equation hold on the interval.

Worked Example: A Candidate That Solves the Equation and Initial-Value Problem

Worked Example: A Candidate That Solves the Equation and Initial-Value Problem

Check whether \(y=3e^{2x}\) solves \(y'=2y\) with \(y(0)=3\), on the interval \(\mathbb{R}\).

Write the candidate as \(g(x)=3e^{2x}\). Differentiate using the chain rule:

$$g'(x)=3\cdot 2e^{2x}=6e^{2x}.$$

Substitute the candidate into the right-hand side of the differential equation:

$$2g(x)=2(3e^{2x})=6e^{2x}.$$

Thus \(g'(x)=2g(x)\) for every real \(x\). Equivalently, the residual is \(6e^{2x}-6e^{2x}=0\) throughout \(\mathbb{R}\). Now check the initial condition:

$$g(0)=3e^{2\cdot 0}=3e^0=3\cdot 1=3.$$

The candidate satisfies the differential equation on \(\mathbb{R}\) and the initial condition at \(x=0\). Therefore, it solves the stated initial-value problem. As a final check, its derivative \(6e^{2x}\) agrees with \(2y\) after substituting \(y=3e^{2x}\).

Worked Example: The Equation Holds but the Initial Condition Does Not

Worked Example: The Equation Holds but the Initial Condition Does Not

Check whether \(y=x^2+1\) solves \(y'=2x\) with \(y(1)=3\), on \(\mathbb{R}\).

Let \(g(x)=x^2+1\). Its derivative is

$$g'(x)=2x.$$

The differential equation's right-hand side is \(2x\), which is exactly \(g'(x)\). Therefore, the equation holds for every real \(x\), and the candidate is a solution of the differential equation on \(\mathbb{R}\).

Now evaluate the candidate at the initial input \(x=1\):

$$g(1)=1^2+1=1+1=2.$$

The required initial value is \(3\), but \(g(1)=2\ne 3\). So this function solves the differential equation but does not solve the stated initial-value problem. The equation check and the initial-condition check give different conclusions, and both are needed to decide whether an initial-value problem is satisfied.

Worked Example: A Check at One Point Is Not Enough

Worked Example: A Check at One Point Is Not Enough

Determine whether \(y=x^2\) solves \(y'=0\) on \(\mathbb{R}\).

Let \(g(x)=x^2\). Differentiate:

$$g'(x)=2x.$$

The right-hand side of the differential equation is \(0\). The residual is therefore

$$R(x)=g'(x)-0=2x.$$

At \(x=0\), this residual is \(R(0)=2\cdot 0=0\), so the equality does hold at that one point. But, for example, at \(x=1\), \(R(1)=2\cdot 1=2\ne 0\). Thus the equality does not hold throughout \(\mathbb{R}\), and \(y=x^2\) is not a solution of the differential equation on that interval.

Check by substitution at \(x=1\): the derivative is \(g'(1)=2\), while the differential equation requires \(y'=0\). Since \(2\ne 0\), the candidate fails the equation. Agreement at \(x=0\) could not establish a solution on the whole interval.

Checking Constant Functions

A constant candidate has the form \(y=c\), where \(c\) is a fixed number. Its derivative is \(y'=0\). Substitution into \(y'=F(x,y)\) shows that it solves the equation on \(I\) exactly when \(F(x,c)=0\) for every \(x\in I\). A zero at just one \(x\)-value is not enough if \(F\) depends on \(x\).

Theorem: A constant function \(y=c\) solves \(y'=F(x,y)\) on an interval \(I\) if and only if \(F(x,c)=0\) for every \(x\in I\), with \(F\) defined at those points.

The justification is direct: the derivative of \(c\) is zero, so the equation requires \(0=F(x,c)\) at each input in the interval. When a constant solution makes the right-hand side zero, it is called an equilibrium solution. This check confirms a proposed constant solution; it does not require finding all possible solutions of the equation.

Worked Example: Checking a Constant Candidate

Worked Example: Checking a Constant Candidate

Check whether \(y=4\) solves \(y'=y(4-y)\) with \(y(0)=4\), on \(\mathbb{R}\).

Take \(g(x)=4\). Since it is constant,

$$g'(x)=0.$$

Substitute \(g(x)=4\) into the right-hand side:

$$g(x)(4-g(x))=4(4-4)=4\cdot 0=0.$$

The left- and right-hand sides are both zero for every real \(x\), so the constant function solves the differential equation on \(\mathbb{R}\). Check the initial condition separately:

$$g(0)=4.$$

This equals the required initial value, so \(y=4\) also solves the stated initial-value problem. The final substitution check is \(y'=0\) and \(y(4-y)=4(4-4)=0\), as required.

Common Mistakes and a Reliable Conclusion

One frequent error is to evaluate the candidate and the equation only at the initial point. For instance, \(y=x^2\) has \(y'(0)=0\), so it agrees with \(y'=0\) at \(x=0\). But it fails at \(x=1\), where \(y'(1)=2\), not \(0\). A solution must satisfy the equation at every point in the interval, not merely where the initial condition is specified.

Another error is to verify the differential equation and then assume the initial condition follows automatically. The second worked example shows why that is false: \(x^2+1\) satisfies \(y'=2x\) everywhere, but its value at \(x=1\) is \(2\), not \(3\). Conversely, a candidate can satisfy an initial value at one point while failing the differential equation elsewhere. Always report the two checks separately when both are requested.

To make a conclusion precise, state the interval checked and say whether the function solves the differential equation, the initial condition, or both. If the residual is not identically zero, a single input where it is nonzero is enough to disprove that the candidate solves the equation on the interval. If it is zero throughout the interval, the equation check is complete; the initial condition still needs its own evaluation.

Check Your Understanding

For each question, show the derivative, substitute into the equation, and check any initial condition separately.

  1. Does \(y=2e^{3x}\) solve \(y'=3y\) with \(y(0)=2\) on \(\mathbb{R}\)?
  2. Does \(y=x^2\) solve \(y'=2x\) with \(y(2)=5\) on \(\mathbb{R}\)?
  3. Does the constant function \(y=0\) solve \(y'=x+y\) on \(\mathbb{R}\)? Explain using the condition for a constant solution.
  4. For \(y=x^2\) and the equation \(y'=0\), at which of these inputs, \(x=0\) and \(x=1\), does the equation hold? Does the candidate solve the equation on \(\mathbb{R}\)?
  5. In your own words, why does satisfying an initial condition at one point not prove that a candidate solves a differential equation on an interval?

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: 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