4.6.4Ordinary Differential Equations

First-order linear ODEs — integrating factor method (derivation)

1,600 words7 min readdifficulty · medium6 backlinks

WHAT is a first-order linear ODE?

WHY "standard form" matters: every formula below assumes the coefficient of dydx\frac{dy}{dx} is exactly 11. If yours is a(x)dydx+a(x)\frac{dy}{dx}+\dots, divide through by a(x)a(x) first.


HOW to derive the integrating factor (from scratch)

We want to multiply the whole equation by some function μ(x)\mu(x): μdydx+μPy=μQ.\mu\frac{dy}{dx} + \mu P y = \mu Q.

Compare term-by-term with our left side μdydx+μPy\mu\frac{dy}{dx} + \mu P\,y:

our left side product rule
μdydx\mu\frac{dy}{dx} μdydx\mu\frac{dy}{dx} ✓ (already match)
μPy\mu P\, y dμdxy\frac{d\mu}{dx}\,y

So the only condition we need is the coefficients of yy to match: dμdx=μP(x)\boxed{\frac{d\mu}{dx} = \mu P(x)}

This is itself a separable ODE for μ\mu! Solve it: dμμ=Pdx    dμμ=Pdx    lnμ=Pdx.\frac{d\mu}{\mu} = P\,dx \;\Rightarrow\; \int\frac{d\mu}{\mu} = \int P\,dx \;\Rightarrow\; \ln|\mu| = \int P\,dx.

Exponentiate (drop the constant — we only need one working factor):


HOW to finish the solution

Once multiplied, the equation becomes ddx(μy)=μQ.\frac{d}{dx}\big(\mu y\big) = \mu Q. Integrate both sides w.r.t. xx: μy=μQdx+C.\mu y = \int \mu Q\,dx + C.

Figure — First-order linear ODEs — integrating factor method (derivation)

Worked Examples


Common Mistakes (Steel-manned)


Active Recall

Recall Quick self-test (cover the answers)
  • What MUST the coefficient of dydx\frac{dy}{dx} be before applying the method? → 11
  • What single derivative does the left side become? → ddx(μy)\frac{d}{dx}(\mu y)
  • Where does the constant CC go? → only at the final integration step
Recall Feynman: explain to a 12-year-old

Imagine two kids, "dydx\frac{dy}{dx}-kid" and "PyPy-kid", refusing to hold hands so you can't carry them together. The integrating factor μ\mu is a special pair of mittens: once everyone wears the same mittens, they magically join into one bundle, μy\mu y, that you can pick up (integrate) in a single grab. The mittens are chosen so the joining is automatic — that's why μ=eP\mu = e^{\int P}.


Flashcards

Standard form of a first-order linear ODE?
dydx+P(x)y=Q(x)\dfrac{dy}{dx}+P(x)y=Q(x)
Formula for the integrating factor?
μ(x)=eP(x)dx\mu(x)=e^{\int P(x)\,dx}
What condition on μ\mu makes the left side a single derivative?
dμdx=μP(x)\dfrac{d\mu}{dx}=\mu P(x)
After multiplying by μ\mu, the LHS equals which single derivative?
ddx(μy)\dfrac{d}{dx}(\mu y)
General solution of the linear ODE?
y=1μ[μQdx+C]y=\dfrac{1}{\mu}\left[\int \mu Q\,dx + C\right]
First thing to do if coefficient of yy' is not 1?
Divide the whole equation by that coefficient to standardize
Why do we drop the +C+C when computing μ\mu?
It becomes a multiplicative eCe^C that cancels; one working factor suffices
μ\mu for dydx+1xy=\frac{dy}{dx}+\frac1x y = \dots?
μ=e1xdx=x\mu=e^{\int \frac1x dx}=x
For dydx+2y=ex\frac{dy}{dx}+2y=e^x, the integrating factor is?
e2xe^{2x}
Where is the integration constant introduced?
Only at the final integration μy=μQdx+C\mu y=\int\mu Q\,dx + C

Connections

  • Separable ODEs — used inside this derivation to solve for μ\mu.
  • Product Rule — the engine that makes μdydx+μPy=ddx(μy)\mu\frac{dy}{dx}+\mu P y=\frac{d}{dx}(\mu y).
  • Exact ODEs — integrating factors generalize to making non-exact equations exact.
  • Bernoulli Equations — reduce to linear form by substitution v=y1nv=y^{1-n}.
  • Linear Constant-Coefficient ODEs — special case P,QP,Q constant.

Concept Map

rewrite into

multiply by

hope matches

compare with

forces

is a

solve gives

makes LHS

integrate w.r.t x

solve for y

First-order linear ODE

Standard form dy/dx + Py = Q

Multiply by mu of x

Want left side as single derivative

Product rule d/dx of mu y

Condition dmu/dx = mu P

Separable ODE for mu

Integrating factor mu = exp integral P

d/dx of mu y = mu Q

Integrate both sides

General solution for y

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, first-order linear ODE ka standard roop hota hai dydx+P(x)y=Q(x)\frac{dy}{dx}+P(x)y=Q(x). Problem ye hai ki left side pe do alag-alag terms hain — ek derivative aur ek PyPy — inko ek saath integrate karna mushkil hai. Yahaan integrating factor ka jadoo aata hai: pura equation ko μ(x)\mu(x) se multiply karo taaki left side seedha ddx(μy)\frac{d}{dx}(\mu y) ban jaaye, yaani ek hi derivative. Phir dono taraf integrate karo, kaam khatam.

μ\mu kaha se aaya? Hum chahte hain ki product rule ke according ddx(μy)=μdydx+dμdxy\frac{d}{dx}(\mu y)=\mu\frac{dy}{dx}+\frac{d\mu}{dx}y humare left side se match kare. Match tabhi hoga jab dμdx=μP\frac{d\mu}{dx}=\mu P. Ye toh ek chhota separable equation hai — solve karne pe μ=ePdx\mu=e^{\int P\,dx} mil jaata hai. Bas isi liye formula yaad rakhne ki zaroorat nahi, derive kar sakte ho.

Do baatein hamesha dhyan rakho: pehle equation ko standard form mein laao (yaani dydx\frac{dy}{dx} ka coefficient 11 hona chahiye, warna divide karo), aur constant CC sirf last integration mein lagao, μ\mu banate waqt nahi. Aur final answer mein μ\mu se divide karna mat bhoolna — kyunki tumhare paas μy\mu y hota hai, sirf yy nahi.

Yeh method exams mein bahut common hai aur Bernoulli, exact equations sab ki neev (foundation) hai. Recipe yaad rakho: "Standardize, Mu, Multiply, Integrate, Divide". Practice se ye 30 second ka kaam ban jaata hai.

Go deeper — visual, from zero

Test yourself — Ordinary Differential Equations

Connections