Calculus · Grade 12 and undergraduate

Separable Differential Equations and Exponential Models

Quick answer

A differential equation is separable when its right side factors as a function of x times a function of y. Move every y to one side and every x to the other, integrate both sides, and solve for y, using an initial condition to fix the constant. The most important case is dy/dt = ky, whose solutions are y = y₀e^(kt): exponential growth when k > 0 and decay when k < 0, with a fixed doubling time or half-life. Newton's law of cooling separates the same way.

What you'll learn

  • Recognize and solve separable differential equations
  • Find particular solutions from initial conditions
  • Model exponential growth and decay with dy/dt = ky
  • Solve problems about half-life, doubling time and cooling

Separating the variables

The equation dydx=2xy\tfrac{dy}{dx} = 2xy has a right side that factors into an xx part and a yy part. Such an equation is separable. Divide by the yy part and multiply by dxdx, so each variable has its own side:

dyy=2x dx\frac{dy}{y} = 2x\,dx

Integrate both sides:

∫dyy=∫2x dx⟹ln⁡∣y∣=x2+C\int \frac{dy}{y} = \int 2x\,dx \quad\Longrightarrow\quad \ln\lvert y \rvert = x^2 + C

and solve for yy: ∣y∣=ex2+C=eCex2\lvert y \rvert = e^{x^2 + C} = e^C e^{x^2}, so y=Aex2y = Ae^{x^2}, with AA any constant.

Why separating is legitimate

Moving dxdx around looks like treating dydx\tfrac{dy}{dx} as a fraction. What is really happening is the chain rule.

Suppose y(x)y(x) solves dydx=g(x) h(y)\tfrac{dy}{dx} = g(x)\,h(y). Let HH be an antiderivative of 1h\tfrac{1}{h} and GG one of gg. By the chain rule,

ddxH(y(x))=1h(y)⋅dydx=g(x)=ddxG(x)\frac{d}{dx} H\big(y(x)\big) = \frac{1}{h(y)} \cdot \frac{dy}{dx} = g(x) = \frac{d}{dx} G(x)

Two functions with the same derivative differ by a constant, so H(y)=G(x)+CH(y) = G(x) + C — exactly what integrating both sides produced. Separation of variables is the chain rule applied to an unknown solution.

Exponential growth and decay

When a quantity changes at a rate proportional to its size,

dydt=ky⟹y=y0ekt\frac{dy}{dt} = ky \quad\Longrightarrow\quad y = y_0 e^{kt}

where y0=y(0)y_0 = y(0). Separating gives ln⁡∣y∣=kt+C\ln\lvert y \rvert = kt + C, and the initial value fixes the constant. For k>0k > 0 this is growth, with a fixed doubling time ln⁡2k\tfrac{\ln 2}{k}. For k<0k < 0 it is decay, with a fixed half-life ln⁡2∣k∣\tfrac{\ln 2}{\lvert k \rvert}.

The half-life is the same whatever amount is left. Each 5-year step below halves the amount, from 100100 to 5050 and from 12.512.5 to 6.256.25 alike.

Every 5 years, half of what is left decays An exponential decay curve starting at 100 at time 0. Dots mark 50 at 5 years, 25 at 10 years, 12.5 at 15 years and 6.25 at 20 years: each 5-year step halves the amount. 510152020406080120ty 100 50 25 12.5 6.25
  • y = 100 · (1/2)^(t/5)
Every 5 years, half of what is left decays

Newton’s law of cooling, dTdt=−k(T−Troom)\tfrac{dT}{dt} = -k(T - T_{\text{room}}), separates the same way and gives T=Troom+(T0−Troom)e−ktT = T_{\text{room}} + (T_0 - T_{\text{room}})e^{-kt}: the difference from room temperature decays exponentially.

Worked examples

Common mistakes

