9.2 Equations with Variables Separable
When the slope $\tfrac{dy}{dx}$ factors as $g(x)\,h(y)$, move every $y$ to the side of $dy$ and every $x$ to the side of $dx$, then integrate both sides. This one idea solves the laws of natural growth and decay, half-life problems and Newton's law of cooling.
A patient is given $500$ mg of a drug. Her liver and kidneys remove it at a rate proportional to the amount still in her blood: if $A$ mg remain after $t$ hours, then $\dfrac{dA}{dt}=-kA$ for some constant $k\gt0$. The doctor needs to know how much is left after $6$ hours, and when it falls below the effective level โ questions about $A$ itself, not its rate. The trick is to treat $\dfrac{dA}{dt}$ almost like a fraction: rewrite the equation as $\dfrac{dA}{A}=-k\,dt$, with everything about $A$ on the left and everything about $t$ on the right, and integrate each side with respect to its own variable. One line later, $\log A=-kt+C$, and the exponential law $A=500e^{-kt}$ drops out.
This section makes that trick honest โ it is the chain rule run backwards โ and shows exactly when it works: whenever the slope splits into a product of a function of $x$ alone and a function of $y$ alone. You will use it to model the growth of bacteria and money, the decay of medicines and radioactive isotopes (with the idea of a half-life), and the cooling of a cup of tea. Throughout, $\log$ means the natural logarithm $\log_e$, and the integrals come from Chapter 7 โ Integrals.
Separating the Variables
A first-order, first-degree differential equation $\dfrac{dy}{dx}=F(x,y)$ is said to have variables separable if $F$ can be written as a product $$F(x,y)=g(x)\,h(y)$$ of a function of $x$ alone and a function of $y$ alone. For example $\dfrac{dy}{dx}=xy+x=x(y+1)$ and $\dfrac{dy}{dx}=e^{x-y}=e^x\cdot e^{-y}$ are separable; $\dfrac{dy}{dx}=x+y$ and $\dfrac{dy}{dx}=\sin(xy)$ are not.
Let $g$ be continuous on an interval $I$ and let $h$ be continuous and never zero on an interval $J$. Let $G$ be an antiderivative of $g$ and $H$ an antiderivative of $\dfrac1h$. Then a differentiable function $y=\varphi(x)$ on $I$, with values in $J$, solves $$\dfrac{dy}{dx}=g(x)\,h(y)$$ if and only if $H(\varphi(x))=G(x)+C$ for some constant $C$. In the usual shorthand: $$\int\dfrac{dy}{h(y)}=\int g(x)\,dx+C.$$
Proof. By the chain rule, $\dfrac{d}{dx}\Big[H(\varphi(x))-G(x)\Big]=\dfrac{\varphi'(x)}{h(\varphi(x))}-g(x)$. This is zero on $I$ exactly when $\varphi'(x)=g(x)\,h(\varphi(x))$, i.e. when $\varphi$ solves the equation. And a function whose derivative is zero on an interval is constant there, so $H(\varphi(x))-G(x)=C$. $\blacksquare$
Lost solutions. If $h(c)=0$ for some number $c$, the constant function $y=c$ is also a solution ($y'=0=g(x)h(c)$). Dividing by $h(y)$ hides such solutions, so look for them separately.
- Write the equation as $\dfrac{dy}{dx}=g(x)\,h(y)$. (Factorise first: $xy+x=x(y+1)$, $e^{x+y}=e^xe^y$.)
- Separate: $\dfrac{dy}{h(y)}=g(x)\,dx$, noting any values with $h(y)=0$.
- Integrate both sides, adding one constant $C$ (on the $x$ side).
- Simplify; if possible solve for $y$. With logarithms, $\log|y|=G(x)+C$ gives $y=Ae^{G(x)}$ with $A=\pm e^C$; allowing $A=0$ restores the lost solution $y=0$.
- For a particular solution, substitute the initial condition to find $C$. Check by differentiating.
Natural Growth and Decay
Many quantities change at a rate proportional to their own size: a bacterial colony with twice as many cells produces twice as many new cells per hour; a sample with twice as many radioactive nuclei has twice as many decays per second; a bank balance under continuous compounding earns interest on the whole balance. Each obeys the same separable equation.
Let $k$ be a constant. If a quantity $N(t)$ satisfies $$\dfrac{dN}{dt}=kN,\qquad N(0)=N_0,$$ then $N(t)=N_0\,e^{kt}$ for all $t$. The quantity grows if $k\gt0$ and decays if $k\lt0$.
Proof. If $N_0=0$, the solution is $N=0$ (Theorem 9.1 says it is the only one). Otherwise separate: $\dfrac{dN}{N}=k\,dt$, so $\log|N|=kt+C$ and $N=Ae^{kt}$ (as in Example 3). Putting $t=0$ gives $A=N_0$. $\blacksquare$
For decay $N=N_0e^{-\lambda t}$ ($\lambda\gt0$), the half-life $T_{1/2}$ is the time for $N$ to fall to half its value. From $e^{-\lambda T_{1/2}}=\tfrac12$: $$T_{1/2}=\dfrac{\log2}{\lambda}.$$ For growth $N=N_0e^{kt}$ ($k\gt0$), the doubling time is $T_d=\dfrac{\log2}{k}$. Neither depends on $N_0$ or on when you start the clock: in every interval of length $T_{1/2}$ the amount halves again, so after $n$ half-lives a fraction $\left(\tfrac12\right)^n$ remains. ($\log2\approx0.6931$.)
Newton's Law of Cooling
A hot object in a cooler room loses heat at a rate roughly proportional to the temperature difference between it and the room โ the experimental law found by Newton. If $T(t)$ is the object's temperature and $T_s$ the constant room ("surroundings") temperature, then $\dfrac{dT}{dt}=-k(T-T_s)$ with $k\gt0$. The same equation, with $T\lt T_s$, describes a cold drink warming up.
If $\dfrac{dT}{dt}=-k(T-T_s)$, where $k\gt0$ and $T_s$ are constants, and $T(0)=T_0$, then $$T(t)=T_s+(T_0-T_s)\,e^{-kt}.$$ The gap $T-T_s$ decays exponentially, so $T\to T_s$ as $t\to\infty$, from above if $T_0\gt T_s$ and from below if $T_0\lt T_s$.
Proof. Put $u=T-T_s$; then $\dfrac{du}{dt}=\dfrac{dT}{dt}=-ku$, so by Theorem 9.3, $u=u_0e^{-kt}$ with $u_0=T_0-T_s$. $\blacksquare$
1. Separating a sum. $\dfrac{dy}{dx}=x+y$ is not separable; you cannot write $dy=x\,dx+y\,dx$ and integrate $y\,dx$ (since $y$ depends on $x$). Only a product $g(x)h(y)$ separates. (That equation is linear: Section 9.4.)
2. Two constants. Integrating both sides gives one constant, not two: $\int\frac{dy}{y}=\int2x\,dx$ gives $\log|y|=x^2+C$. Two constants $C_1,C_2$ always combine into one.
3. Dropping the modulus, or mishandling $e^{x^2+C}$. $\log|y|=x^2+C$ gives $y=Ae^{x^2}$, not $y=e^{x^2}+C$: the constant multiplies.
4. Losing constant solutions. Dividing by $h(y)$ assumes $h(y)\ne0$. Check whether $y=c$ with $h(c)=0$ is a solution (e.g. $y=0$ for $y'=2xy$; $y=\pm1$ for $y'=y^2-1$).
5. Applying the condition too late or too early. Find $C$ from the initial condition after integrating but before rearranging into a complicated form โ it is usually easiest in the line where $C$ first appears.
6. Cooling the temperature instead of the gap. In Newton's law it is $T-T_s$ that decays exponentially; $T$ itself tends to $T_s$, not to $0$.
Exercises
- 1 $\dfrac{dy}{dx}=\dfrac{x^2}{y^2}$
- 2 $\dfrac{dy}{dx}=\dfrac{1+x^2}{1+y}$, $y\ne-1$
- 3 $\dfrac{dy}{dx}=e^{x+y}$
- 4 $\dfrac{dy}{dx}=y\tan x$, $-\tfrac\pi2\lt x\lt\tfrac\pi2$
- 5 $\dfrac{dy}{dx}=\dfrac{\sqrt{1-y^2}}{\sqrt{1-x^2}}$, $|x|\lt1$, $|y|\lt1$
- 6 $(1+x)\,dy=(1+y)\,dx$
- 7 $\dfrac{dy}{dx}=y^2-1$ (use partial fractions; also find the constant solutions)
- 8 $y\dfrac{dy}{dx}=xe^x$
- 9 $\dfrac{dy}{dx}=\cos x\cos y$, $-\tfrac\pi2\lt y\lt\tfrac\pi2$
- 10 $\dfrac{dy}{dx}=\dfrac{2x+1}{3y^2+2y}$
- 1 $\dfrac{dy}{dx}=2x(y+1)$, $y(0)=0$
- 2 $\dfrac{dy}{dx}=y^2$, $y(0)=1$; on which interval containing $0$ is it valid?
- 3 $\sin y\,\dfrac{dy}{dx}=\cos x$, $y(0)=\dfrac\pi3$
- 4 $(1+x^2)\dfrac{dy}{dx}=1$, $y(1)=0$
- 5 $\dfrac{dy}{dx}=\dfrac yx$ ($x\gt0$), the curve through $(2,6)$
- 6 The curve through $(0,-2)$ whose slope at every point $(x,y)$ is $\dfrac xy$
- 7 $\dfrac{dy}{dx}=(2x-4)e^{-y}$, the curve through $(5,0)$
- 1 (Illustrative.) A town's population grows at a rate proportional to its size. It was $50\,000$ in 2010 and $60\,000$ in 2020. Predict the population in 2040, and find the doubling time.
- 2 Iodine-131, used to treat thyroid disease, has a half-life of about $8$ days. What percentage of a dose remains after $30$ days? When does only $1\%$ remain?
- 3 $\text{โน}\,20\,000$ is invested at $8\%$ per year compounded continuously, so $\dfrac{dP}{dt}=0.08P$ ($t$ in years). Find the amount after $10$ years and the time for the money to double.
- 4 (Illustrative.) A metal bar at $200^\circ\text{C}$ is left in a room at $30^\circ\text{C}$; after $5$ minutes it is at $150^\circ\text{C}$. Find its temperature after $15$ minutes and the time it takes to cool to $50^\circ\text{C}$.
- 5 (Illustrative.) A cold drink at $5^\circ\text{C}$ is carried into a room at $35^\circ\text{C}$. After $10$ minutes it is at $15^\circ\text{C}$. When will it reach $25^\circ\text{C}$?
- 6 (Illustrative.) Water drains from a tank so that its depth $h$ (cm) satisfies $\dfrac{dh}{dt}=-0.1\sqrt h$ ($t$ in seconds), with $h(0)=25$. Find $h(t)$, the depth after $40$ s, and the time to empty.
- 7 Prove that for $\dfrac{dN}{dt}=-\lambda N$ ($\lambda\gt0$) the time taken for $N$ to halve is the same whatever the starting amount and starting time.
- 8 (Illustrative.) A yeast culture doubles every $1.5$ hours. How long does it take to grow ten-fold?
How this is examined: Board papers ask for the general or particular solution of a separable equation (3 marks), and often set a case study on growth, decay or cooling. JEE hides a separable equation inside a word problem or asks for the value of the solution at a point.
E1. Board ยท 1 mark The general solution of $\dfrac{dy}{dx}=\dfrac xy$ is (A) $x^2-y^2=C$ (B) $x^2+y^2=C$ (C) $xy=C$ (D) $y=Cx$
E2. Board ยท 3 marks Find the particular solution of $\dfrac{dy}{dx}=(1+x^2)(1+y^2)$ given that $y=1$ when $x=0$.
E3. Board ยท Case study (Illustrative data.) A patient receives $500$ mg of an antibiotic. The body removes it at a rate proportional to the amount $A$ (mg) present, and $400$ mg remain after $1$ hour. (i) Write the differential equation and find $A(t)$. [2 marks] (ii) How much remains after $3$ hours? [1 mark] (iii) Find the half-life of the antibiotic. [1 mark]
E4. JEE Main Let $y=y(x)$, $y\gt0$, satisfy $y(1+x^2)\dfrac{dy}{dx}=x(1+y^2)$ with $y(0)=1$. Then $y(2)$ equals (A) $3$ (B) $\sqrt5$ (C) $2\sqrt2$ (D) $\sqrt3$
E5. JEE Main (Numerical value.) A radioactive substance decays at a rate proportional to the amount present, and $20\%$ of it decays in $10$ years. Find its half-life in years, to the nearest integer.
E6. JEE Advanced (One or more correct options.) Let $y(x)$ solve $\dfrac{dy}{dx}=y(1-y)$ with $y(0)=\tfrac12$. Which of the following are true? (A) $y(x)\to1$ as $x\to\infty$ (B) $y$ is strictly increasing on $\mathbb R$ (C) $y(\log3)=\tfrac34$ (D) $y(-x)=y(x)$ for all $x$
Research question. Does a cup of hot tea really cool according to Newton's law โ and does a lid, a steel tumbler or stirring change the constant $k$?
Why it matters. The same law is used to design heat sinks for phone processors, to plan how long vaccines stay cold in an insulated box during transport to rural clinics, to cool steel in factories, and in forensic science. The constant $k$ summarises how well a container conducts and loses heat.
What to do.
- Pour hot water or tea (about $80^\circ\text{C}$) into a ceramic mug. Record the room temperature $T_s$ and the water temperature every $2$ minutes for $30$ minutes with a kitchen or aquarium thermometer.
- In a spreadsheet compute $\log(T-T_s)$ for each reading and plot it against $t$. If Newton's law holds, the points lie close to a straight line of slope $-k$ (since $\log(T-T_s)=\log(T_0-T_s)-kt$).
- Fit the line, find $k$, and compare the model $T=T_s+(T_0-T_s)e^{-kt}$ with your readings.
- Repeat with a lid, or with a steel tumbler, and compare the values of $k$.
Tools: Thermometer, mug (and lid or tumbler), stopwatch, spreadsheet.
Hand in: Your data table, the plot of $\log(T-T_s)$ against $t$ with the fitted line, the values of $k$ (with units, per minute) for each container, and a short explanation of which container keeps tea hot longest and why.
Going further. Early readings often lie below the line, because evaporation from very hot water removes extra heat. Fit only the readings below $60^\circ\text{C}$ and see whether $k$ changes. Then predict how long the tea takes to cool to $45^\circ\text{C}$ and test the prediction.
๐งช Self-check quiz
Q1. Which equation has variables separable?
Q2. The general solution of $\dfrac{dy}{dx}=y$ is
Q3. A substance has a half-life of $5$ years. What fraction remains after $15$ years?
Q4. Under Newton's law of cooling, $\dfrac{dT}{dt}=-k(T-T_s)$, which statement is true?
Q5. Separating $\dfrac{dy}{dx}=y^2$ as $\dfrac{dy}{y^2}=dx$ gives $y=-\dfrac{1}{x+C}$. Which solution does this formula miss?