Unit 7 · Topic 7.2 Beta

Verifying Solutions to Differential Equations

4 min read · freeNot practiced

A differential equation is a rule about rates. A solution to a differential equation is a function that obeys the rule. Before you learn to find solutions, you need to be able to check one. The good news: checking uses nothing new. You differentiate, substitute and compare.

What "solution" means here

In algebra, a solution of x2=9x^2 = 9 is a number. Here a solution is a whole function. The function y=3e2xy = 3e^{2x} is a solution of dydx=2y\frac{dy}{dx} = 2y because, for every xx, its slope equals twice its height:

dydx=6e2xand2y=2(3e2x)=6e2x.\frac{dy}{dx} = 6e^{2x} \qquad \text{and} \qquad 2y = 2\left(3e^{2x}\right) = 6e^{2x}.

The two sides are the same function of xx. That is what you must show: equality for every xx in an interval, not at one lucky point.

The three-step check

  1. Differentiate. Find every derivative the equation uses: y′y', and y″y'' if it appears.
  2. Substitute. Put the function and its derivatives into the left side and into the right side. Work on each side separately.
  3. Compare. Simplify both sides. If they are identical on an interval, the function is a solution there. If they differ anywhere in the interval, it is not.

Keep the two sides apart while you simplify. Writing a long chain like dydx\frac{dy}{dx}=1+Cex= 1 + Ce^x=x+1+Cex= x + 1 + Ce^x puts an equals sign between things that are not equal, a linkage error that costs points on the exam. Write "left side =…= \dots" and "right side =…= \dots", then compare.

Worked example 1. Show that y=x+1+2exy = x + 1 + 2e^x is a solution of dydx=y−x\frac{dy}{dx} = y - x.

Differentiate: dydx=1+2ex\frac{dy}{dx} = 1 + 2e^x. (The derivative of xx is 1, of the constant 1 is 0.)

Right side: y−xy - x=(x+1+2ex)−x= (x + 1 + 2e^x) - x=1= 1+2ex+ 2e^x.

Compare: both sides are 1+2ex1 + 2e^x for every xx. So the function is a solution on (−∞,∞)(-\infty, \infty).

Worked example 2. Is y=x2+1y = x^2 + 1 a solution of dydx=2yx\frac{dy}{dx} = \frac{2y}{x} for x>0x > 0?

Left side: dydx=2x\frac{dy}{dx} = 2x. Right side: 2(x2+1)x=2x+2x\frac{2(x^2 + 1)}{x} = 2x + \frac{2}{x}.

These differ by 2x\frac{2}{x}, which is never 0. So y=x2+1y = x^2 + 1 is not a solution. (Try y=x2y = x^2 instead: then the right side is 2x2x=2x\frac{2x^2}{x} = 2x, and it works.)

Equations with a second derivative

The same check works when y″y'' appears. For y=sin⁡(2x)y = \sin(2x): y′=2cos⁡(2x)y' = 2\cos(2x) and y″=−4sin⁡(2x)=−4yy'' = -4\sin(2x) = -4y. So y=sin⁡(2x)y = \sin(2x) is a solution of y″=−4yy'' = -4y.

Worked example 3. Find the positive constant kk for which y=ekxy = e^{kx} satisfies y″−y′−6y=0y'' - y' - 6y = 0.

Differentiate: y′=kekxy' = ke^{kx} and y″=k2ekxy'' = k^2e^{kx}.

Substitute: k2ekx−kekx−6ekxk^2e^{kx} - ke^{kx} - 6e^{kx}=ekx(k2−k−6)= e^{kx}\left(k^2 - k - 6\right).

Since ekxe^{kx} is never 0, the left side is 0 for every xx exactly when k2−k−6=0k^2 - k - 6 = 0, that is (k−3)(k+2)=0(k - 3)(k + 2) = 0. The positive value is k=3k = 3.

Many solutions, not one

An added constant has derivative 0. So if y=x2y = x^2 solves dydx=2x\frac{dy}{dx} = 2x, so do x2+5x^2 + 5 and x2−πx^2 - \pi: a differential equation usually has infinitely many solutions. The same happens with multiplied constants: every y=Ce3xy = Ce^{3x} satisfies dydx=3y\frac{dy}{dx} = 3y, because dydx=3Ce3x=3y\frac{dy}{dx} = 3Ce^{3x} = 3y.

Five curves y = x + 1 + Ce^x for C = −1, −0.5, 0, 0.5 and 1 on −3 ≤ x ≤ 2. The C = 0 curve is the line y = x + 1, drawn in crimson. At x = 0.5 each curve carries a short black segment whose slope is y − 0.5, the value of y − x there, showing that every curve satisfies dy/dx = y − x.
Figure 1. Five members of the family y=x+1+Cexy = x + 1 + Ce^x. All of them satisfy dydx=y−x\frac{dy}{dx} = y - x; at x=0.5x = 0.5 each one's slope equals y−xy - x at that point. LevlPrep original diagram.

Picking one member of the family needs one more fact, such as a point the graph passes through. That comes in a later topic.

Solutions live on intervals

A solution must be differentiable wherever you claim it works. The function y=1xy = \frac{1}{x} satisfies dydx=−y2\frac{dy}{dx} = -y^2, since −1x2=−(1x)2-\frac{1}{x^2} = -\left(\frac{1}{x}\right)^2. But it is undefined at x=0x = 0, so it is a solution on x>0x > 0 and, separately, on x<0x < 0. When you state that a function is a solution, name the interval.

Common slips

  • Checking only one value of xx. Agreement at one point proves nothing.
  • Dropping a derivative: the derivative of xx is 1, and the chain rule factor in e3xe^{3x} is 3.
  • Comparing with the wrong side: in xdydx=2yx\frac{dy}{dx} = 2y the left side includes the factor xx.
  • Chaining unequal expressions with == instead of simplifying each side on its own.

Spot a mistake on this page?