Solving $\dfrac{dy}{dx} = g(y)$
When the rate of change depends only on $y$ — not $x$ — you can't just integrate both sides with respect to $x$. The trick is to flip the fraction: rewrite as $\dfrac{dx}{dy} = \dfrac{1}{g(y)}$ and integrate with respect to $y$ instead. This one move unlocks a whole class of differential equations that appear in population models, cooling laws, and radioactive decay.
A quantity $P$ grows so that $\dfrac{dP}{dt} = kP$ for some positive constant $k$. Without using calculus — what shape do you expect the graph of $P$ against $t$ to have? Sketch or describe it below.
When $\dfrac{dy}{dx} = g(y)$, the right side depends only on $y$ — not $x$. We cannot integrate with respect to $x$ directly. Instead, use the reciprocal rule for derivatives:
If $\dfrac{dy}{dx} = g(y)$, then $\dfrac{dx}{dy} = \dfrac{1}{g(y)}$ (provided $g(y) \neq 0$).
Integrate both sides with respect to $y$:
$x = \displaystyle\int \dfrac{1}{g(y)}\,dy + C$
This gives $x$ as a function of $y$. If needed, rearrange for $y$.
Key facts
- $\dfrac{dy}{dx} = g(y)$ inverts to $\dfrac{dx}{dy} = \dfrac{1}{g(y)}$
- The general solution is $x = \displaystyle\int \dfrac{1}{g(y)}\,dy + C$
- Equilibrium solutions occur where $g(y) = 0$
Concepts
- Why we invert rather than integrate directly with respect to $x$
- The role of initial conditions in determining the particular solution
- How this technique connects to separation of variables (next lesson)
Skills
- Solve $\dfrac{dy}{dx} = g(y)$ by inverting and integrating
- Apply an initial condition to find the particular solution
- Identify and state equilibrium solutions
A differential equation of the form $\dfrac{dy}{dx} = g(y)$ is called autonomous because the right side does not explicitly depend on $x$.
Method (three steps):
- Check for equilibrium. Find any $y = c$ where $g(c) = 0$. These constant functions are solutions on their own.
- Invert. Where $g(y) \neq 0$, write $\dfrac{dx}{dy} = \dfrac{1}{g(y)}$.
- Integrate. $x = \displaystyle\int \dfrac{1}{g(y)}\,dy + C$. Then rearrange for $y$ if required.
Example: Solve $\dfrac{dy}{dx} = y$ given $y(0) = 3$.
Step 1: Equilibrium at $y = 0$.
Step 2: $\dfrac{dx}{dy} = \dfrac{1}{y}$.
Step 3: $x = \ln|y| + C$, so $|y| = e^{x-C} = Ae^x$ where $A = e^{-C} > 0$.
Allowing $A$ to take any non-zero value: $y = Ae^x$. Apply $y(0) = 3$: $A = 3$.
Particular solution: $y = 3e^x$.
A differential equation of the form $\dfrac{dy}{dx} = g(y)$ is called autonomous because the right side does not explicitly depend on $x$.
Pause — copy the autonomous DE method: $\frac{dy}{dx}=g(y)\Rightarrow\int\frac{dy}{g(y)}=x+C$, and a worked example into your book.
Quick check: To solve $\dfrac{dy}{dx} = 2y$, what is the correct first step after identifying there is no issue with $g(y) = 0$ as a constraint?
We just saw that an autonomous DE $\frac{dy}{dx}=g(y)$ is solved by separating: $\int\frac{dy}{g(y)}=\int dx=x+C$, then solving for $y$. That raises a question: what happens when $g(y)=0$ for some constant $y=c$ — these equilibrium values satisfy the DE trivially, but the general solution formula may miss them; how do you find them? This card answers it → set $g(y)=0$ and solve; each root gives a constant (equilibrium) solution $y=c$.
An equilibrium solution is a constant $y = c$ that satisfies the DE. Substituting $y = c$ means $\dfrac{dy}{dx} = 0$, so we need $g(c) = 0$.
Equilibrium solutions are important because they act as attractors or repellers for nearby solution curves.
- Stable equilibrium: nearby solutions move towards $y = c$ as $x \to \infty$.
- Unstable equilibrium: nearby solutions move away from $y = c$ as $x \to \infty$.
Example: For $\dfrac{dy}{dx} = y(y-2)$, equilibria are at $g(c) = c(c-2) = 0$, i.e. $y = 0$ and $y = 2$.
An equilibrium solution is a constant $y = c$ that satisfies the DE. Substituting $y = c$ means $\dfrac{dy}{dx} = 0$, so we need $g(c) = 0$.
Pause — copy the equilibrium solution rule: set $g(y)=0$, each root $y=c$ is a constant solution; note that the separation method fails at these values (division by zero) into your book.
Did you get this? True or false: $y = 0$ is a solution of $\dfrac{dy}{dx} = 3y^2$.
Worked examples · 3 in a row, reveal as you go
Find the general solution of $\dfrac{dy}{dx} = 3y$.
Find the general solution of $\dfrac{dy}{dx} = y^2$, and the particular solution with $y(0) = 1$.
Apply $y(0) = 1$: $1 = \dfrac{1}{C}$, so $C = 1$.
Particular solution: $y = \dfrac{1}{1 - x}$.
Solve $\dfrac{dy}{dx} = 2 - y$ given $y(0) = 0$.
Hence $y = 2 - Ae^{-x}$. Apply $y(0) = 0$: $0 = 2 - A$, so $A = 2$.
Particular solution: $y = 2(1 - e^{-x})$.
Fill the gap: The general solution of $\dfrac{dy}{dx} = 5y$ is $y = Ae^{$$x}$.
Misconceptions to fix · the 3 traps that cost marks
Did you get this? True or false: the particular solution of $\dfrac{dy}{dx} = 2y$ with $y(0) = 4$ is $y = 4e^{2x}$.
Activities · practice with the ideas
Find the general solution of $\dfrac{dy}{dx} = 4y$.
Find the particular solution of $\dfrac{dy}{dx} = -y$ with $y(0) = 5$.
Solve $\dfrac{dy}{dx} = y^2 - 1$. State the equilibrium solutions first.
Solve $\dfrac{dy}{dx} = 6 - 2y$ given $y(0) = 1$. What value does $y$ approach as $x \to \infty$?
The temperature $T$ of a cooling object satisfies $\dfrac{dT}{dt} = -k(T - 20)$ for $k > 0$. Find $T(t)$ given $T(0) = 80$.
Odd one out: Three of these are correct general solutions of $\dfrac{dy}{dx} = 2y$. Which one is NOT?
Earlier you estimated what $P(t) = P_0 e^{kt}$ looks like.
The exact answer is an exponential curve — not linear, and it never levels off (for $k > 0$). The key insight is the inversion trick: when $\dfrac{dP}{dt} = kP$, you flip to $\dfrac{dt}{dP} = \dfrac{1}{kP}$, integrate to get $t = \dfrac{1}{k}\ln|P| + C$, then rearrange to $P = P_0 e^{kt}$.
Pick your answer, then rate your confidence — that tells the system what to drill next. Each retry pulls a fresh mix from the bank.
Q1. Find the general solution of $\dfrac{dy}{dx} = -2y$. (2 marks)
Q2. Find the particular solution of $\dfrac{dy}{dx} = 4 - y$ with $y(0) = 2$. State the long-run value of $y$ as $x \to \infty$. (3 marks)
Q3. A population satisfies $\dfrac{dP}{dt} = 0.1P$ with $P(0) = 500$. Find $P(t)$ and determine how long (to the nearest year) before the population doubles. (3 marks)
Comprehensive answers (click to reveal)
Activity answers: 1. $y = Ae^{4x}$ · 2. $y = 5e^{-x}$ · 3. equilibria $y = \pm 1$; $\frac{dx}{dy} = \frac{1}{y^2-1} = \frac{1}{(y-1)(y+1)}$ — use partial fractions · 4. $y = 3 - 2e^{-2x}$; approaches $y = 3$ · 5. $T = 20 + 60e^{-kt}$
Q1 (2 marks): Equilibrium $y = 0$ [½]. Invert: $\frac{dx}{dy} = \frac{1}{-2y}$. Integrate: $x = -\frac{1}{2}\ln|y| + C$ [1]. Rearrange: $y = Ae^{-2x}$ [½].
Q2 (3 marks): Equilibrium $y = 4$ [½]. $\frac{dx}{dy} = \frac{1}{4-y}$; $x = -\ln|4-y| + C$ [1]. $y = 4 - Ae^{-x}$. Apply $y(0)=2$: $A = 2$ [1]. Particular solution: $y = 4 - 2e^{-x}$ [½]. As $x \to \infty$, $y \to 4$ [½].
Q3 (3 marks): $P = 500e^{0.1t}$ [1]. Double when $500e^{0.1t} = 1000$, so $e^{0.1t} = 2$, $t = \frac{\ln 2}{0.1} = 10\ln 2 \approx 6.93$ years $\approx \mathbf{7}$ years [2].
Five timed questions. Beat the boss to bank a tier — gold (90% + speed), silver (75%), or bronze (50%). Replays welcome.
⚔ Enter the arenaClimb platforms by answering differential equations questions. Lighter alternative to the boss.
Mark lesson as complete
Tick when you've finished the practice and review.