Learn Without Walls
← Lesson 1 Lesson 2 of 4 Next Lesson →

Lesson 2: First-Order Linear Equations and Integrating Factors

Estimated time: 35-40 minutes

Learning Objectives

Standard Form

First-Order Linear ODE (Standard Form):

dy/dx + P(x) y = Q(x)

The key: y and y' appear to the first power; P and Q depend only on x.

If the equation is not in standard form (e.g., has a coefficient on y'), divide through first.

The Integrating Factor Method

Integrating Factor:

μ(x) = e∫ P(x) dx

Multiply both sides by μ(x). The left side becomes d/dx[μ(x) y], so:

μ(x) y = ∫ μ(x) Q(x) dx + C

Why Does This Work?

After multiplying by μ, the left side μy' + μPy equals d/dx[μy] by the product rule (since μ' = Pμ). This collapses the equation into a single derivative, which we can integrate directly.

Worked Examples

Example 1: Constant Coefficient

Solve y' + 2y = 6.

Step 1: P(x) = 2, Q(x) = 6. Already in standard form.

Step 2: μ = e∫2 dx = e2x.

Step 3: Multiply: e2x y' + 2e2x y = 6e2x.

d/dx[e2x y] = 6e2x

Step 4: Integrate: e2x y = 3e2x + C.

Step 5: Solve: y = 3 + Ce-2x.

Example 2: Variable Coefficient

Solve y' + (1/x)y = x,   x > 0.

Step 1: P(x) = 1/x, Q(x) = x.

Step 2: μ = e∫(1/x)dx = eln x = x.

Step 3: Multiply: xy' + y = x², i.e., d/dx[xy] = x².

Step 4: Integrate: xy = x³/3 + C.

Step 5: y = x²/3 + C/x.

Example 3: With IVP

Solve y' - 3y = e2x,   y(0) = 1.

Step 1: P(x) = -3, Q(x) = e2x.

Step 2: μ = e∫-3 dx = e-3x.

Step 3: d/dx[e-3x y] = e-3x · e2x = e-x.

Step 4: Integrate: e-3x y = -e-x + C.

Step 5: y = -e2x + Ce3x.

Step 6: y(0) = 1: 1 = -1 + C, so C = 2.

Particular solution: y = -e2x + 2e3x.

Check Your Understanding

1. Solve y' + 5y = 10.

μ = e5x. d/dx[e5xy] = 10e5x. Integrate: e5xy = 2e5x + C. y = 2 + Ce-5x.

2. Solve y' + (2/x)y = x³, x > 0.

μ = e∫(2/x)dx = x². d/dx[x²y] = x5. Integrate: x²y = x6/6 + C. y = x4/6 + C/x².

3. Solve y' - y = ex, y(0) = 0.

μ = e-x. d/dx[e-xy] = 1. Integrate: e-xy = x + C. y = (x+C)ex. y(0)=0: C=0. y = xex.

4. What is the integrating factor for y' + (tan x)y = cos x?

μ = e∫tan x dx = e-ln|cos x| = 1/cos x = sec x.

5. Is the equation xy' + 2y = x³ linear? What is P(x) in standard form?

Yes, it is linear. Divide by x: y' + (2/x)y = x². So P(x) = 2/x.

Key Takeaways

Next Lesson

Learn to solve exact equations using the exactness condition.

Lesson 3

Module Home

Module 2