First-Order Equations

Study Sheet

First-Order Equations

Separable equations and integrating factors

The Two Workhorse Methods

Tip
Separable: sort, then integrate

If dydx=g(x)h(y)\tfrac{dy}{dx} = g(x)h(y), move all yy’s left and xx’s right: dyh(y)=g(x)dx\tfrac{dy}{h(y)} = g(x)\,dx, integrate both sides, and solve for yy. The prototype y=kyy' = ky gives exponential growth/decay y=y0ekxy = y_0e^{kx}, and half-life problems are the case k=ln2t1/2k = -\tfrac{\ln 2}{t_{1/2}}.

Tip
Linear: multiply by the integrating factor

For y+p(x)y=q(x)y' + p(x)y = q(x), multiply through by μ=epdx\mu = e^{\int p\,dx}: the left side collapses to (μy)(\mu y)' by design, and one integration finishes it. Example: y+y=exy' + y = e^x with μ=ex\mu = e^x gives (exy)=e2x(e^xy)' = e^{2x}, hence y=ex2+Cexy = \tfrac{e^x}{2} + Ce^{-x}.

Example
Always verify by plugging back

Claimed solution of y=xyy' = xy, y(0)=2y(0)=2: y=2ex2/2y = 2e^{x^2/2}. Check: y=2xex2/2=xyy' = 2xe^{x^2/2} = x\cdot y ✓ and y(0)=2y(0) = 2 ✓ — a thirty-second check that catches most integration slips.

Side note
Significance: the two methods cover most of nature

Radioactive dating, drug clearance, RC circuits, compound interest, and atmospheric pressure with altitude are all separable or linear first-order equations. Carbon-14 dating is literally the half-life computation of this topic applied to archaeology: measure the remaining fraction, invert ekte^{kt}.

Try it
Try it: triage then solve

Classify and solve y=xyy' = \dfrac{x}{y} with y(0)=2y(0) = 2. Work: separable: ydy=xdxy\,dy = x\,dx, so y22=x22+C\tfrac{y^2}{2} = \tfrac{x^2}{2} + C; the data give C=2C = 2: y=x2+4y = \sqrt{x^2 + 4} (positive root, since y(0)=2>0y(0) = 2 > 0). Verify: y=xx2+4=xyy' = \tfrac{x}{\sqrt{x^2+4}} = \tfrac xy ✓.

Proofs & Why It Matters

Tip
Proof: the integrating factor works

