Checking Solutions
You can test whether a function solves a differential equation without solving anything: differentiate and substitute. This guide shows the check, explains families of solutions, and how initial conditions pick one.
A function is a solution of a differential equation if substituting it and its derivatives makes the equation true for every \(x\) in an interval. To check: compute the derivatives the equation needs, substitute into both sides, and simplify. Solutions usually come in families with a constant \(C\); an initial condition such as \(y(0) = 2\) selects the particular solution.
1The check
Is \(y = Ce^{3x}\) a solution of \(\dfrac{dy}{dx} = 3y\)?
- 1Left side: \(\dfrac{dy}{dx} = 3Ce^{3x}\).
- 2Right side: \(3y = 3Ce^{3x}\).
- 3The two sides are the same for every x and every constant C.
“Substituting \(y = Ce^{3x}\): \(\dfrac{dy}{dx} = 3Ce^{3x} = 3y\). The candidate satisfies the differential equation.”
Is \(y = x^3\) a solution of \(\dfrac{dy}{dx} = 3y\)?
- 1Left: \(3x^2\). Right: \(3x^3\).
- 2These are equal only at \(x = 0\) and \(x = 1\), not for all \(x\).
\(y = x^3\) makes both sides of \(y' = 3y\) equal at \(x = 1\) (3 = 3), but not at \(x = 2\) (12 ≠ 24). A solution must work at every \(x\).
Is \(y = e^{2x} + 1\) a solution of \(\dfrac{dy}{dx} = 2y\)?
- 1Left: \(\dfrac{dy}{dx} = 2e^{2x}\). Right: \(2y = 2e^{2x} + 2\).
- 2The two sides differ by 2 at every x.
Is \(y = x^2 + \dfrac{C}{x}\) a solution of \(y' + \dfrac{y}{x} = 3x\)?
- 1\(y' = 2x - \dfrac{C}{x^2}\). And \(\dfrac{y}{x} = x + \dfrac{C}{x^2}\).
- 2Add: \(2x - \dfrac{C}{x^2} + x + \dfrac{C}{x^2} = 3x\).
\(y = e^{2x}\) for \(y'' - 4y = 0\)
- 1\(y' = 2e^{2x}\), \(y'' = 4e^{2x}\).
- 2\(y'' - 4y = 4e^{2x} - 4e^{2x} = 0\).
Is \(x^2 + y^2 = 25\) a solution of \(\dfrac{dy}{dx} = -\dfrac{x}{y}\)?
- 1There is no \(y = \dots\) to substitute, so differentiate implicitly: \(2x + 2y\dfrac{dy}{dx} = 0\).
- 2Solve for the derivative: \(\dfrac{dy}{dx} = -\dfrac{x}{y}\), the right side of the equation.
Simplify the left side and the right side separately, then compare. Moving terms from one side to the other assumes the equation is already true, which is the thing you are checking.
2Families of solutions
In Worked Example 4 the C-terms cancel, so every member of the family works. If they did not cancel, only one value of \(C\) (or none) would work. Keep \(C\) as a letter through the check.
3Initial conditions
\(y = 3\sin x - 2\cos x\) for \(y'' + y = 0\), \(y(0) = -2\), \(y'(0) = 3\)
- 1\(y' = 3\cos x + 2\sin x\), \(y'' = -3\sin x + 2\cos x = -y\). So \(y'' + y = 0\). ✓
- 2\(y(0) = 0 - 2 = -2\). ✓ \(y'(0) = 3 + 0 = 3\). ✓
Many functions solve \(y'' + y = 0\) (any \(A\sin x + B\cos x\)). Only one meets both \(y(0) = -2\) and \(y'(0) = 3\). A particular solution needs both checks.
Quick reference
| Step | Action |
|---|---|
| 1 | Compute the derivatives that appear in the equation |
| 2 | Substitute into both sides |
| 3 | Simplify; the sides must match for all x |
| 4 | If an initial condition is given, check it too |
| Implicit candidate | Differentiate implicitly, then compare |