Skip to main content

Thomas’ Calculus · Chapter 09 · Section 9.2

By Muhammad Abdullah Athar · SymPy Verified

First-Order Linear Equations

❦

Read this page the way you would a book: first the notes, then the key ideas, then every worked example in order — each step explains not only what to do, but why it works.

Part One

Section Notes

❧

Section 9.2: First-Order Linear Equations

First-order linear ODEs have standard form dydx+P(x)y=Q(x)\frac{dy}{dx} + P(x)y = Q(x).


1. Solution Algorithm

  1. Standard Form: Put equation into dydx+P(x)y=Q(x)\frac{dy}{dx} + P(x)y = Q(x).
  2. Integrating Factor: Calculate μ(x)=e∫P(x)dx\mu(x) = e^{\int P(x) dx}.
  3. Multiply: μ(x)dydx+μ(x)P(x)y=ddx[μ(x)y]=μ(x)Q(x)\mu(x) \frac{dy}{dx} + \mu(x) P(x) y = \frac{d}{dx}[\mu(x) y] = \mu(x) Q(x).
  4. Integrate: μ(x)y=∫μ(x)Q(x)dx+C\mu(x) y = \int \mu(x) Q(x) dx + C.
  5. Solve for yy: y=1μ(x)(∫μ(x)Q(x)dx+C)y = \frac{1}{\mu(x)} \left( \int \mu(x) Q(x) dx + C \right).

Part Two

Key Ideas to Remember

1 essential statements for this section, each with a plain-words explanation.

Theorem #1Sec 9.2

The Integrating Factor Method

dydx+P(x)y=Q(x)  ⟹  μ(x)=e∫P(x)dx,y(x)=1μ(x)∫μ(x)Q(x)dx\frac{dy}{dx} + P(x)y = Q(x) \implies \mu(x) = e^{\int P(x) dx}, \quad y(x) = \frac{1}{\mu(x)} \int \mu(x) Q(x) dx

Any first-order linear differential equation in standard form dy/dx + P(x)y = Q(x) can be solved by multiplying through by the integrating factor mu(x) = exp(int P(x)dx), collapsing the left side into the product derivative d/dx[mu(x) y].

Conditions: P(x) and Q(x) are continuous on interval I

In plain words: Transforms an insoluble equation into an exact total derivative.

Remember — Multiply by mu(x) = exp(int P dx) to collapse left side into d/dx[mu * y].

Part Three

Worked Examples

5 exercises, solved in full. Every answer has been checked symbolically with SymPy before printing.

Example 01(Section 9.2, Exercise 1)

Warm-up

Problem. Solve dy/dx + 2y = e^(-x).

Step-by-Step Derivation (3 steps)

1

Find Integrating Factor mu(x)

P(x)=2  ⟹  μ(x)=e∫2dx=e2xP(x) = 2 \implies \mu(x) = e^{\int 2 dx} = e^{2x}

Integrate constant coefficient 2.

Why this works: Integrating factor definition.
2

Multiply and Collapse Left Side

e2xdydx+2e2xy=ddx[e2xy]=e2xe−x=exe^{2x} \frac{dy}{dx} + 2e^{2x}y = \frac{d}{dx}[e^{2x} y] = e^{2x} e^{-x} = e^x

Collapse left side into derivative of product.

Why this works: Product rule reversal.
3

Integrate and Solve for y

e2xy=∫exdx=ex+C  ⟹  y(x)=e−2x(ex+C)=e−x+Ce−2xe^{2x} y = \int e^x dx = e^x + C \implies y(x) = e^{-2x}(e^x + C) = e^{-x} + C e^{-2x}

Divide both sides by e^(2x).

Why this works: Explicit solution.

Answer: y(x)=e−x+Ce−2xy(x) = e^{-x} + C e^{-2x}

✓ Verified by SymPy CAS

Example 02(Section 9.2, Exercise 2)

Core practice

Problem. Solve x dy/dx + 2y = 4x^2 for x > 0.

Step-by-Step Derivation (3 steps)

1

Convert to Standard Form

dydx+2xy=4x\frac{dy}{dx} + \frac{2}{x} y = 4x

Divide all terms by x.

Why this works: Standard form dy/dx + P y = Q.
2

Compute Integrating Factor

P(x)=2x  ⟹  μ(x)=e∫(2/x)dx=e2ln⁡(x)=eln⁡(x2)=x2P(x) = \frac{2}{x} \implies \mu(x) = e^{\int (2/x) dx} = e^{2\ln(x)} = e^{\ln(x^2)} = x^2

Simplify exponential of logarithm.

Why this works: Integrating factor.
3

Multiply and Integrate

