Tutorials › AP Calculus › Calculator Checks for Differential Equation Solutions

Calculator Strategy and Error Control · Tutorial 987 of 999

Calculator Checks for Differential Equation Solutions

Use selected calculator evaluations to check both the differential equation and the initial condition for a proposed explicit solution.

Intermediate 10 min read

What You'll Learn

  • Identify what must be checked for a proposed function to solve a differential equation on an interval.
  • Evaluate the candidate’s derivative and the equation’s right-hand side at selected inputs.
  • Check an initial condition separately from the differential equation.
  • Use numerical agreement to detect errors without treating a few checks as proof on an entire interval.
  • Recognize when a candidate passes the initial condition but fails the differential equation.

Why Check a Proposed Solution?

A differential equation relates an unknown function to one or more of its derivatives. In a problem, you may be given a proposed explicit function and asked whether it solves the equation and satisfies an initial condition. A calculator can help compare the two sides of the equation at selected inputs.

This is a useful way to catch a copied expression, a differentiation error, or a candidate that meets the initial condition but not the differential equation. The checks must be organized carefully: at each input, evaluate the candidate’s derivative and the right-hand side using the candidate’s function value. Then check the initial condition separately.

Key idea: A calculator check compares \(y_c'(x)\) with \(F(x,y_c(x))\) at a chosen input \(x\). The same candidate must also satisfy any stated initial condition.

What It Means to Be a Solution

Consider a first-order differential equation written as \(y'=F(x,y)\). Here \(F\) gives the right-hand side, and \(y\) is the unknown function. The candidate \(y_c\) is an explicit function proposed as a solution.

Definition: Let \(I\) be an interval and let \(F\) be defined on a domain \(D\) in the \(xy\)-plane. A differentiable function \(y_c\) is a solution of \(y'=F(x,y)\) on \(I\) if, for every \(x\in I\), the point \((x,y_c(x))\) belongs to \(D\) and $$ y_c'(x)=F(x,y_c(x)). $$

The domain requirement matters. It is not enough for the equation to make sense at some of the inputs in \(I\): the right-hand side must be defined at every point on the candidate’s graph over \(I\). The equality must also hold throughout that interval. A few successful calculator checks do not establish that it holds everywhere.

An initial condition specifies a value of the solution at a particular input, such as \(y(a)=b\). To satisfy that condition, the candidate must have \(a\) in its domain and \(y_c(a)=b\). This is a separate check from verifying the differential equation.

A Reliable Calculator Check

For a proposed solution, use this sequence. The derivative can come from differentiating the explicit function; a calculator can then evaluate both sides at the chosen inputs. Do not substitute \(y_c(x)\) into the right-hand side incorrectly: the right-hand side may depend on both \(x\) and \(y\).

1
Confirm the candidate is defined.
Check that the chosen input lies in the candidate’s domain and that the right-hand side is defined at \((x,y_c(x))\).
2
Find the derivative.
Differentiate \(y_c\) to obtain \(y_c'(x)\), taking care to retain all factors and signs.
3
Evaluate both sides.
At each selected input, calculate \(y_c'(x)\) and \(F(x,y_c(x))\), using the same input for both.
4
Check the initial condition.
Substitute the specified initial input into \(y_c\), then compare the result with the required initial value.

When calculator values are rounded, compare them at a consistent displayed precision and avoid interpreting a tiny rounding difference as a meaningful disagreement. When the expressions allow it, exact substitution is even clearer. In either case, record which input was tested and which quantities were compared.

Worked Example: Checking an Exponential Candidate

Worked Example: Checking an Exponential Candidate

Check whether \(y_c=e^x\) satisfies \(y'=y\) and the initial condition \(y(0)=1\). Use \(I=(-1,2)\) and test the equation at \(x=0\) and \(x=1\).

Step 1: Check the domain. The exponential function is defined for every real \(x\), and the right-hand side \(F(x,y)=y\) is defined for every real \(y\). Thus the equation is defined along the candidate on \(I\).

Step 2: Differentiate. Since \(y_c=e^x\), its derivative is \(y_c'=e^x\).

Step 3: Compare both sides at \(x=0\). The derivative side is \(y_c'(0)=e^0=1\). The right-hand side is \(y_c(0)=e^0=1\). The two values agree.

Step 4: Compare both sides at \(x=1\). The derivative side is \(y_c'(1)=e^1=e\), approximately \(2.71828\). The right-hand side is \(y_c(1)=e^1=e\), also approximately \(2.71828\). They agree at this input as well.

Step 5: Check the initial condition. \(y_c(0)=e^0=1\), which equals the required value. Thus the candidate satisfies the initial condition. In fact, the identity \(y_c'=e^x=y_c\) shows directly that it satisfies the differential equation throughout \(I\), not just at the two sampled inputs.

Check: Substituting the candidate into the equation gives \(e^x=e^x\) for every \(x\in I\); substituting \(x=0\) into the candidate gives \(1\), as required.

Why Selected Inputs Are Useful—and Limited

Suppose we define the residual of a candidate at \(x\) as the difference between the two sides: $$ R(x)=y_c'(x)-F(x,y_c(x)). $$

At a selected input, a calculator check finds the value of \(R(x)\). If the result is not zero, the candidate fails the equation at that input, so it cannot be a solution on an interval containing that input. If the result is zero, the candidate passes that particular check. To establish that it is a solution on the whole interval, the equality must hold at every input there, with the equation defined throughout.

This explains both the strength and the limit of the method. One failed check is enough to disprove a proposed solution on an interval containing that input. Several successful checks can build confidence and catch simple errors, but they do not show that the residual is zero at every other input. For example, the function \(R(x)=(x-0)(x-1)\) is zero at \(x=0\) and \(x=1\), but \(R(2)=2\). Agreement at two inputs alone cannot rule out a discrepancy elsewhere.

When a candidate has a simple derivative, use the calculator for accurate evaluations but also look for an algebraic identity that verifies the equation throughout the interval. The point of a numerical check is to test a proposal efficiently—not to replace the condition that defines a solution.

Worked Example: The Equation Holds but the Initial Condition Fails

Worked Example: The Equation Holds but the Initial Condition Fails

Consider the candidate \(y_c=x^2+2\) for the differential equation \(y'=2x\), with initial condition \(y(1)=2\). Check the equation at \(x=0\) and \(x=1\), then check the initial condition.

Step 1: Check the domain. The candidate and the right-hand side are defined for all real \(x\), so they are defined at both test inputs.

Step 2: Differentiate. \(y_c'=2x\).

Step 3: Compare at \(x=0\). The derivative side is \(y_c'(0)=2(0)=0\). The right-hand side is \(2(0)=0\). The values agree.

Step 4: Compare at \(x=1\). The derivative side is \(y_c'(1)=2(1)=2\). The right-hand side is \(2(1)=2\). These values agree too. Indeed, \(y_c'=2x\) throughout the real line, so the candidate solves the differential equation.

Step 5: Check the initial condition. \(y_c(1)=1^2+2=3\), but the required value is \(2\). The initial condition fails.

Conclusion and check: The candidate solves the differential equation but does not solve the initial-value problem. Substitution verifies the mismatch directly: at \(x=1\), the candidate gives \(3\ne 2\).

Worked Example: An Initial Condition Passes but the Equation Fails

Worked Example: An Initial Condition Passes but the Equation Fails

Test the candidate \(y_c=1+x\) for \(y'=y\) with \(y(0)=1\). Check the differential equation at \(x=0\) and \(x=1\).

Step 1: Check the domain. Both the candidate and \(F(x,y)=y\) are defined for all real inputs and values.

Step 2: Differentiate. \(y_c'=1\).

Step 3: Check the initial condition. \(y_c(0)=1+0=1\), so the initial condition is satisfied.

Step 4: Compare the equation’s sides at \(x=0\). \(y_c'(0)=1\). The right-hand side is \(y_c(0)=1\). The candidate passes this equation check.

Step 5: Compare at \(x=1\). The derivative side is \(y_c'(1)=1\). The right-hand side is \(y_c(1)=1+1=2\). Since \(1\ne2\), the candidate fails the differential equation at \(x=1\).

Conclusion and check: Satisfying the initial condition and passing one equation check are not enough. The candidate is not a solution on any interval containing \(x=1\). Substitution confirms the discrepancy: \(y_c'(1)=1\), while \(y_c(1)=2\).

Common Mistake: Checking Only the Initial Point

A frequent error is to verify the differential equation only at the initial input and conclude that the candidate is a solution. In the previous example, at \(x=0\) both sides equal \(1\), and the initial condition also holds. Yet at \(x=1\), the two sides are \(1\) and \(2\). The conclusion based on \(x=0\) alone would be wrong.

Correction: Check the initial condition at its specified input, and separately compare the two sides of the differential equation at multiple inputs. Treat any disagreement as a definite failure. Treat agreement at selected inputs as a limited check unless you also establish the equality throughout the interval.

Worked Example: Checking a Candidate with a Calculator

Worked Example: Checking a Candidate with a Calculator

Check \(y_c=3+e^{-2x}\) for \(y'=-2(y-3)\) and \(y(0)=4\). Evaluate the equation at \(x=0\) and \(x=0.5\).

Step 1: Check the domain. The exponential expression and the right-hand side are defined for all real \(x\) and \(y\).

Step 2: Differentiate. By the chain rule, \(y_c'=-2e^{-2x}\).

Step 3: Evaluate at \(x=0\). The derivative side is \(y_c'(0)=-2e^0=-2\). The candidate value is \(y_c(0)=3+e^0=4\). The right-hand side is \(-2(4-3)=-2(1)=-2\). The two sides agree.

Step 4: Evaluate at \(x=0.5\). Since \(-2(0.5)=-1\), the derivative side is \(y_c'(0.5)=-2e^{-1}\), approximately \(-0.73576\). The candidate value is \(y_c(0.5)=3+e^{-1}\), approximately \(3.36788\). The right-hand side is \(-2(3.36788-3)=-2(0.36788)\), approximately \(-0.73576\). The values agree to the displayed precision.

Step 5: Check the initial condition. \(y_c(0)=3+e^0=4\), as required.

Check: Direct substitution gives \(-2e^{-2x}=-2((3+e^{-2x})-3)=-2e^{-2x}\) for every real \(x\). The numerical checks agree with this identity, and the initial value is correct.

Using Checks Effectively

Choose inputs that make the candidate easy to evaluate when possible, but do not rely only on a single convenient point. Include the initial input for the initial-condition check, then choose at least one other input for the equation check. If a failure appears, repeat the arithmetic carefully to rule out an entry error; once the mismatch is confirmed, the proposed function does not solve the equation on an interval containing that input.

Keep these checks distinct:

  • Domain: Is the candidate defined at the input, and is the equation’s right-hand side defined at the corresponding point?
  • Differential equation: Does the candidate’s derivative match the right-hand side evaluated using the candidate’s value?
  • Initial condition: Does the candidate take the required value at the specified initial input?

A candidate must meet all applicable conditions to solve an initial-value problem. A calculator can make these comparisons quick and accurate, but the conclusion should match the evidence: a mismatch disproves the candidate on the relevant interval; selected matches are checks, not by themselves a verification over an entire interval.

Check Your Understanding

For each question, distinguish checking the differential equation from checking the initial condition.

  1. For \(y'=2x\) and \(y_c=x^2+1\), calculate both sides at \(x=2\). Does this check alone establish the equation on an interval?
  2. For \(y'=y\), \(y(0)=1\), and \(y_c=1+x\), which condition fails at \(x=1\)? Show both values being compared.
  3. What must be true about the domain of \(F(x,y_c(x))\) for \(y_c\) to solve \(y'=F(x,y)\) on an interval \(I\)?
  4. Why can one confirmed mismatch at an input disprove a candidate as a solution on an interval containing that input?
  5. For \(y'=-2(y-3)\) and \(y_c=3+e^{-2x}\), substitute the candidate into the right-hand side and compare it algebraically with \(y_c'\).

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