Lesson 2: First-Order Linear Equations and Integrating Factors
Estimated time: 35-40 minutes
Learning Objectives
- Identify a first-order linear ODE in standard form
- Compute the integrating factor μ(x) = e∫P(x)dx
- Multiply through by μ and recognize the left side as a product-rule derivative
- Solve and apply initial conditions
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.
2. Solve y' + (2/x)y = x³, x > 0.
3. Solve y' - y = ex, y(0) = 0.
4. What is the integrating factor for y' + (tan x)y = cos x?
5. Is the equation xy' + 2y = x³ linear? What is P(x) in standard form?
Key Takeaways
- Standard form: y' + P(x)y = Q(x). Always put the equation in this form first.
- Integrating factor: μ = e∫P(x)dx. No constant of integration needed here.
- Multiply through by μ; the left side becomes d/dx[μy].
- Integrate both sides, solve for y, then apply initial conditions.
- This method works for every first-order linear equation -- it always produces the general solution.