A-level Mathematics

8.7 Separable first-order differential equations — Learn

Prerequisites: integration by substitution and standard integrals from Sections 8.1 and 8.5; factorising algebraic expressions from Section 2.8.

By the end of this section you can: recognise a separable first-order differential equation; separate the variables and integrate both sides; find a general solution; and use an initial condition to find a particular solution.

1. Separating the variables

A differential equation is an equation involving a derivative. It is separable when it can be written with all the yy terms on one side and all the xx terms on the other:

dydx=f(x)g(y).\frac{dy}{dx} = f(x)g(y).

To solve it, divide by g(y)g(y) and integrate both sides with respect to xx:

∫1g(y)dydxdx=∫f(x)dx,\int \frac{1}{g(y)}\frac{dy}{dx}dx = \int f(x)dx,

which is usually written in the shorter form

∫1g(y)dy=∫f(x)dx.\int \frac{1}{g(y)}dy = \int f(x)dx.

Then integrate each side and add one constant of integration.

Example 1. Solve dydx=xy\dfrac{dy}{dx} = xy.

Divide by yy and integrate:

∫1ydy=∫xdx,\int \frac{1}{y}dy = \int xdx,

so

ln⁡∣y∣=x22+C.\ln|y| = \frac{x^2}{2} + C.

Raise ee to both sides. The constant CC becomes a multiplier A=eCA = e^C:

y=Aex2/2.y = Ae^{x^2/2}.

This is the general solution. Different values of AA give different curves in the family.

2. A constant of integration on each side

When you integrate both sides, a constant appears on each. Subtract one from the other to leave a single constant. In Example 1 the right-hand constant absorbs the left-hand one.

Example 2. Solve dydx=xy\dfrac{dy}{dx} = \dfrac{x}{y}.

Multiply both sides by yy and by dxdx:

ydy=xdx.ydy = xdx.

Integrate:

y22=x22+C.\frac{y^2}{2} = \frac{x^2}{2} + C.

Multiply by 22 and rename the constant K=2CK = 2C:

y2=x2+K.y^2 = x^2 + K.

Taking a square root gives y=±x2+Ky = \pm\sqrt{x^2 + K}. A particular solution keeps the sign fixed by the initial condition.

Example 3. Solve dydx=ex−y\dfrac{dy}{dx} = e^{x-y}.

Use the index law ex−y=exe−ye^{x-y} = e^x e^{-y}, then separate:

eydy=exdx.e^ydy = e^xdx.

Integrate:

ey=ex+C,y=ln⁡(ex+C).e^y = e^x + C, \qquad y = \ln(e^x + C).

The constant stays inside the logarithm because eye^y is the quantity that was integrated.

3. Particular solutions

An initial condition fixes the constant. It gives a value of yy at a value of xx, such as y=3y = 3 when x=0x = 0.

Example 4. Find the particular solution of dydx=2xy\dfrac{dy}{dx} = 2xy for which y=3y = 3 when x=0x = 0.

Separate and integrate:

∫1ydy=∫2xdx,ln⁡∣y∣=x2+C,y=Aex2.\int \frac{1}{y}dy = \int 2xdx, \qquad \ln|y| = x^2 + C, \qquad y = Ae^{x^2}.

Substitute x=0x = 0 and y=3y = 3: 3=Ae0=A3 = Ae^0 = A, so the particular solution is

y=3ex2.y = 3e^{x^2}.

4. Factorising before separating

Sometimes a common factor hides the separation. Factorise it out first.

Example 5. Solve dydx=xy−x\dfrac{dy}{dx} = xy - x.

Take out the common factor xx:

dydx=x(y−1).\frac{dy}{dx} = x(y - 1).

The equation is now separable. Divide by y−1y - 1:

∫1y−1dy=∫xdx,ln⁡∣y−1∣=x22+C.\int \frac{1}{y - 1}dy = \int xdx, \qquad \ln|y - 1| = \frac{x^2}{2} + C.

Exponentiate both sides:

y−1=Aex2/2,y=1+Aex2/2.y - 1 = Ae^{x^2/2}, \qquad y = 1 + Ae^{x^2/2}.

Watch out. Four mistakes are common.

Dividing by zero. When you divide by g(y)g(y), check whether g(y)=0g(y) = 0 gives a constant solution. For dydx=xy\dfrac{dy}{dx} = xy, the value y=0y = 0 is a solution, and it is included in y=Aex2/2y = Ae^{x^2/2} with A=0A = 0.

Forgetting to integrate both sides. After separating, both sides need an integral. Writing ln⁡∣y∣=x\ln|y| = x instead of ln⁡∣y∣=x22\ln|y| = \dfrac{x^2}{2} skips the integration.

Losing the sign of the constant. The constant of integration becomes a multiplier when you exponentiate. Write A=eCA = e^C so that AA can be positive or negative.

Not factorising first. An expression such as xy−xxy - x separates only after you take out xx. Re-check: substitute your answer back into the original equation and confirm both sides match.

5. Try it: the family of solutions

Predict first. The figure shows the family of solutions of dydx=ky\dfrac{dy}{dx} = ky for different starting values, with a slider for kk. Before you move the slider, predict what happens to the curves when kk changes from positive to negative. Write your prediction down.

Test. Move the slider for kk and watch the curves. Then move the starting value and watch which curve is highlighted.

Explain. Write two sentences. The first explains why every curve is an exponential. The second explains why a negative value of kk gives a curve that falls.

You should now be able to

Settings

Colour scheme

Applies to every book you read here.

Reading theme

Applies to every book you read here.