Chapter 18
Medium

Differential Equations — First Order

00 · Symbol Glossary

$\dfrac{dy}{dx} = f(x,y)$first-order differential equation

An equation relating a function y=y(x)y=y(x) to its own derivative. "First-order" means only the first derivative appears — no yy'' or higher. Solving it means finding the function y(x)y(x) itself, not just a number.

$C$arbitrary constant of a general solution

A free constant appearing in a general solution — the same role played by the constant of integration in Chapter 06, since solving a differential equation always involves at least one integration step.

$y(x_0)=y_0$initial condition

An extra piece of information — the value of yy at one specific point x0x_0 — used to pin down the constant CC and select one particular solution out of the whole general-solution family.

$\text{IVP}$initial value problem

A differential equation paired with an initial condition, together demanding a single, specific solution rather than a whole family of them.

$\mu(x)$mu of x — integrating factor

A helper function, introduced in Section 04, multiplied through a linear first-order equation to make its left side collapse into a single product-rule derivative, allowing direct integration.


01 · What a Differential Equation Is

Every derivative computed in Chapters 02–17 started from a known function and produced a new one. A differential equation runs this backward: it states a relationship the derivative must satisfy, and the task is to recover the original function.

Definition — Differential Equation, Order, General and Particular Solutions

A differential equation is an equation involving an unknown function and one or more of its derivatives. Its order is the highest derivative appearing in it.

A general solution is a family of functions (typically containing an arbitrary constant CC) satisfying the equation. A particular solution is one specific member of that family, usually selected by an initial condition.

Example — Verifying a solution by substitution

Is y=3e2xy=3e^{2x} a solution of dydx=2y\dfrac{dy}{dx} = 2y?

Differentiate the proposed yy (Chapter 02, Section 10, combined with the chain rule of Chapter 03): dydx=32e2x=6e2x\dfrac{dy}{dx} = 3\cdot2e^{2x} = 6e^{2x}.

Compare to 2y=2(3e2x)=6e2x2y = 2(3e^{2x}) = 6e^{2x}. Since dydx=2y\dfrac{dy}{dx}=2y holds for every xx, y=3e2xy=3e^{2x} is a solution.


02 · Separable Equations

Many first-order equations can be rearranged so that every xx sits on one side and every yy on the other — at which point each side can be integrated separately using Chapters 06–07's tools.

Definition — Separable Equation

