Verifying Solutions to Differential Equations
A differential equation is an equation that links a function with its derivatives, like y′ = 2y. To verify a solution of a differential equation, find the derivatives the equation uses, substitute them and the function into both sides, and simplify. If the two sides are equal for every x, the function is a solution.
Before this lesson: Higher-Order Derivatives, Chain Rule and Derivatives of Exponential Functions
What a differential equation says
An ordinary equation like x² = 9 has numbers as solutions. A differential equation has functions as solutions. The equation y′ = 2y says: find a function whose slope is always twice its height.
Differential equations describe change: a population that grows in proportion to its size, a hot drink cooling toward room temperature, a spring bouncing. Solving one can be hard, but checking a proposed solution only takes derivatives and algebra.
How to verify a solution
- Find each derivative that appears in the equation (y′, y″, …).
- Substitute y and its derivatives into the left side and the right side.
- Simplify both sides. If they match for every x in the domain, y is a solution. If not, it isn’t.
- For an initial value problem, also check the given value, such as y(0) = 3.
| Term | Meaning |
|---|---|
| Order | The highest derivative in the equation (y′ is first order, y″ is second order) |
| General solution | A family of solutions with constants, like y = Ce²ˣ |
| Particular solution | One member of the family, with the constants chosen |
| Initial condition | A given value, like y(0) = 3, that picks the particular solution |
Verifying solutions examples
Example 1: A growth equation
Show that y = 3e^{2x} is a solution of y′ = 2y.
y' = 3e^{2x}\cdot 2 = 6e^{2x}Differentiate with the chain rule.
\text{Right side: } 2y = 2\cdot 3e^{2x} = 6e^{2x}Substitute y into the right side.
6e^{2x} = 6e^{2x}Compare the two sides.
Answer: the sides match for every x, so y = 3e^{2x} is a solution.
Example 2: A family of solutions and an initial condition
Show that y = Ce^{-x} + x - 1 solves y′ + y = x for any constant C. Then find the solution with y(0) = 3.
y' = -Ce^{-x} + 1Differentiate; the derivative of x − 1 is 1.
y' + y = (-Ce^{-x} + 1) + (Ce^{-x} + x - 1)Substitute into the left side.
= x
The Ce⁻ˣ terms cancel, and so do 1 and −1.
y(0) = Ce^{0} + 0 - 1 = C - 1Use the initial condition; e⁰ = 1.
C - 1 = 3 \Rightarrow C = 4
Set it equal to 3 and add 1.
Answer: every function in the family is a solution, and the particular solution is y = 4e^{-x} + x - 1.
Example 3: A second-order equation
Show that y = 2\sin 3x - \cos 3x is a solution of y″ + 9y = 0.
y' = 6\cos 3x + 3\sin 3x
Chain rule on each term (see derivatives of trig functions).
y'' = -18\sin 3x + 9\cos 3x
Differentiate again.
9y = 18\sin 3x - 9\cos 3x
Multiply y by 9.
y'' + 9y = (-18 + 18)\sin 3x + (9 - 9)\cos 3x = 0
Add and combine like terms.
Answer: y″ + 9y = 0 for every x, so the function is a solution.
Example 4: A function that fails
Which of y = x² and y = x³ is a solution of xy′ = 2y?
y = x^2: \; xy' = x(2x) = 2x^2, \; 2y = 2x^2
Test the first function.
2x^2 = 2x^2
The sides match.
y = x^3: \; xy' = x(3x^2) = 3x^3, \; 2y = 2x^3
Test the second function.
3x^3 \ne 2x^3
These differ whenever x ≠ 0.
Answer: y = x² is a solution, but y = x³ is not. One point where the sides agree (x = 0) is not enough.
Example 5: A cooling cup of coffee
A cup of coffee cools in a 20°C room. Its temperature after t minutes is modeled by T(t) = 20 + 70e^{-0.1t}. Show that T solves dT/dt = −0.1(T − 20) with T(0) = 90.
\dfrac{dT}{dt} = 70e^{-0.1t}\cdot(-0.1) = -7e^{-0.1t}Differentiate; the derivative of 20 is 0.
-0.1(T - 20) = -0.1(70e^{-0.1t}) = -7e^{-0.1t}Substitute T into the right side.
-7e^{-0.1t} = -7e^{-0.1t}The sides match.
T(0) = 20 + 70e^{0} = 90Check the initial condition.
Answer: T(t) solves the equation and starts at 90°C. The equation says the coffee cools faster when it is much hotter than the room.
Common mistakes
| Mistake | Example of the error | Fix |
|---|---|---|
| Checking only one point | y = x³ works in xy′ = 2y at x = 0, so it’s a solution | The sides must match for every x, not just one. |
| Missing the chain rule | (3e²ˣ)′ = 3e²ˣ | (3e²ˣ)′ = 6e²ˣ. |
| Substituting into one side only | Finding y′ and stopping | Substitute into both sides and compare. |
| Forgetting the initial condition | Showing y = Ce⁻ˣ + x − 1 works, then stopping | For an initial value problem, also solve for C. |
| Confusing order and degree | Calling y″ + (y′)³ = 0 third order | Order is the highest derivative: this is second order. |
Related methods
Picturing solutions
Even without a formula, a differential equation tells you the slope at every point. Drawing those slopes gives a slope field, the next lesson.
Finding solutions
Later in this unit you’ll solve equations like dy/dx = ky directly by separating the variables. Verifying is the way to check those answers.
Guess-and-check with a parameter
To find which exponentials solve an equation like y″ + y′ − 6y = 0, try y = e^(kx) and solve for k. Practice problem 9 does this.
Practice problems
Decide whether each function is a solution of the differential equation. Show your work.
- y = 5e^{-3x}; y′ = −3y
- y = x³ + C; y′ = 3x²
- y = e^{x} + e^{-x}; y″ = y
- y = cos 2x; y″ + 4y = 0
- y = sin x; y″ + 4y = 0
- y = Cx²; xy′ = 2y. Then find the solution with y(1) = 5.
- y = \dfrac{1}{x + C}; y′ = −y². Then find the solution with y(0) = 1/2.
- Which of e²ˣ, e³ˣ and eˣ solve y″ − 5y′ + 6y = 0?
- Find every k so that y = e^{kx} solves y″ + y′ − 6y = 0.
- A town’s population is P(t) = 500e^{0.04t}. Show it solves dP/dt = 0.04P with P(0) = 500, and find P(10).
Show answers
1.
y' = 5e^{-3x}\cdot(-3) = -15e^{-3x}Chain rule.
-3y = -15e^{-3x}Right side.
Answer: yes, the sides match
2.
y' = 3x^2
The constant’s derivative is 0.
Answer: yes, for every C
3.
y' = e^{x} - e^{-x}, \; y'' = e^{x} + e^{-x}Differentiate twice.
y'' = e^{x} + e^{-x} = yCompare.
Answer: yes
4.
y' = -2\sin 2x, \; y'' = -4\cos 2x
Differentiate twice.
y'' + 4y = -4\cos 2x + 4\cos 2x = 0
Substitute and add.
Answer: yes
5.
y'' = -\sin x
Differentiate twice.
y'' + 4y = -\sin x + 4\sin x = 3\sin x
Substitute and add.
3\sin x \ne 0
It is not 0 for most x.
Answer: no
6.
xy' = x(2Cx) = 2Cx^2 = 2y
Substitute y′ = 2Cx.
C(1)^2 = 5 \Rightarrow C = 5
Use y(1) = 5.
Answer: yes; the particular solution is y = 5x²
7.
y' = -\dfrac{1}{(x + C)^2} = -y^2Write y = (x + C)⁻¹ and use the power and chain rules.
\dfrac{1}{0 + C} = \dfrac{1}{2} \Rightarrow C = 2Use y(0) = 1/2.
Answer: yes; the particular solution is y = 1/(x + 2)
8.
y = e^{rx}: \; y'' - 5y' + 6y = (r^2 - 5r + 6)e^{rx}Each derivative brings down a factor of r.
r = 2: \; 4 - 10 + 6 = 0; \; r = 3: \; 9 - 15 + 6 = 0
Test 2 and 3.
r = 1: \; 1 - 5 + 6 = 2 \ne 0
Test 1.
Answer: e²ˣ and e³ˣ are solutions; eˣ is not
9.
(k^2 + k - 6)e^{kx} = 0Substitute y′ = ke^(kx) and y″ = k²e^(kx).
k^2 + k - 6 = 0
e^(kx) is never 0, so divide it out.
(k + 3)(k - 2) = 0
Factor the trinomial (see factoring trinomials).
k = -3 \text{ or } k = 2Set each factor equal to 0.
Answer: k = 2 or k = −3
10.
\dfrac{dP}{dt} = 500e^{0.04t}(0.04) = 0.04PChain rule.
P(0) = 500e^{0} = 500Check the initial value.
P(10) = 500e^{0.4} \approx 745.9Substitute t = 10.
Answer: yes; about 746 people after 10 years
Verifying solutions FAQ
What is a solution to a differential equation?
It is a function that makes the equation true for every x in its domain when you substitute it and its derivatives.
How do you check if a function is a solution to a differential equation?
Find the derivatives the equation needs, substitute everything into both sides, and simplify. Equal sides for every x mean it is a solution.
What is the difference between a general and a particular solution?
A general solution has arbitrary constants and describes a whole family of curves. A particular solution has the constants fixed, usually by an initial condition.
What is the order of a differential equation?
The order is the highest derivative that appears. For example, y″ + 9y = 0 is second order.
Summary
- A differential equation links a function with its derivatives; its solutions are functions.
- To verify: differentiate, substitute into both sides and simplify.
- The sides must match for every x, not just one point.
- A general solution has constants; an initial condition picks a particular solution.
- The order is the highest derivative in the equation.
Previous lesson: Center of Mass
Next lesson: Slope Fields
Back to the Calculus 2 Index