Chapter 7 · Introduction to Differential Equations
7.3 Separable Equations
When the rate splits into an $x$-part times a $y$-part, move every $y$ to one side, every $x$ to the other, and integrate. This one method handles decay, cooling, mixing and dosing models.
A cup of coffee left on a desk, a body of water slowly cleaned by fresh inflow, the carbon-14 in a piece of ancient wood and an antibiotic in a patient's bloodstream all change in the same way: how fast the quantity changes depends on how much of it there is right now. Written as mathematics, each one is a differential equation in which the rate $dy/dt$ is a simple expression in $y$ (and perhaps $t$). In Sections 7.1 and 7.2 we described such equations and approximated their solutions with direction fields and Euler's method. In this section we find many of them exactly.
The key observation is that for a large family of equations the right-hand side splits into a factor that depends only on $x$ times a factor that depends only on $y$. For these separable equations we can collect all the $y$'s on one side and all the $x$'s on the other, and reduce the whole problem to two ordinary integrals from Calculus I and Chapter 5. The method is short, but it comes with one trap (dividing by zero), and it produces answers in two possible forms (implicit and explicit). Both are covered below, followed by four of the most widely used models in science and engineering.
A first-order differential equation is separable if it can be written in the form
$$\frac{dy}{dx}=g(x)\,h(y),$$
where $g$ is a function of $x$ alone and $h$ is a function of $y$ alone. (Either factor may be a constant.)
Separability is about the form of the right-hand side, not the letters used. You may have to factor, use exponent laws or tidy up before the product structure appears.
🧭 Is it separable? — the factor test
Try to rewrite the right-hand side as (something in $x$) × (something in $y$). Common tools: factor out a common bracket, use $e^{a+b}=e^ae^b$, and divide through by a coefficient.
Not separable ✗$y'=x+y$ — a sum that cannot be factored
Not separable ✗$y'=\sin(xy)$ — $x$ and $y$ are locked inside one function
A useful warning sign: if the right-hand side is a sum of an $x$-term and a $y$-term that share no common factor (such as $x^2+y^2$), the equation is not separable.
The Method of Separation of Variables
Suppose $\dfrac{dy}{dx}=g(x)h(y)$ and $h(y)\ne0$. Dividing by $h(y)$ gives $\dfrac{1}{h(y)}\dfrac{dy}{dx}=g(x)$. Let $H$ be an antiderivative of $1/h$ and $G$ an antiderivative of $g$. By the chain rule,
$$\frac{d}{dx}\Big[H\big(y(x)\big)\Big]=H^\prime\big(y(x)\big)\,y^\prime(x)=\frac{1}{h(y)}\frac{dy}{dx}=g(x)=G^\prime(x),$$
so $H(y(x))$ and $G(x)$ have the same derivative and therefore differ by a constant: $H(y)=G(x)+C$. In practice we write this compactly by "multiplying through by $dx$":
$$\frac{dy}{h(y)}=g(x)\,dx\qquad\Longrightarrow\qquad\int\frac{dy}{h(y)}=\int g(x)\,dx.$$
The chain-rule argument is what makes this shorthand legitimate.
📐 Theorem 7.5 — Separation of variables
Let $g$ be continuous on an open interval $I$ and let $h$ be continuous on an open interval $J$ with $h(y)\ne0$ for every $y$ in $J$. Let $G$ be an antiderivative of $g$ on $I$ and $H$ an antiderivative of $1/h$ on $J$. Then a differentiable function $y=y(x)$ on $I$ with values in $J$ solves
$$\frac{dy}{dx}=g(x)\,h(y)$$
if and only if $$H\big(y(x)\big)=G(x)+C\quad\text{for some constant }C.$$
In addition, for every number $c$ with $h(c)=0$, the constant function $y\equiv c$ is a solution (an equilibrium solution). These constant solutions are not covered by the formula above and must be checked separately.
🧭 Problem-solving strategy — solving a separable equation
Find the equilibrium solutions first. Solve $h(y)=0$; each root $c$ gives a constant solution $y\equiv c$.
Separate. For $h(y)\ne0$ write $\dfrac{dy}{h(y)}=g(x)\,dx$.
Integrate both sides. Put a single constant $C$ on one side only.
Use the initial condition (if there is one) to find $C$. It is usually easiest to do this before solving for $y$.
Solve for $y$ if you can (explicit solution). If not, leave the answer as an equation linking $x$ and $y$ (implicit solution).
Check by substituting back into the differential equation, and state the interval on which the solution is valid.
✏️ Example 1 — Separating, and the solution that division hides
Find all solutions of $\dfrac{dy}{dx}=xy^2$, then solve the initial-value problem with $y(0)=1$ and state the largest interval on which that solution is valid.
💡 Show solution▶
Equilibria Here $g(x)=x$ and $h(y)=y^2$. Since $h(0)=0$, the constant function $y\equiv0$ is a solution: $y^\prime=0$ and $xy^2=0$. ✓
Separate For $y\ne0$: $$\frac{dy}{y^2}=x\,dx\ \Longrightarrow\ \int y^{-2}\,dy=\int x\,dx\ \Longrightarrow\ -\frac1y=\frac{x^2}{2}+C.$$ Solving for $y$: $$y=\frac{-1}{\tfrac12x^2+C}=\frac{-2}{x^2+2C}.$$ So the solutions are $y=\dfrac{-2}{x^2+K}$ for any constant $K$ (writing $K=2C$), together with $y\equiv0$, which no value of $K$ produces.
Initial value $y(0)=1$ gives $-\dfrac11=0+C$, so $C=-1$ and $$y=\frac{-1}{\tfrac12x^2-1}=\frac{2}{2-x^2}.$$
Interval The formula breaks down where $x^2=2$. The solution must be differentiable on an interval containing the initial point $x=0$, so it is valid on $\left(-\sqrt2,\sqrt2\right)$. As $x\to\sqrt2^{-}$, $y\to+\infty$: the solution "blows up" in finite time even though the equation looks harmless.
Check $y=2\left(2-x^2\right)^{-1}$ gives $y^\prime=2\cdot2x\left(2-x^2\right)^{-2}=\dfrac{4x}{\left(2-x^2\right)^2}$, and $xy^2=x\cdot\dfrac{4}{\left(2-x^2\right)^2}$. ✓ Numerically, $y(1)=2$, and an RK4 numerical solver started at $y(0)=1$ also gives $y(1)=2.000000$.
⚠️ Common mistakes when separating
1. Dividing by zero loses solutions. Dividing by $h(y)$ is only allowed where $h(y)\ne0$. Every root of $h$ is a constant solution that the integration step silently throws away (like $y\equiv0$ in Example 1). Always find them first. In an initial-value problem whose initial value is itself a root, such as $y^\prime=xy^2$ with $y(0)=0$, the answer is the equilibrium $y\equiv0$, and the separated formula cannot produce it.
2. One constant, placed before you rearrange. Writing $+C_1$ on the left and $+C_2$ on the right is harmless but pointless: they combine into one constant. What does go wrong is adding $C$ at the very end, after you have exponentiated or inverted. Then $\ln|y|=kx+C$ becomes $y=e^{kx}+C$, which is wrong. The correct result is $|y|=e^{C}e^{kx}$.
3. Renaming constants. From $|y|=e^Ce^{kx}$ we get $y=\pm e^Ce^{kx}=Ae^{kx}$, where $A=\pm e^C$ can be any non-zero number. Allowing $A=0$ as well puts the lost equilibrium $y\equiv0$ back in. This is why many general solutions are written with a "free" constant $A$ rather than $e^C$.
4. $x$'s and $y$'s must be completely separated before integrating. $\displaystyle\int y\,dx$ makes no sense when $y$ is the unknown function of $x$.
Implicit and explicit solutions
The relation $H(y)=G(x)+C$ always defines the solution, but it cannot always be solved for $y$. When we can solve it, we have an explicit solution $y=f(x)$. When we cannot, or it is not worth the effort, the equation $H(y)=G(x)+C$ is an implicit solution. It still determines $y$ for each $x$, and we can find values numerically and slopes by implicit differentiation (Section 2.4 of Calculus I).
✏️ Example 2 — An implicit solution
Solve $\dfrac{dy}{dx}=\dfrac{2x+1}{3y^2+1}$ with $y(0)=1$. Then estimate $y(1)$.
💡 Show solution▶
Separate Here $h(y)=\dfrac{1}{3y^2+1}$ is never zero, so there are no equilibrium solutions to worry about. $$\left(3y^2+1\right)dy=(2x+1)\,dx\ \Longrightarrow\ \int\left(3y^2+1\right)dy=\int(2x+1)\,dx\ \Longrightarrow\ y^3+y=x^2+x+C.$$
Initial value At $x=0$, $y=1$: $1+1=0+0+C$, so $C=2$. The implicit solution is $$y^3+y=x^2+x+2.$$
Why it is a function The left side $F(y)=y^3+y$ has $F^\prime(y)=3y^2+1\gt0$, so it is strictly increasing and takes every real value exactly once. Hence for each $x$ there is exactly one $y$, and the implicit equation does define $y$ as a function of $x$, even though solving the cubic by formula would be messy.
Estimate $y(1)$ At $x=1$ we need $y^3+y=4$. Newton's method on $F(y)=y^3+y-4$ from $y_0=1.5$: $y_1=1.5-\dfrac{0.875}{7.75}\approx1.3871$, $y_2\approx1.3788$, $y_3\approx1.37880$. So $y(1)\approx1.3788$.
Check Differentiating $y^3+y=x^2+x+2$ implicitly: $\left(3y^2+1\right)y^\prime=2x+1$, which is the original equation. ✓ A numerical solver gives $y(1)\approx1.378797$ as well.
Exponential Growth and Decay
The simplest separable equation says that a quantity changes at a rate proportional to its current size: $\dfrac{dy}{dt}=ky$. Populations with unlimited resources, money under continuous compounding and radioactive nuclei all behave this way, at least approximately. We met its solutions in Section 7.1 (Theorem 7.1); now we can derive them. Separating ($y\ne0$): $\displaystyle\int\frac{dy}{y}=\int k\,dt$, so $\ln|y|=kt+C$ and $y=Ae^{kt}$ with $A=\pm e^C$. Allowing $A=0$ restores the equilibrium $y\equiv0$. Setting $t=0$ shows that $A=y(0)$.
📐 Theorem 7.6 — Exponential growth and decay
Let $k$ and $y_0$ be real constants. The initial-value problem
$$\frac{dy}{dt}=ky,\qquad y(0)=y_0$$
has exactly one solution defined for all $t$, namely $$y(t)=y_0\,e^{kt}.$$
If $y_0\gt0$, the solution grows exponentially when $k\gt0$ and decays exponentially towards $0$ when $k\lt0$.
Why only one? If $y$ is any solution, then $\dfrac{d}{dt}\left(y\,e^{-kt}\right)=y^\prime e^{-kt}-k\,y\,e^{-kt}=(ky-ky)e^{-kt}=0$, so $y\,e^{-kt}$ is constant, equal to its value $y_0$ at $t=0$.
📘 Definition 7.9 — Half-life and doubling time
For $y(t)=y_0e^{kt}$ with $y_0\gt0$:
if $k\lt0$, the half-life is the time for $y$ to fall to half its value: $\;t_{1/2}=\dfrac{\ln2}{|k|}$;
if $k\gt0$, the doubling time is the time for $y$ to double: $\;T_d=\dfrac{\ln2}{k}$.
Both are independent of $y_0$ and of the moment you start the clock: every half-life halves whatever is left. (From $y_0e^{k(t+T)}=2y_0e^{kt}$ we get $e^{kT}=2$, so $T=\ln 2/k$.)
Radiocarbon dating. Living organisms keep the same proportion of radioactive carbon-14 as the atmosphere. After death no new carbon-14 is taken in, and what is there decays with a half-life of about $5730$ years. So the fraction of carbon-14 remaining tells us how long ago the organism died. This method is used by archaeologists from Oman to Peru for dating organic material up to about $50\,000$ years old.
✏️ Example 3 — Carbon dating a charcoal sample
Charcoal from an ancient hearth contains $30\%$ of the carbon-14 found in living wood. Taking the half-life of carbon-14 to be $5730$ years, estimate the age of the charcoal.
💡 Show solution▶
Model Let $y(t)$ be the amount of carbon-14, $t$ years after the tree died. By Theorem 7.6, $y=y_0e^{kt}$, and by Definition 7.9, $|k|=\dfrac{\ln2}{5730}$, so $$k=-\frac{\ln 2}{5730}\approx-1.2097\times10^{-4}\ \text{per year}.$$
Solve We need $y(t)=0.30\,y_0$: $$e^{kt}=0.30\ \Longrightarrow\ t=\frac{\ln0.30}{k}=\frac{5730\,\ln(1/0.30)}{\ln 2}=\frac{5730\times1.20397}{0.693147}\approx9953\ \text{years}.$$
Interpret The charcoal is roughly $10\,000$ years old. Since the half-life itself is only known to about $\pm40$ years and the measurement has its own error, quote the answer as "about $9950$ years", not to the nearest year.
Check $30\%$ lies between $1/2$ (one half-life, $5730$ years) and $1/4$ (two half-lives, $11\,460$ years), and so does $9953$. ✓ Indeed $2^{-9953/5730}\approx0.300$.
Newton's Law of Cooling
A hot object in a cooler room loses heat quickly at first and more and more slowly as its temperature approaches that of the room. Newton's law of cooling models this: the rate of change of the object's temperature is proportional to the difference between its temperature and the surrounding (ambient) temperature. The same law describes warming: a cold drink in a warm room heats up in the same way.
📐 Theorem 7.7 — Newton's law of cooling
Suppose an object's temperature $T(t)$ satisfies
$$\frac{dT}{dt}=-k\,\big(T-T_a\big),\qquad T(0)=T_0,$$
where the ambient temperature $T_a$ and the cooling constant $k\gt0$ are constants. Then
$$T(t)=T_a+\big(T_0-T_a\big)\,e^{-kt},$$
and $T(t)\to T_a$ as $t\to\infty$, from above if $T_0\gt T_a$ (cooling) and from below if $T_0\lt T_a$ (warming).
Proof. Let $u=T-T_a$, the temperature gap. Since $T_a$ is constant, $\dfrac{du}{dt}=\dfrac{dT}{dt}=-ku$ with $u(0)=T_0-T_a$. By Theorem 7.6, $u=(T_0-T_a)e^{-kt}$, and $T=T_a+u$. $\blacksquare$
So it is the gap $T-T_a$ that decays exponentially, with "half-life" $\ln2/k$: every $\ln 2/k$ minutes the difference between the object and the room halves.
✏️ Example 4 — When can I drink my coffee?
A cup of coffee is poured at $90\,^\circ\mathrm{C}$ in a room kept at $22\,^\circ\mathrm{C}$. Five minutes later it is $70\,^\circ\mathrm{C}$. Assuming Newton's law of cooling, how long after pouring is the coffee at a comfortable $50\,^\circ\mathrm{C}$?
💡 Show solution▶
Model By Theorem 7.7 with $T_a=22$ and $T_0=90$: $T(t)=22+68\,e^{-kt}$ ($t$ in minutes).
Find $k$ $T(5)=70$: $\;68e^{-5k}=48\ \Longrightarrow\ k=\dfrac15\ln\dfrac{68}{48}\approx0.06966$ per minute.
Check The gap went $68\to48$ in the first 5 minutes (a factor $0.706$), so after $12.74$ minutes it should be $68\times0.706^{12.74/5}\approx28$, i.e. $T\approx50\,^\circ\mathrm{C}$. ✓ Notice that the second $20^\circ$ drop ($70\to50$) took longer than the first ($90\to70$): cooling slows as the gap shrinks.
Interactive 1 — Newton's Law of Cooling Explorer
Set the starting temperature $T_0$, the room temperature $T_a$, the cooling constant $k$ and a target temperature. The red bar is the gap $T-T_a$. Watch it shrink by the same factor in every equal time step, while the purple tangent gets flatter as the gap closes. The defaults are Example 4.
time $t$ (min)—
$T(t)$ (°C)—
gap $T-T_a$ (°C)—
$dT/dt$ (°C/min)—
time to target (min)—
gap halves every (min)—
Mixing Problems and Drug Elimination
Many models balance an input against an output:
$$\frac{dy}{dt}=(\text{rate in})-(\text{rate out}).$$
In a well-mixed tank, salt arrives at a fixed rate and leaves at a rate proportional to how much is in the tank. In the body, a drug delivered by a drip arrives at a fixed rate and the liver and kidneys remove it at a rate proportional to the amount present. Both lead to the same separable equation.
📐 Theorem 7.8 — The input–output (balance) equation
Let $a$ and $b\gt0$ be constants. The solution of
$$\frac{dy}{dt}=a-by,\qquad y(0)=y_0,$$
is $$y(t)=\frac ab+\left(y_0-\frac ab\right)e^{-bt},$$
and $y(t)\to\dfrac ab$ as $t\to\infty$. The level $y=\dfrac ab$, where input exactly balances output, is the equilibrium (steady-state) solution.
Proof. $a-by=-b\left(y-\tfrac ab\right)$. This is Newton's law of cooling with $k=b$ and "ambient value" $a/b$, so Theorem 7.7 applies. $\blacksquare$
🧭 Setting up a mixing problem
Let $S(t)$ be the amount of dissolved substance (kg, g, mg…) in the tank, not the concentration.
Rate in $=(\text{concentration in})\times(\text{flow rate in})$, e.g. $\left(0.05\ \tfrac{\text{kg}}{\text{L}}\right)\left(10\ \tfrac{\text{L}}{\text{min}}\right)=0.5\ \tfrac{\text{kg}}{\text{min}}$.
Rate out $=(\text{concentration in the tank})\times(\text{flow rate out})=\dfrac{S(t)}{V(t)}\times(\text{flow out})$, assuming the tank is well stirred, so the outflow has the same concentration as the tank.
If the flows in and out are equal, the volume $V$ stays constant and the equation is separable.
Check units: every term must be in (amount)/(time).
✏️ Example 5 — A brine tank
A tank holds $1000$ L of salt water containing $20$ kg of dissolved salt. Brine with salt concentration $0.05$ kg/L flows in at $10$ L/min, and the well-stirred mixture drains out at the same rate. Find the amount of salt $S(t)$ after $t$ minutes, the amount after $30$ minutes, and the long-run amount.
💡 Show solution▶
Rates The volume stays $1000$ L. Rate in $=0.05\times10=0.5$ kg/min. Rate out $=\dfrac{S}{1000}\times10=\dfrac{S}{100}$ kg/min. So $$\frac{dS}{dt}=0.5-\frac{S}{100}=\frac{50-S}{100},\qquad S(0)=20.$$
Separate The equilibrium is $S\equiv50$. For $S\ne50$: $$\int\frac{dS}{50-S}=\int\frac{dt}{100}\ \Longrightarrow\ -\ln|50-S|=\frac{t}{100}+C\ \Longrightarrow\ 50-S=Ae^{-t/100}.$$ At $t=0$: $A=50-20=30$. Hence $$S(t)=50-30\,e^{-t/100}\ \text{kg}.$$ (This matches Theorem 7.8 with $a=0.5$, $b=0.01$, $a/b=50$.)
Evaluate $S(30)=50-30e^{-0.3}\approx50-30(0.74082)\approx27.78$ kg. As $t\to\infty$, $S\to50$ kg, a concentration of $50/1000=0.05$ kg/L, the same as the incoming brine.
Check $S^\prime(t)=0.3e^{-t/100}$ and $\dfrac{50-S}{100}=\dfrac{30e^{-t/100}}{100}=0.3e^{-t/100}$. ✓
Interactive 2 — Tank-Mixing Simulator
Brine of concentration $c_{\text{in}}$ flows in at $r$ L/min and the stirred mixture flows out at the same rate. The tank's colour shows its concentration $c(t)=S(t)/V$, and the graph traces $c(t)$ approaching the green line $c_{\text{in}}$. Try a large tank with a slow flow, then a small tank with a fast flow: the time constant $V/r$ sets the pace. The defaults are Example 5.
time $t$ (min)—
salt $S(t)$ (kg)—
concentration (kg/L)—
$dS/dt$ (kg/min)—
time constant $V/r$ (min)—
A simple drug-elimination model. For many medicines, the body removes the drug at a rate proportional to the amount present ("first-order elimination"): $\dfrac{dA}{dt}=-kA$. After a single dose the amount decays exponentially, and pharmacologists describe $k$ by the drug's elimination half-life $\ln 2/k$. With a constant intravenous drip the model becomes an input–output equation.
✏️ Example 6 — An intravenous infusion
A patient receives an antibiotic by intravenous drip at a constant $50$ mg per hour, starting with none in the body. The body eliminates the drug at a rate proportional to the amount present, with constant $k=0.2$ per hour. (a) Find the amount $A(t)$ in the body after $t$ hours. (b) What is the steady-state amount? (c) How long until the amount reaches $90\%$ of the steady state? (d) What is the drug's elimination half-life?
💡 Show solution▶
(a) $\dfrac{dA}{dt}=50-0.2A$, $A(0)=0$. By Theorem 7.8 with $a=50$, $b=0.2$, $a/b=250$: $$A(t)=250+(0-250)e^{-0.2t}=250\left(1-e^{-0.2t}\right)\ \text{mg}.$$
(b) As $t\to\infty$, $A\to250$ mg. At that level elimination, $0.2\times250=50$ mg/h, exactly matches the drip rate.
(d) $t_{1/2}=\dfrac{\ln2}{0.2}\approx3.47$ hours. Notice that (c) is $\dfrac{\ln10}{\ln2}\approx3.3$ half-lives. Clinicians use the rule of thumb that a constant infusion takes about $3$–$5$ half-lives to reach steady state, and this is where it comes from.
Check $A^\prime=50e^{-0.2t}$ and $50-0.2A=50-50\left(1-e^{-0.2t}\right)=50e^{-0.2t}$. ✓
Exercises
I
Find the general solution of each separable equation (explicitly where possible), and list any equilibrium solutions. In parts 9 and 10, first decide whether the equation is separable.
1 $\dfrac{dy}{dx}=3x^2y$
2 $\dfrac{dy}{dx}=\dfrac{x}{y}$
3 $\dfrac{dy}{dx}=e^{x-y}$
4 $\dfrac{dy}{dx}=x\left(1+y^2\right)$
5 $\dfrac{dy}{dt}=\dfrac{t}{y^2+1}$ (leave the answer implicit)
6 $\dfrac{dy}{dx}=y\cos x$
7 $\dfrac{dy}{dx}=\dfrac{\sec^2x}{2y}$
8 $x\,\dfrac{dy}{dx}=y-1$ ($x\gt0$)
9 $\dfrac{dy}{dx}=xy-2x+3y-6$
10 $\dfrac{dy}{dx}=x^2+y^2$
💡 Show solutions▶
1 Equilibrium $y\equiv0$. For $y\ne0$: $\displaystyle\int\frac{dy}{y}=\int3x^2dx\Rightarrow\ln|y|=x^3+C\Rightarrow y=Ae^{x^3}$. With $A=0$ allowed, this also includes $y\equiv0$: $\;y=Ae^{x^3}$, $A\in\mathbb R$.
2 $y\,dy=x\,dx\Rightarrow\tfrac12y^2=\tfrac12x^2+C\Rightarrow y^2-x^2=K$, i.e. $y=\pm\sqrt{x^2+K}$ (sign chosen to match the initial value; $y\ne0$). No equilibria: $h(y)=1/y$ is never $0$.
3 $e^{x-y}=e^xe^{-y}$, so $e^y\,dy=e^x\,dx\Rightarrow e^y=e^x+C\Rightarrow y=\ln\left(e^x+C\right)$, valid where $e^x+C\gt0$. No equilibria ($e^{-y}\ne0$).
4 $\displaystyle\int\frac{dy}{1+y^2}=\int x\,dx\Rightarrow\tan^{-1}y=\tfrac12x^2+C\Rightarrow y=\tan\left(\tfrac12x^2+C\right)$. No equilibria ($1+y^2\gt0$).
5 $\left(y^2+1\right)dy=t\,dt\Rightarrow\dfrac{y^3}{3}+y=\dfrac{t^2}{2}+C$. No equilibria.
7 $2y\,dy=\sec^2x\,dx\Rightarrow y^2=\tan x+C$, so $y=\pm\sqrt{\tan x+C}$ where $\tan x+C\gt0$. No equilibria.
8 $\dfrac{dy}{dx}=\dfrac1x(y-1)$. Equilibrium $y\equiv1$. $\displaystyle\int\frac{dy}{y-1}=\int\frac{dx}{x}\Rightarrow\ln|y-1|=\ln x+C\Rightarrow y-1=Ax$, so $y=1+Ax$ ($A=0$ gives the equilibrium).
9Separable: factor by grouping, $xy-2x+3y-6=x(y-2)+3(y-2)=(x+3)(y-2)$. Equilibrium $y\equiv2$. $\displaystyle\int\frac{dy}{y-2}=\int(x+3)\,dx\Rightarrow\ln|y-2|=\tfrac12x^2+3x+C\Rightarrow y=2+Ae^{x^2/2+3x}$.
10Not separable. Suppose $x^2+y^2=g(x)h(y)$ for all $x,y$. Putting $x=0$: $g(0)h(y)=y^2$, so $g(0)\ne0$ and $h(0)=0$. Putting $y=0$: $g(x)h(0)=x^2$, which would force $x^2=0$ for every $x$, a contradiction. (This equation can only be solved numerically, e.g. by Euler's method from Section 7.2.)
II
Solve each initial-value problem. Give an explicit solution where possible and state the interval of validity when it is not all of $\mathbb{R}$.
1 $\dfrac{dy}{dx}=-2xy,\quad y(0)=3$
2 $\dfrac{dy}{dx}=y^2,\quad y(0)=1$
3 $\dfrac{dy}{dx}=\dfrac{x}{y},\quad y(0)=-2$
4 $\dfrac{dy}{dx}=xe^{-y},\quad y(0)=0$
5 $\dfrac{dy}{dx}=y^2\sin x,\quad y(0)=\tfrac12$
6 $\dfrac{dy}{dx}=\dfrac{2x}{1+2y},\quad y(2)=0$
7 $\dfrac{dy}{dx}=3x^2(y+1),\quad y(0)=1$
8Conceptual. A student solves $\dfrac{dy}{dx}=y(y-2)$ by dividing by $y(y-2)$ and using partial fractions. Find the general solution and identify which constant solutions the formula recovers and which it misses.
Check: a numerical solver (RK4, red dots) marches from the initial point. It must land on your formula (curve).
$x$—
formula $y(x)$—
RK4 value—
difference—
💡 Show solutions▶
1 $\displaystyle\int\frac{dy}{y}=\int-2x\,dx\Rightarrow\ln|y|=-x^2+C\Rightarrow y=Ae^{-x^2}$; $y(0)=3\Rightarrow A=3$: $\;y=3e^{-x^2}$, valid for all $x$.
2 $\displaystyle\int y^{-2}dy=\int dx\Rightarrow-\frac1y=x+C$; $y(0)=1\Rightarrow C=-1$: $\;y=\dfrac{1}{1-x}$, valid on $(-\infty,1)$ (it blows up as $x\to1^-$).
3 $y\,dy=x\,dx\Rightarrow y^2=x^2+K$; $y(0)=-2\Rightarrow K=4$. Take the negative root to match $y(0)=-2$: $\;y=-\sqrt{x^2+4}$, valid for all $x$.
4 $e^y\,dy=x\,dx\Rightarrow e^y=\tfrac12x^2+C$; $y(0)=0\Rightarrow C=1$: $\;y=\ln\left(1+\tfrac12x^2\right)$, valid for all $x$.
5 $\displaystyle\int y^{-2}dy=\int\sin x\,dx\Rightarrow-\frac1y=-\cos x+C$; $y(0)=\tfrac12\Rightarrow-2=-1+C\Rightarrow C=-1$. So $\dfrac1y=\cos x+1$: $\;y=\dfrac{1}{1+\cos x}$, valid on $(-\pi,\pi)$ (where $1+\cos x\gt0$).
6 $(1+2y)\,dy=2x\,dx\Rightarrow y+y^2=x^2+C$; $y(2)=0\Rightarrow C=-4$. Solving the quadratic $y^2+y-\left(x^2-4\right)=0$: $y=\dfrac{-1\pm\sqrt{4x^2-15}}{2}$, and $y(2)=0$ needs the $+$ sign: $\;y=\dfrac{-1+\sqrt{4x^2-15}}{2}$, valid for $x\gt\tfrac{\sqrt{15}}{2}\approx1.936$ (where $1+2y\ne0$).
7 Equilibrium $y\equiv-1$ (not ours). $\displaystyle\int\frac{dy}{y+1}=\int3x^2dx\Rightarrow y+1=Ae^{x^3}$; $y(0)=1\Rightarrow A=2$: $\;y=2e^{x^3}-1$, valid for all $x$.
8 Constant solutions: $y\equiv0$ and $y\equiv2$. Otherwise $\dfrac{1}{y(y-2)}=\dfrac12\left(\dfrac{1}{y-2}-\dfrac1y\right)$, so $\tfrac12\ln\left|\dfrac{y-2}{y}\right|=x+C\Rightarrow\dfrac{y-2}{y}=Ae^{2x}\Rightarrow y=\dfrac{2}{1-Ae^{2x}}$. Choosing $A=0$ gives $y\equiv2$ (recovered), but no value of $A$ gives $y\equiv0$: that solution is lost by the division and must be listed separately.
III
Exponential growth and decay. Give units in every answer.
1 A bacterial culture starts with $500$ cells and doubles every $20$ minutes. Write $N(t)$ and find the number of cells after $2$ hours.
2 A culture grows exponentially from $1000$ to $3000$ cells in $4$ hours. Find the growth constant $k$ and the doubling time.
3 Iodine-131, used to treat thyroid disease, has a half-life of about $8$ days. What percentage of a dose remains after $30$ days?
4 A wooden tool contains $62\%$ of the carbon-14 of living wood. Estimate its age (half-life $5730$ years).
5 $1000$ OMR is invested at $4\%$ per year compounded continuously, so $dB/dt=0.04B$. Find the doubling time and the balance after $10$ years.
6 Show that if $y=y_0e^{kt}$ with $k\gt0$, then $y(t+T)=2y(t)$ for every $t$ exactly when $T=\dfrac{\ln2}{k}$.
7Applied. Atmospheric pressure $P(h)$ at height $h$ km roughly satisfies $dP/dh=-kP$. At sea level $P=101.3$ kPa and at $5$ km $P=54.0$ kPa. Estimate the pressure on the summit of Mount Everest ($8.85$ km).
💡 Show solutions▶
1 $N(t)=500\cdot2^{t/20}=500e^{(\ln2/20)t}$ ($t$ in minutes). After $120$ min: $N=500\cdot2^{6}=32\,000$ cells.
2 $3000=1000e^{4k}\Rightarrow k=\dfrac{\ln3}{4}\approx0.2747$ per hour. Doubling time $\dfrac{\ln2}{k}=\dfrac{4\ln2}{\ln3}\approx2.52$ hours.
3 Fraction left $=\left(\tfrac12\right)^{30/8}=2^{-3.75}\approx0.0743$, so about $7.4\%$ of the dose remains.
4 $e^{kt}=0.62$ with $k=-\ln2/5730$: $t=\dfrac{5730\ln(1/0.62)}{\ln2}\approx3952$ years, so about $3950$ years.
5 $B=1000e^{0.04t}$. Doubling time $\dfrac{\ln2}{0.04}\approx17.3$ years. $B(10)=1000e^{0.4}\approx1491.82$ OMR.
6 $y(t+T)=y_0e^{kt}e^{kT}=e^{kT}\,y(t)$. This equals $2y(t)$ (with $y(t)\ne0$) exactly when $e^{kT}=2$, i.e. $kT=\ln2$, $T=\dfrac{\ln2}{k}$, whatever $t$ and $y_0$ are.
7 $P=101.3e^{-kh}$; $54.0=101.3e^{-5k}\Rightarrow k=\tfrac15\ln\dfrac{101.3}{54.0}\approx0.1258$ per km. $P(8.85)=101.3e^{-0.1258\times8.85}\approx33.3$ kPa, about one third of sea-level pressure. (Measured values are about $34$ kPa; the model ignores temperature changes with height.)
IV
Cooling, mixing and dosing models. Set up the differential equation, solve it, and answer with units.
1 A metal casting at $200\,^\circ$C is placed in a workshop at $20\,^\circ$C. After $10$ minutes it is at $120\,^\circ$C. Find its temperature after $30$ minutes and when it reaches $30\,^\circ$C.
2Forensics. A body is found at 9:00 pm with temperature $30\,^\circ$C in a room at $20\,^\circ$C. One hour later it is $28\,^\circ$C. Assuming a normal body temperature of $37\,^\circ$C and Newton's law of cooling, estimate the time of death.
3 A can of juice taken from a fridge at $4\,^\circ$C warms to $10\,^\circ$C in $10$ minutes in a $30\,^\circ$C room. When does it reach $20\,^\circ$C?
4 A $500$ L tank of pure water receives brine with $0.1$ kg/L of salt at $5$ L/min; the well-mixed solution leaves at $5$ L/min. Find $S(t)$ and the time when the tank holds $25$ kg of salt.
5 A $2000$ L holding tank contains $40$ kg of a pollutant. Clean water flows in at $50$ L/min and the mixture flows out at the same rate. When does the amount drop below $4$ kg?
6 A $400$ mg dose of a drug with elimination half-life $6$ hours is taken at once. How much remains after $24$ hours, and when does the amount first fall to $50$ mg?
7 A drug is infused at $30$ mg/h into a patient with elimination constant $k=0.1$ per hour, starting from zero. Find $A(t)$, the steady-state amount and $A(10)$.
8Challenge (Torricelli's law). Water drains from a tank through a hole in the bottom, and the depth $h$ (m) satisfies $\dfrac{dh}{dt}=-0.2\sqrt h$ ($t$ in minutes) with $h(0)=4$. Find $h(t)$ and the time when the tank is empty.
💡 Show solutions▶
1 $T=20+180e^{-kt}$; $120=20+180e^{-10k}\Rightarrow e^{-10k}=\tfrac59$, $k=\tfrac1{10}\ln1.8\approx0.05878$ per min. $T(30)=20+180\left(\tfrac59\right)^3=20+\tfrac{22500}{729}\approx50.9\,^\circ$C. For $30\,^\circ$C: $180e^{-kt}=10\Rightarrow t=\dfrac{\ln18}{k}\approx49.2$ min.
2 Measure $t$ in hours from 9:00 pm: $T=20+10e^{-kt}$ and $28=20+10e^{-k}\Rightarrow k=\ln1.25\approx0.2231$ per hour. At death the gap was $37-20=17$, now it is $10$: $17e^{-ks}=10$ where $s$ is the time from death to 9:00 pm, so $s=\dfrac{\ln1.7}{\ln1.25}\approx2.38$ h $\approx2$ h $23$ min. Death occurred at about 6:37 pm.
3 Warming: $T=30-26e^{-kt}$; $10=30-26e^{-10k}\Rightarrow e^{-10k}=\tfrac{20}{26}$, $k=\tfrac1{10}\ln1.3\approx0.02624$ per min. $T=20$ when $26e^{-kt}=10$: $t=\dfrac{\ln2.6}{k}\approx36.4$ min.
4 $\dfrac{dS}{dt}=0.5-\dfrac{S}{100}$, $S(0)=0$ $\Rightarrow S(t)=50\left(1-e^{-t/100}\right)$ kg. $S=25\Rightarrow e^{-t/100}=\tfrac12\Rightarrow t=100\ln2\approx69.3$ min.
5 No pollutant enters: $\dfrac{dS}{dt}=-\dfrac{50}{2000}S=-\dfrac{S}{40}$, so $S=40e^{-t/40}$. $S=4\Rightarrow t=40\ln10\approx92.1$ min.
6 $24$ h is $4$ half-lives: $400\cdot\left(\tfrac12\right)^4=25$ mg. $50$ mg is $\tfrac18$ of the dose, i.e. $3$ half-lives: $t=18$ h.
8 For $h\gt0$: $h^{-1/2}dh=-0.2\,dt\Rightarrow2\sqrt h=-0.2t+C$; $h(0)=4\Rightarrow C=4$. So $\sqrt h=2-0.1t$ and $h(t)=(2-0.1t)^2$ for $0\le t\le20$; the tank is empty at $t=20$ min and $h\equiv0$ afterwards (the equilibrium $h\equiv0$ takes over). Check: $h^\prime=-0.2(2-0.1t)=-0.2\sqrt h$ ✓ since $2-0.1t\ge0$.
🔬 Research–Teaching NexusResearch-tutored · optional, about 40 minutes
Research question. Does a real cup of tea or coffee actually cool according to Newton's law, and is the "cooling constant" $k$ really constant?
Why it matters. The same model is used to design cooling for car engines and data centres, to plan the cold chain for vaccines, and by forensic scientists to estimate time of death. Knowing when it fails matters as much as knowing the formula.
What to do.
Pour a hot drink into a mug and record the room temperature $T_a$. Using a kitchen or lab thermometer, record the drink's temperature every $2$ minutes for $30$ minutes.
Theorem 7.7 says $\ln\left(T-T_a\right)=\ln\left(T_0-T_a\right)-kt$. Plot $\ln\left(T-T_a\right)$ against $t$ in a spreadsheet; if Newton's law holds the points lie on a straight line with slope $-k$.
Fit a line (spreadsheet trend line) and read off $k$. Then fit separate lines to the first $10$ minutes and the last $10$ minutes. Are the two slopes equal?
Repeat with a lid on the mug, or with a metal cup, and compare the values of $k$.
Hand in: A one-page note with your table, the log plot, the fitted $k$ values, and a sentence on whether the law fits.
Going further. Hot liquids also lose heat by evaporation and radiation, which matter most at high temperatures. Look up the Stefan–Boltzmann law and explain how it would make the early part of your log plot steeper.
Instructor note: an open ceramic mug typically gives $k\approx0.02$–$0.05$ per minute. Most students find the early slope noticeably steeper than the later one (evaporation), and that a lid reduces $k$, so the model is good but not perfect.
🧪 Self-check quiz
0/5 correct
Q1. Which differential equation is separable?
Q2. Solving $\dfrac{dy}{dx}=x\,y^2$ by dividing by $y^2$ loses which solution?
Q3. A substance has a half-life of $10$ years. What fraction is left after $30$ years?
Q4. An object's temperature is $T(t)=20+60e^{-0.1t}$ °C. What temperature does it approach in the long run?
Q5. A $100$ L tank receives brine with $0.5$ kg/L of salt at $2$ L/min, and the stirred mixture leaves at $2$ L/min. With $S$ the salt in kg, $\dfrac{dS}{dt}=$