A first-order equation is separable if it can be written as dydx=g(x)h(y)\dfrac{dy}{dx} = g(x)h(y). Rearranging (treating dydx\dfrac{dy}{dx} formally as a ratio of differentials, in the spirit of Chapter 02's Leibniz notation):

1h(y)dy=g(x)dx\frac{1}{h(y)}\,dy = g(x)\,dx

Both sides can then be integrated independently.

Step-by-step — Solve $\dfrac{dy}{dx} = xy$
1
Confirm the equation is separable: xy=xyxy = x\cdot y splits cleanly into a function of xx alone (xx) times a function of yy alone (yy).
2
Separate the variables: divide both sides by yy (assuming y0y\neq0 for now) and multiply by dxdx: 1ydy=xdx\dfrac{1}{y}\,dy = x\,dx.
3
Integrate both sides separately (Chapter 07's log rule on the left, Chapter 06's power rule on the right): 1ydy=xdx    lny=x22+C1\displaystyle\int\frac1y\,dy = \int x\,dx \implies \ln\lvert y\rvert = \frac{x^2}{2}+C_1.
4
Solve for yy by exponentiating both sides (Chapter 02, Section 10's inverse relationship between ln\ln and exe^x): y=ex2/2+C1=eC1ex2/2\lvert y\rvert = e^{x^2/2+C_1} = e^{C_1}\cdot e^{x^2/2}.
5
Rename the constant: eC1e^{C_1} is just some positive number; absorbing the sign from y\lvert y\rvert lets C=±eC1C=\pm e^{C_1} range over all nonzero reals: y=Cex2/2y = Ce^{x^2/2}.
❌ Losing the y = 0 solution when dividing by y

Step 2 above divided both sides by yy, silently assuming y0y\neq0.

Why it breaks: y=0y=0 (the constant zero function) also satisfies the original equation dydx=xy\dfrac{dy}{dx}=xy, since ddx[0]=0\dfrac{d}{dx}[0]=0 and x0=0x\cdot0=0 for every xx — both sides equal 00. But y=0y=0 can never be produced by y=Cex2/2y=Ce^{x^2/2} for any constant CC, since ex2/2>0e^{x^2/2}>0 always, so Cex2/2=0Ce^{x^2/2}=0 only if C=0C=0 and the exponential vanishes — which it never does.

Consequence: dividing by an expression that could be zero can silently discard a valid solution. The complete solution set here is y=Cex2/2y=Ce^{x^2/2} for any constant CC, including C=0C=0 (which reproduces the lost y=0y=0 solution as a limiting case) — in this particular equation the lost solution happens to be recoverable by allowing C=0C=0, but that must be checked, never assumed automatically.


03 · Initial Value Problems

A general solution is a whole family of curves. An initial condition selects exactly one.

Step-by-step — Solve the IVP $\dfrac{dy}{dx}=xy$, $y(0)=5$
1
Start from the general solution found in Section 02: y=Cex2/2y=Ce^{x^2/2}.
2
Substitute the initial condition x=0x=0, y=5y=5: 5=Ce02/2=Ce0=C(1)=C5 = Ce^{0^2/2} = Ce^0 = C(1) = C.
3
Conclude C=5C=5, and write the particular solution: y=5ex2/2y = 5e^{x^2/2}.

04 · Linear First-Order Equations and the Integrating Factor

Not every first-order equation separates. A different, broader class — linear first-order equations — has its own dedicated method.

Definition — Linear First-Order Equation and Integrating Factor

A first-order equation is linear if it can be written as

dydx+P(x)y=Q(x)\frac{dy}{dx} + P(x)y = Q(x)

Multiplying both sides by the integrating factor μ(x)=eP(x)dx\mu(x) = e^{\int P(x)\,dx} makes the left side collapse into a single derivative:

ddx[μ(x)y]=μ(x)Q(x)\frac{d}{dx}\big[\mu(x)y\big] = \mu(x)Q(x)
Why this particular μ(x) works

By the product rule (Chapter 02) and the chain rule (Chapter 03), ddx[μy]=μy+μy=μ(μμ)y+μy\dfrac{d}{dx}[\mu y] = \mu'y+\mu y' = \mu\left(\dfrac{\mu'}{\mu}\right)y + \mu y'. Since μ=ePdx\mu=e^{\int P\,dx}, differentiating gives μ=P(x)μ\mu' = P(x)\mu (Chapter 03's chain rule: differentiating the exponent Pdx\int P\,dx brings down P(x)P(x) by FTC Part 1, Chapter 06), so μμ=P(x)\dfrac{\mu'}{\mu}=P(x). Substituting: ddx[μy]=μPy+μy=μ(y+Py)\dfrac{d}{dx}[\mu y] = \mu P y + \mu y' = \mu(y'+Py) — exactly μ\mu times the left side of the original equation, which is why multiplying through by μ\mu turns the sum y+Pyy'+Py into the single collapsed derivative ddx[μy]\dfrac{d}{dx}[\mu y].

Step-by-step — Solve $\dfrac{dy}{dx} + 2y = 6$
1
Identify P(x)P(x) and Q(x)Q(x): matching the standard form, P(x)=2P(x)=2 (a constant), Q(x)=6Q(x)=6.
2
Compute the integrating factor: μ(x)=e2dx=e2x\mu(x) = e^{\int 2\,dx} = e^{2x} (Chapter 06 power rule for integration, with the arbitrary constant of integration dropped, since any one antiderivative works here — the same freedom used with FTC Part 2 in Chapter 06).
3
Multiply both sides of the original equation by μ(x)=e2x\mu(x)=e^{2x}: e2xdydx+2e2xy=6e2xe^{2x}\dfrac{dy}{dx}+2e^{2x}y = 6e^{2x}.
4
Recognize the left side as a collapsed derivative (Section 04's formula): ddx[e2xy]=6e2x\dfrac{d}{dx}\big[e^{2x}y\big] = 6e^{2x}.
5
Integrate both sides with respect to xx (Chapter 06, 07): e2xy=6e2xdx=3e2x+Ce^{2x}y = \displaystyle\int 6e^{2x}\,dx = 3e^{2x}+C (u-substitution, Chapter 07, with u=2xu=2x).
6
Solve for yy by dividing through by e2xe^{2x}: y=3+Ce2xy = 3 + Ce^{-2x}.
7
Verify: dydx=2Ce2x\dfrac{dy}{dx} = -2Ce^{-2x}. Check dydx+2y=2Ce2x+2(3+Ce2x)=2Ce2x+6+2Ce2x=6\dfrac{dy}{dx}+2y = -2Ce^{-2x}+2(3+Ce^{-2x}) = -2Ce^{-2x}+6+2Ce^{-2x}=6 ✓.
❌ Forgetting to multiply Q(x) by the integrating factor too

On the same equation, a common slip: multiplying the left side by μ(x)=e2x\mu(x)=e^{2x} correctly, but leaving the right side as plain 66 instead of 6e2x6e^{2x} — writing ddx[e2xy]=6\dfrac{d}{dx}[e^{2x}y] = 6.

Why it breaks: the integrating factor is multiplied through the entire equation, both sides — it isn't a rewriting trick applied only to the left side. Skipping the right side breaks the equality: the left side genuinely equals 6e2x6e^{2x} after substitution (step 3), not 66.

Consequence: integrating the wrong right side gives e2xy=6x+C    y=6xe2x+Ce2xe^{2x}y = 6x+C \implies y = 6xe^{-2x}+Ce^{-2x} — plugging this back into the original equation does not satisfy y+2y=6y'+2y=6 (differentiating and simplifying leaves leftover xx-dependent terms that don't cancel), confirming the error. Every term on both sides must be multiplied by μ(x)\mu(x).


05 · Application — Exponential Growth and Decay

Definition — Exponential Growth/Decay Equation

The separable equation dydt=ky\dfrac{dy}{dt} = ky (rate of change proportional to current amount) has general solution y=y0ekty = y_0e^{kt}, where y0=y(0)y_0=y(0).

Step-by-step — Derive the solution and apply it to a decaying investment balance
1
Separate variables (Section 02's method): 1ydy=kdt\dfrac{1}{y}\,dy = k\,dt.
2
Integrate both sides: lny=kt+C1    y=Cekt\ln\lvert y\rvert = kt+C_1 \implies y = Ce^{kt} (same steps as Section 02's worked example, with x2/2x^2/2 replaced by ktkt).
3
Apply the initial condition y(0)=y0y(0)=y_0: y0=Ce0=Cy_0 = Ce^{0}=C, so y=y0ekty=y_0e^{kt}.
4
Apply to a balance B(t)B(t) starting at 10,00010{,}000 dollars, shrinking at continuous rate k=0.03k=-0.03 (a 3%3\% continuous outflow): B(t)=10,000e0.03tB(t) = 10{,}000\,e^{-0.03t}.
5
Evaluate after 55 years: B(5)=10,000e0.1510,000(0.8607)8607B(5) = 10{,}000\,e^{-0.15} \approx 10{,}000(0.8607) \approx 8607 dollars.

06 · Exercises

EXERCISE 18.1

Separate the variables, integrate each side using Chapter 06/07 tools, then solve explicitly for yy.

dydx=xy\dfrac{dy}{dx} = \dfrac{x}{y}. Separate: ydy=xdxy\,dy = x\,dx. Integrate: y22=x22+C1    y2=x2+C\dfrac{y^2}{2}=\dfrac{x^2}{2}+C_1 \implies y^2 = x^2+C (renaming 2C12C_1 as CC). Solving explicitly: y=±x2+Cy=\pm\sqrt{x^2+C}.

Solve the separable equation dydx=xy\dfrac{dy}{dx} = \dfrac{x}{y}.

EXERCISE 18.2

Find the general solution first, then use the given point to solve for the constant.

dydx=xy\dfrac{dy}{dx}=\dfrac{x}{y}, y(0)=4y(0)=4. From Exercise 18.1, y2=x2+Cy^2=x^2+C. At x=0,y=4x=0,y=4: 16=0+C    C=1616=0+C \implies C=16. Particular solution: y2=x2+16y^2=x^2+16, i.e. y=x2+16y=\sqrt{x^2+16} (taking the positive root to match y(0)=4>0y(0)=4>0).

Solve the initial value problem dydx=xy\dfrac{dy}{dx}=\dfrac{x}{y}, y(0)=4y(0)=4.

EXERCISE 18.3

Identify P(x)P(x) and Q(x)Q(x) in the standard linear form, compute the integrating factor, then multiply through and integrate.

dydx3y=12\dfrac{dy}{dx} - 3y = 12: P(x)=3P(x)=-3, Q(x)=12Q(x)=12. μ(x)=e3dx=e3x\mu(x) = e^{\int -3\,dx} = e^{-3x}. Multiply through: ddx[e3xy]=12e3x\dfrac{d}{dx}[e^{-3x}y] = 12e^{-3x}. Integrate: e3xy=123e3x+C=4e3x+Ce^{-3x}y = \dfrac{12}{-3}e^{-3x}+C = -4e^{-3x}+C. Solve: y=4+Ce3xy = -4+Ce^{3x}.

Solve dydx3y=12\dfrac{dy}{dx} - 3y = 12 using an integrating factor.

EXERCISE 18.4

Determine which specific value of yy makes both sides of the original equation equal to zero, independent of any algebraic rearrangement.

For dydx=xy\dfrac{dy}{dx}=xy (Section 02), y=0y=0 satisfies the equation directly: ddx[0]=0\dfrac{d}{dx}[0]=0 and x(0)=0x(0)=0, both sides match for every xx. Checking whether the general solution y=Cex2/2y=Ce^{x^2/2} captures it: setting C=0C=0 gives y=0y=0 exactly. So the lost solution is recovered as the C=0C=0 case here — but this recovery is not automatic in every separable equation and must always be checked separately.

For the equation dydx=xy\dfrac{dy}{dx}=xy from Section 02, verify directly that y=0y=0 is a solution, and check whether it is captured by the general solution family y=Cex2/2y=Ce^{x^2/2}.

EXERCISE 18.5

This is the exponential growth/decay equation from Section 05 — identify kk from the given continuous rate and apply the solution formula directly.

A quantity grows according to dQdt=0.08Q\dfrac{dQ}{dt}=0.08Q, Q(0)=2000Q(0)=2000. By Section 05, Q(t)=2000e0.08tQ(t)=2000e^{0.08t}. At t=10t=10: Q(10)=2000e0.82000(2.2255)4451Q(10)=2000e^{0.8}\approx2000(2.2255)\approx4451.

A quantity satisfies dQdt=0.08Q\dfrac{dQ}{dt}=0.08Q with Q(0)=2000Q(0)=2000. Find Q(10)Q(10).

EXERCISE 18.6

Recognize the equation as linear first-order in standard form, find the integrating factor, and solve; then apply the initial condition.

A bond's price P(t)P(t) pays continuous coupon income while decaying toward face value: dPdt+0.05P=5\dfrac{dP}{dt} + 0.05P = 5, P(0)=80P(0)=80. μ(t)=e0.05t\mu(t)=e^{0.05t}. ddt[e0.05tP]=5e0.05t\dfrac{d}{dt}[e^{0.05t}P] = 5e^{0.05t}. Integrate: e0.05tP=50.05e0.05t+C=100e0.05t+Ce^{0.05t}P = \dfrac{5}{0.05}e^{0.05t}+C = 100e^{0.05t}+C. Solve: P=100+Ce0.05tP=100+Ce^{-0.05t}. Apply P(0)=80P(0)=80: 80=100+C    C=2080=100+C \implies C=-20. Particular solution: P(t)=10020e0.05tP(t) = 100-20e^{-0.05t} — the price rises from 8080 toward a long-run value of 100100 as tt\to\infty.

A bond's price follows dPdt+0.05P=5\dfrac{dP}{dt}+0.05P=5 with P(0)=80P(0)=80. Solve for P(t)P(t) and describe its long-run behavior as tt\to\infty.


07 · Chapter Summary

ConceptFormula / Rule
OrderHighest derivative appearing in the equation
General vs. particular solutionFamily with constant CC vs. one member fixed by an initial condition
Separable equationdydx=g(x)h(y)\dfrac{dy}{dx}=g(x)h(y); integrate 1hdy=gdx\frac1h\,dy=g\,dx separately
Initial value problemEquation + y(x0)=y0y(x_0)=y_0; solves for CC
Linear first-order formy+P(x)y=Q(x)y'+P(x)y=Q(x)
Integrating factorμ(x)=eP(x)dx\mu(x)=e^{\int P(x)\,dx}; collapses left side to ddx[μy]\dfrac{d}{dx}[\mu y]
Exponential growth/decaydydt=ky    y=y0ekt\dfrac{dy}{dt}=ky \implies y=y_0e^{kt}

Next: Chapter 19 — Differential Equations: Second Order and Systems, which extends these methods to equations involving yy'' and to multiple unknown functions changing together.