# Chapter 30: Differential Equations

> Equations with derivatives: separable, linear (integrating factors), constant-coefficient second order — plus the modeling loop.

**Canonical:** https://calculus.kitzo.work/chapter/differential-equations  
**Level:** Advanced  
**Estimated time:** 60 minutes  
**Exercises:** 8 (auto-marked; answers stay server-side)

## Topics
- Separable equations
- First-order linear equations
- Constant-coefficient 2nd order
- Particular solutions
- Initial value problems
- Modeling with ODEs

**Why this matters**

Wherever something changes at a rate that depends on itself — populations, loans, circuits, orbits — a differential equation is the honest description. Learning to solve the two classical families covers most real modeling.

## 1 · Separable equations — the easiest win

If dy/dx = g(x)·h(y), separate: dy/h(y) = g(x)dx, integrate both sides, rejoin with a constant C. Check: dy/dx = 2xy → dy/y = 2xdx → ln|y| = x² + C → y = Ae^{x²}.

**Worked example 1**

Solve dy/dx = (1+y)/(1+x), y(0)=1. Separate: dy/(1+y) = dx/(1+x) → ln|1+y| = ln|1+x| + C → 1+y = A(1+x). Using y(0)=1 gives A=2, so y = 2x+1.

## 2 · First-order linear with an integrating factor

For y′ + P(x)y = Q(x), multiply by μ(x) = e^{∫P(x)dx}: (μy)′ = μQ. Integrate, divide by μ.

**Worked example 2**

y′ + (1/x)y = x. Here P = 1/x, μ = e^{ln|x|} = x. Then (xy)′ = x², so xy = x³/3 + C, and y = x²/3 + C/x.

**Watch out**

Division by x loses x=0 as a singular point. The integrating factor derivation assumes the coefficient of y is continuous where you live — check the domain before you declare victory.

## 3 · Constant-coefficient second order — the characteristic equation

For ay″ + by′ + cy = 0, guess y = e^{rx} and solve ar² + br + c = 0:

- **Two distinct real r₁, r₂:** y = C₁e^{r₁x} + C₂e^{r₂x}.

- **Repeated root r:** y = (C₁ + C₂x)e^{rx}.

- **Complex roots α ± βi:** y = e^{αx}(C₁cos(βx) + C₂sin(βx)).

**Worked example 3**

y″ − 3y′ + 2y = 0. Characteristic: r² −3r + 2 = (r−1)(r−2). So y = C₁eˣ + C₂e^{2x}.

## 4 · Particular solutions — when the right side fights back

For ay″ + by′ + cy = Q(x) with Q polynomial/exponential/trig, guess the same family. If a guess collides with a homogeneous solution (a “conflict”), multiply by x until it separates.

**Worked example 4**

y″ − 3y′ + 2y = eˣ. Since eˣ already solves the homogeneous part, try y_p = A·x·eˣ. Substituting gives A = 1, so y_p = xeˣ. General solution: y = C₁eˣ + C₂e^{2x} + xeˣ.

## 5 · Initial value problems

The constants C₁, C₂ are fixed by point conditions (y(0), y′(0)). Modeling problems — population decay, loan balance, spring motion — always end with “use the initial data to choose the unique solution meaningful in context.”

**Chapter formula sheet**

Separable: dy/h(y) = g(x)dx → integrate → solve for y

Linear: y′ + P(x)y = Q(x) ⇒ μ = e^{∫Pdx}, (μy)′ = μQ

Constant-coeff homogeneous: ar² + br + c = 0 → e^{rx} forms above

Conflict rule: if a guess duplicates a homogeneous term, multiply by x

IVP: constants from y(0), y′(0), …

## Common mistakes

- Forgetting the +C (or +C₁, +C₂) — the general solution is a family, not one curve.

- Satisfying the ODE but not the initial conditions.

- Using the integrating factor without checking where its pieces are continuous.

- Missing the repeated-root x factor (C₁ + C₂x)e^{rx} — it’s not a typo.

- Guessing a particular solution that duplicates the homogeneous one without the x multiplier.

## Practice exercises

1. A separable ODE has the form:

- A. dy/dx = g(x)·h(y)
- B. dy/dx = g(x) + h(y)
- C. y = x² + C
- D. homogeneous only

2. Solve dy/dx = 2xy with y(0) = 3. Evaluate y(0).

3. For y′ + (1/x)y = x, the integrating factor (up to a constant) is:

4. y″ − 3y′ + 2y = 0 has characteristic roots:

- A. 1 and 2
- B. −1 and −2
- C. 3 and 2
- D. 1 (double)

5. The general solution of y″ + y = 0 with y(0)=0, y′(0)=1 is y = sin x. Evaluate y(π).

6. For a repeated characteristic root r, the homogeneous solution is:

- A. (C₁ + C₂x)e^{rx}
- B. C₁e^{rx} + C₂e^{rx} (redundant)
- C. C₁cos(rx) + C₂sin(rx)
- D. C₁x + C₂x²

7. y″ − 3y′ + 2y = eˣ needs a particular solution of the form:

- A. A·x·eˣ
- B. A·eˣ
- C. A·x²·eˣ
- D. A·sin x

8. A first-order linear ODE is one of the form:

---

Practice interactively: https://calculus.kitzo.work/chapter/differential-equations

Citation: CalculusKitzo (https://calculus.kitzo.work/). Independent study notes inspired by the standard calculus syllabus; not affiliated with Princeton University Press. See https://calculus.kitzo.work/disclaimer