With μ=epdx\mu = e^{\int p\,dx}, note μ=pμ\mu' = p\mu (chain rule). Then (μy)=μy+μy=μ(y+py)(\mu y)' = \mu y' + \mu'y = \mu\left(y' + py\right) — the product rule REBUILDS the left side of y+py=qy' + py = q exactly. So the equation becomes (μy)=μq(\mu y)' = \mu q; integrate once and divide by μ\mu. The factor is engineered so the product rule does the collapsing. \blacksquare

Reminder — The differentiation rules:(xn)=nxn1,(fg)=fg+fg,(fg)=fgfgg2,(f(g(x)))=f(g(x))g(x)(x^{n})'=nx^{n-1},\quad (fg)'=f'g+fg',\quad \left(\tfrac{f}{g}\right)'=\frac{f'g-fg'}{g^{2}},\quad \big(f(g(x))\big)'=f'(g(x))g'(x)
Tip
Proof: separation of variables is legitimate

If dydx=g(x)h(y)\tfrac{dy}{dx} = g(x)h(y) with h(y)0h(y) \ne 0, divide: y(x)h(y(x))=g(x)\tfrac{y'(x)}{h(y(x))} = g(x). Integrate both sides in xx; on the left, substitute u=y(x)u = y(x), du=y(x)dxdu = y'(x)dx (the chain rule in reverse): duh(u)=g(x)dx\int\tfrac{du}{h(u)} = \int g(x)\,dx.

The informal "move the dydy" is shorthand for exactly this substitution — nothing illegal happens. \blacksquare

Tip
Proof: exponential solutions and half-life

y=kyy' = ky separates to dyy=kdx\int\tfrac{dy}{y} = \int k\,dx, so lny=kx+C\ln|y| = kx + C and y=y0ekxy = y_0e^{kx} — and this is the ONLY solution: if zz also solves it, then (zekx)=zekxkzekx=0(z e^{-kx})' = z'e^{-kx} - kze^{-kx} = 0, so zekxze^{-kx} is constant. Setting y(t1/2)=y02y(t_{1/2}) = \tfrac{y_0}{2} gives ekt1/2=12e^{kt_{1/2}} = \tfrac12, i.e. k=ln2t1/2k = -\tfrac{\ln 2}{t_{1/2}}. \blacksquare

Going Deeper: Explanations & Worked Problems

Concept
Reading an equation: which method, and why

Given y=(something)y' = (\text{something}), the triage is: can the right side be FACTORED as g(x)h(y)g(x)h(y) — a pure-xx piece times a pure-yy piece? Then separate. Is it LINEAR in yy — expressible as y+p(x)y=q(x)y' + p(x)y = q(x) with yy appearing alone to the first power? Then integrating factor.

(y=xyy' = x - y hides its linearity until rearranged: y+y=xy' + y = x.) Some equations are both (y=kyy' = ky), many are neither — those go to slope fields, Euler, or substitutions. Two habits matter more than any method. First, TRACK THE CONSTANT from the moment you integrate: it lives inside the exponential as y=Cekxy = Ce^{kx}, not tacked on the end as ekx+Ce^{kx} + C — a wrong constant placement is the single most common first-order error. Second, plug the final answer back into the original equation; ten seconds of differentiation catches nearly everything.

Example
Worked: a separable IVP with the constant handled honestly

Solve y=xyy' = xy with y(0)=2y(0) = 2.

Step 1 — separate: dyy=xdx\dfrac{dy}{y} = x\,dx (noting y0y \equiv 0 is a solution we are not on, since y(0)=2y(0) = 2).

Step 2 — integrate BOTH sides: lny=x22+C\ln|y| = \tfrac{x^2}{2} + C.

Step 3 — exponentiate carefully: y=eCex2/2|y| = e^Ce^{x^2/2}, and absorbing the sign into a new constant A=±eCA = \pm e^C: y=Aex2/2y = Ae^{x^2/2} — the constant is MULTIPLICATIVE.

Step 4 — apply the initial condition: 2=Ae0=A2 = Ae^0 = A, so y=2ex2/2y = 2e^{x^2/2}.

Step 5 — verify: y=2xex2/21=xyy' = 2xe^{x^2/2}\cdot 1 = x\cdot y ✓ and y(0)=2y(0) = 2 ✓. Watch what Step 3 prevented: writing y=ex2/2+Cy = e^{x^2/2} + C and "solving" C=1C = 1 gives a function that fails the original equation instantly.

Example
Worked: an integrating-factor IVP, start to finish

Solve y+2y=6y' + 2y = 6 with y(0)=0y(0) = 0.

Step 1 — identify p=2p = 2, q=6q = 6; the factor is μ=e2dx=e2x\mu = e^{\int 2\,dx} = e^{2x}.

Step 2 — multiply the whole equation: e2xy+2e2xy=6e2xe^{2x}y' + 2e^{2x}y = 6e^{2x}, whose left side is EXACTLY (e2xy)(e^{2x}y)' — that collapse is guaranteed by the construction, so if it does not factor cleanly, recheck μ\mu.

Step 3 — integrate: e2xy=3e2x+Ce^{2x}y = 3e^{2x} + C.

Step 4 — solve: y=3+Ce2xy = 3 + Ce^{-2x}; the condition y(0)=0y(0) = 0 gives C=3C = -3, so y=33e2xy = 3 - 3e^{-2x}.

Step 5 — verify and interpret: y=6e2xy' = 6e^{-2x} and y+2y=6e2x+66e2x=6y' + 2y = 6e^{-2x} + 6 - 6e^{-2x} = 6 ✓; the solution climbs from 00 toward the equilibrium 33 (where y=0y' = 0 forces 2y=62y = 6) — the phase-line picture and the formula telling one story.