ddx[x2y]=x2(4x)=4x3  ⟹  x2y=∫4x3dx=x4+C  ⟹  y(x)=x2+Cx2\frac{d}{dx}[x^2 y] = x^2(4x) = 4x^3 \implies x^2 y = \int 4x^3 dx = x^4 + C \implies y(x) = x^2 + \frac{C}{x^2}

Integrate 4x^3 to x^4 and divide by x^2.

Why this works: Final general solution.

Answer: y(x)=x2+Cx2y(x) = x^2 + \frac{C}{x^2}

✓ Verified by SymPy CAS

Example 03(Section 9.2, Exercise 3)

Core practice

Problem. Solve dy/dx + y tan(x) = cos^2(x) with y(0) = 2 on (-pi/2, pi/2).

Step-by-Step Derivation (3 steps)

1

Compute Integrating Factor

P(x)=tan⁡(x)  ⟹  μ(x)=e∫tan⁡(x)dx=eln⁡∣sec⁡(x)∣=sec⁡(x)P(x) = \tan(x) \implies \mu(x) = e^{\int \tan(x) dx} = e^{\ln|\sec(x)|} = \sec(x)

On (-pi/2, pi/2), sec(x) > 0.

Why this works: Integrating factor.
2

Multiply and Integrate

ddx[sec⁡(x)y]=sec⁡(x)cos⁡2(x)=cos⁡(x)  ⟹  sec⁡(x)y=∫cos⁡(x)dx=sin⁡(x)+C\frac{d}{dx}[\sec(x) y] = \sec(x) \cos^2(x) = \cos(x) \implies \sec(x) y = \int \cos(x) dx = \sin(x) + C

sec(x) * cos^2(x) = cos(x).

Why this works: Exact derivative.
3

Apply Initial Condition y(0) = 2

y(x)=cos⁡(x)(sin⁡(x)+C);y(0)=1(0+C)=2  ⟹  C=2  ⟹  y(x)=sin⁡(x)cos⁡(x)+2cos⁡(x)y(x) = \cos(x)(\sin(x) + C); \quad y(0) = 1(0 + C) = 2 \implies C = 2 \implies y(x) = \sin(x)\cos(x) + 2\cos(x)

Solve for C and distribute cos(x).

Why this works: Unique particular solution.

Answer: y(x)=sin⁡(x)cos⁡(x)+2cos⁡(x)y(x) = \sin(x)\cos(x) + 2\cos(x)

✓ Verified by SymPy CAS

Example 04(Section 9.2, Exercise 4)

Challenge

Problem. Solve dy/dx + y = 1 for 0 <= x <= 1 with y(0) = 0.

Step-by-Step Derivation (3 steps)

1

Integrating Factor

μ(x)=e∫1dx=ex\mu(x) = e^{\int 1 dx} = e^x

Simple exponential factor.

Why this works: Integrating factor.
2

Integrate Equation

ddx[exy]=ex  ⟹  exy=ex+C  ⟹  y(x)=1+Ce−x\frac{d}{dx}[e^x y] = e^x \implies e^x y = e^x + C \implies y(x) = 1 + C e^{-x}

General solution.

Why this works: Antiderivative of e^x.
3

Apply Initial Condition y(0) = 0

0=1+C(1)  ⟹  C=−1  ⟹  y(x)=1−e−x0 = 1 + C(1) \implies C = -1 \implies y(x) = 1 - e^{-x}

Particular solution.

Why this works: Initial value condition.

Answer: y(x)=1−e−xy(x) = 1 - e^{-x}

✓ Verified by SymPy CAS

Example 05(Section 9.2, Exercise 5)

Core practice

Problem. For dy/dt + 3y = 6, identify the transient and steady-state components of the general solution.

Step-by-Step Derivation (2 steps)

1

Find Integrating Factor and General Solution

μ(t)=e3t  ⟹  ddt[e3ty]=6e3t  ⟹  e3ty=2e3t+C  ⟹  y(t)=2+Ce−3t\mu(t) = e^{3t} \implies \frac{d}{dt}[e^{3t} y] = 6e^{3t} \implies e^{3t} y = 2e^{3t} + C \implies y(t) = 2 + C e^{-3t}

Solve linear ODE.

Why this works: General solution formulation.
2

Identify Limit as t -> oo

lim⁡t→∞Ce−3t=0  ⟹  lim⁡t→∞y(t)=2\lim_{t \to \infty} C e^{-3t} = 0 \implies \lim_{t \to \infty} y(t) = 2

Exponential decay term dies out.

Why this works: Steady-state definition.

Answer: y(t)=2+Ce−3t,Steady-State=2,Transient=Ce−3ty(t) = 2 + C e^{-3t}, \quad \text{Steady-State} = 2, \quad \text{Transient} = C e^{-3t}

✓ Verified by SymPy CAS