Practice problems

  1. Solve dydx=3y\tfrac{dy}{dx} = 3y with y(0)=4y(0) = 4.

    Answer

    y=4e3xy = 4e^{3x}

    Full solution

    It has the form dydx=ky\tfrac{dy}{dx} = ky with k=3k = 3 and y0=4y_0 = 4.

  2. Find the general solution of dydx=x2y2\tfrac{dy}{dx} = \tfrac{x^2}{y^2}.

    Answer

    y=x3+C3y = \sqrt[3]{x^3 + C}

    Full solution

    y2 dy=x2 dxy^2\,dy = x^2\,dx, so y33=x33+C1\tfrac{y^3}{3} = \tfrac{x^3}{3} + C_1 and y3=x3+Cy^3 = x^3 + C.

  3. Solve dydx=ycos⁡x\tfrac{dy}{dx} = y\cos x with y(0)=2y(0) = 2.

    Answer

    y=2esin⁡xy = 2e^{\sin x}

    Full solution

    dyy=cos⁡x dx\tfrac{dy}{y} = \cos x\,dx gives ln⁡∣y∣=sin⁡x+C\ln\lvert y \rvert = \sin x + C, so y=Aesin⁡xy = Ae^{\sin x}, and y(0)=A=2y(0) = A = 2.

  4. Solve dydx=ex−y\tfrac{dy}{dx} = e^{x - y} with y(0)=0y(0) = 0.

    Answer

    y=xy = x

    Full solution

    ex−y=exe−ye^{x - y} = e^x e^{-y}, so ey dy=ex dxe^y\,dy = e^x\,dx. Then ey=ex+Ce^y = e^x + C, and y(0)=0y(0) = 0 gives 1=1+C1 = 1 + C, so C=0C = 0 and y=xy = x.

  5. A substance decays with half-life 88 days. Find kk in y=y0ekty = y_0 e^{kt}.

    Answer

    k=−ln⁡28≈−0.0866k = -\tfrac{\ln 2}{8} \approx -0.0866 per day

    Full solution

    12=e8k\tfrac{1}{2} = e^{8k} gives 8k=−ln⁡28k = -\ln 2.

  6. A bacteria culture starts with 500500 cells and triples every 22 hours. How many cells after 55 hours?

    Answer

    About 77947794

    Full solution

    y=500⋅3t/2y = 500 \cdot 3^{t/2}, so y(5)=500⋅32.5≈7794y(5) = 500 \cdot 3^{2.5} \approx 7794.

  7. Coffee at 85°85°C sits in a 25°25°C room, with k=0.05k = 0.05 per minute. What is its temperature after 1010 minutes?

    Answer

    About 61.4°61.4°C

    Full solution

    T=25+60e−0.05⋅10=25+60e−0.5≈25+36.4=61.4T = 25 + 60e^{-0.05 \cdot 10} = 25 + 60e^{-0.5} \approx 25 + 36.4 = 61.4.

  8. Is dydx=xy+x\tfrac{dy}{dx} = xy + x separable? If so, solve it.

    Answer

    Yes: y=Aex2/2−1y = Ae^{x^2/2} - 1

    Full solution

    xy+x=x(y+1)xy + x = x(y + 1). Then dyy+1=x dx\tfrac{dy}{y + 1} = x\,dx, so ln⁡∣y+1∣=x22+C\ln\lvert y + 1 \rvert = \tfrac{x^2}{2} + C and y+1=Aex2/2y + 1 = Ae^{x^2/2}.

  9. How long does an investment growing continuously at 7%7\% a year take to double?

    Answer

    About 9.99.9 years

    Full solution

    t=ln⁡20.07≈9.90t = \tfrac{\ln 2}{0.07} \approx 9.90.

  10. A student solves dydx=2y\tfrac{dy}{dx} = 2y, y(0)=3y(0) = 3 as ln⁡y=2x\ln y = 2x, then y=e2x+3y = e^{2x} + 3. What went wrong?

    Hint

    Where should the constant go, and when?

    Answer

    The constant was dropped at integration and added at the end instead. The solution is y=3e2xy = 3e^{2x}.

    Full solution

    Integrating gives ln⁡∣y∣=2x+C\ln\lvert y \rvert = 2x + C, so y=Ae2xy = Ae^{2x}. The initial condition gives A=3A = 3.

    The student’s function has y(0)=4y(0) = 4 and does not satisfy y′=2yy' = 2y: its derivative is 2e2x2e^{2x}, but 2y=2e2x+62y = 2e^{2x} + 6.

Frequently asked questions

What is a separable differential equation?

One that can be written dy/dx = g(x) h(y), so that all the y's can be moved to one side and all the x's to the other.

How do I solve a separable equation?

Write dy/h(y) = g(x) dx, integrate both sides, add one constant, and solve for y. Use an initial condition to find the constant.

What is the solution of dy/dt = ky?

y = y₀e^(kt), where y₀ is the value at t = 0. It grows when k > 0 and decays when k < 0.

How are half-life and k related?

For decay y₀e^(kt), the half-life is ln 2 / |k|: the time for the amount to fall to half, whatever amount you start with.

Why is only one constant needed?

Constants from both sides can be combined into one: ∫ dy/h(y) + C₁ = ∫ g(x) dx + C₂ is the same as one equation with C = C₂ − C₁.

What to learn next