Math Core

Lesson 7.2 · Differential Equations

Verifying solutions

Before you learn to solve differential equations, you need to know what counts as a solution and how to check one. The check uses only the derivative rules you already know, and it is a skill the AP exam tests directly.

What it means to be a solution

Definition

Solution of a differential equation

A function y=f(x)y = f(x) is a solution of a differential equation on an interval if substituting ff and its derivatives into the equation produces a true statement for every xx in that interval.

So verifying a solution is a three-step routine:

  1. Differentiate the proposed function as many times as the equation requires.
  2. Substitute the function and its derivatives into both sides of the equation.
  3. Simplify each side separately and confirm the two sides are identical expressions.

The last step is the important one. You are not solving for xx; you are showing that the equation is an identity in xx.

Worked example: A first-order check

Show that y=3e2xy = 3e^{2x} is a solution of dydx=2y\dfrac{dy}{dx} = 2y.

Solution. Differentiate: dydx=6e2x\dfrac{dy}{dx} = 6e^{2x}.

Now compare the two sides.

Left side: dydx=6e2x.Right side: 2y=2(3e2x)=6e2x.\text{Left side: } \frac{dy}{dx} = 6e^{2x}. \qquad \text{Right side: } 2y = 2\left(3e^{2x}\right) = 6e^{2x}.

The sides agree for every xx, so y=3e2xy = 3e^{2x} is a solution.

General and particular solutions

In the example above, nothing special happened because of the 3. Any function y=Ce2xy = Ce^{2x} satisfies dydx=2y\dfrac{dy}{dx} = 2y, because dydx=2Ce2x=2y\dfrac{dy}{dx} = 2Ce^{2x} = 2y for every constant CC.

General vs. particular

  • The general solution of a first-order differential equation is a family of functions containing one arbitrary constant, such as y=Ce2xy = Ce^{2x}.
  • A particular solution is one specific member of the family. It is picked out by an initial condition like y(0)=5y(0) = 5, which tells you one point the solution passes through.

A differential equation together with an initial condition is called an initial value problem.

To find the particular solution, substitute the initial condition into the general solution and solve for the constant. For y=Ce2xy = Ce^{2x} with y(0)=5y(0) = 5: 5=Ce0=C5 = Ce^{0} = C, so the particular solution is y=5e2xy = 5e^{2x}.

Worked example: A family with a variable coefficient

Verify that y=x3+Cxy = x^3 + \dfrac{C}{x} is a solution of xdydx+y=4x3x\dfrac{dy}{dx} + y = 4x^3 for x≠0x \ne 0 and any constant CC. Then find the particular solution with y(1)=3y(1) = 3.

Solution. Write y=x3+Cx−1y = x^3 + Cx^{-1}, so

dydx=3x2−Cx−2=3x2−Cx2.\frac{dy}{dx} = 3x^2 - Cx^{-2} = 3x^2 - \frac{C}{x^2}.

Substitute into the left side:

xdydx+y=x(3x2−Cx2)+x3+Cx=3x3−Cx+x3+Cx=4x3.\begin{aligned} x\frac{dy}{dx} + y &= x\left(3x^2 - \frac{C}{x^2}\right) + x^3 + \frac{C}{x} \\ &= 3x^3 - \frac{C}{x} + x^3 + \frac{C}{x} \\ &= 4x^3. \end{aligned}

That matches the right side, so every function in the family is a solution. Now apply y(1)=3y(1) = 3:

3=13+C1⟹C=2.3 = 1^3 + \frac{C}{1} \quad\Longrightarrow\quad C = 2.

The particular solution is y=x3+2xy = x^3 + \dfrac{2}{x}, valid on x>0x > 0 (the interval containing the initial point x=1x = 1).

Second-order equations

The same routine works when the equation involves y′′y''; you just differentiate twice.

Worked example: Checking and finding exponential solutions

(a) Verify that y=sin⁡(3x)y = \sin(3x) is a solution of y′′+9y=0y'' + 9y = 0.

(b) Find all values of rr for which y=erxy = e^{rx} is a solution of y′′−y′−6y=0y'' - y' - 6y = 0.

Solution. (a) y′=3cos⁡(3x)y' = 3\cos(3x) and y′′=−9sin⁡(3x)y'' = -9\sin(3x). Then

y′′+9y=−9sin⁡(3x)+9sin⁡(3x)=0.y'' + 9y = -9\sin(3x) + 9\sin(3x) = 0.

The equation holds for every xx.

(b) For y=erxy = e^{rx}, y′=rerxy' = re^{rx} and y′′=r2erxy'' = r^2e^{rx}. Substitute:

r2erx−rerx−6erx=0⟹erx(r2−r−6)=0.r^2e^{rx} - re^{rx} - 6e^{rx} = 0 \quad\Longrightarrow\quad e^{rx}\left(r^2 - r - 6\right) = 0.

Since erxe^{rx} is never 0, we need r2−r−6=0r^2 - r - 6 = 0, so (r−3)(r+2)=0(r - 3)(r + 2) = 0. The values are r=3r = 3 and r=−2r = -2.

Working from a given family

On the AP exam you will often be handed a family of solutions and asked to pick out the member that fits a condition, or to confirm that a specific function is not a solution.

Worked example: Finding the constant

The general solution of dydx=x−y\dfrac{dy}{dx} = x - y is y=x−1+Ce−xy = x - 1 + Ce^{-x}. Find the particular solution with y(0)=2y(0) = 2, and verify it.

Solution. Substitute x=0x = 0, y=2y = 2:

2=0−1+Ce0=−1+C⟹C=3.2 = 0 - 1 + Ce^{0} = -1 + C \quad\Longrightarrow\quad C = 3.

So y=x−1+3e−xy = x - 1 + 3e^{-x}. Check: dydx=1−3e−x\dfrac{dy}{dx} = 1 - 3e^{-x}, while

x−y=x−(x−1+3e−x)=1−3e−x.x - y = x - \left(x - 1 + 3e^{-x}\right) = 1 - 3e^{-x}.

The two sides agree, and y(0)=−1+3=2y(0) = -1 + 3 = 2 as required.

Common mistake

Checking one point is not verifying a solution. If you plug in, say, x=0x = 0 and both sides happen to equal 6, that proves nothing about other values of xx. You must show the two sides are equal as expressions, for all xx in the interval. To show a function is not a solution, though, one value of xx where the sides disagree is enough.

Tip

When you substitute, simplify the left side and the right side separately, then compare. Moving terms back and forth across the equals sign makes it easy to assume what you are trying to prove.

Practice

Practice 1

Which function is a solution of the differential equation dydx=3y\dfrac{dy}{dx} = 3y?

Practice 2

For what value of kk is y=kx3y = kx^3 a solution of xdydx−y=10x3x\dfrac{dy}{dx} - y = 10x^3?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

Find all values of rr for which y=erxy = e^{rx} is a solution of y′′+2y′−8y=0y'' + 2y' - 8y = 0.

Separate answers with commas, e.g. 2, -5

Practice 4

The function y=cos⁡(2x)y = \cos(2x) is a solution of which differential equation?

Practice 5

The functions y=Ce2x−3y = Ce^{2x} - 3 are solutions of dydx=2y+6\dfrac{dy}{dx} = 2y + 6. Find the value of CC for the particular solution with y(0)=5y(0) = 5.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

The functions y=1x+Cy = \dfrac{1}{x + C} are solutions of dydx=−y2\dfrac{dy}{dx} = -y^2. Find CC so that y(1)=14y(1) = \dfrac14.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 7

Which of the following is not a solution of dydx=2yx\dfrac{dy}{dx} = \dfrac{2y}{x} for x>0x > 0?