01 / 20
\( \mu \)

Integrating Factor
Method

Master the technique for solving first-order linear ODEs by multiplying through with a carefully chosen function.

Differential Equations

What is a First-Order Linear ODE?

A first-order linear ordinary differential equation has the standard form:

$$ \frac{dy}{dx} + P(x)\,y = Q(x) $$

\( \frac{dy}{dx} \)
The derivative of the unknown function \( y \) with respect to \( x \).
\( P(x) \)
A known coefficient function multiplying \( y \).
\( Q(x) \)
The known "forcing" function on the right-hand side.

The Big Idea

The left side of \( \frac{dy}{dx} + P(x)\,y = Q(x) \) almost looks like the derivative of a product, but not quite. If we could find a function \( \mu(x) \) to multiply both sides so that the left side becomes an exact product derivative, we could integrate directly.

Why It Works: The Product Rule

Recall the product rule:

$$ \frac{d}{dx}\big[\mu(x)\,y\big] = \mu(x)\,\frac{dy}{dx} + \mu'(x)\,y $$

Compare with our goal after multiplying by \( \mu \):

$$ \mu(x)\,\frac{dy}{dx} + \mu(x)\,P(x)\,y $$

Deriving \( \mu(x) \)

From \( \mu'(x) = \mu(x)\,P(x) \), separate and integrate:

$$ \frac{d\mu}{\mu} = P(x)\,dx \quad\Longrightarrow\quad \ln|\mu| = \int P(x)\,dx $$

$$ \boxed{\;\mu(x) = e^{\int P(x)\,dx}\;} $$

The Core Formula

After multiplying through and integrating both sides, the general solution is:

$$ y = \frac{1}{\mu(x)}\!\left[\int \mu(x)\,Q(x)\,dx + C\right] $$

where \( \mu(x) = e^{\int P(x)\,dx} \).

Identify \( P(x) \)
Compute
\( \mu(x) = e^{\int P(x)dx} \)
Multiply, integrate,
solve for \( y \)

Integrating Factor vs. Separation of Variables

Integrating Factor Separation of Variables
Form \( y' + P(x)\,y = Q(x) \) \( g(y)\,dy = f(x)\,dx \)
Works when ODE is linear in \( y \) Variables can be separated
Key step Multiply by \( \mu(x) \) Move all \( y \) terms to one side
Limitation First-order linear only Not all ODEs are separable

How to Apply the Method

1
Write in standard form: \( \frac{dy}{dx} + P(x)\,y = Q(x) \). Divide by the leading coefficient of \( y' \) if needed.
2
Identify \( P(x) \): the coefficient of \( y \) in standard form.
3
Compute the integrating factor: \( \mu(x) = e^{\int P(x)\,dx} \).
4
Multiply both sides of the ODE by \( \mu(x) \). The left side becomes \( \frac{d}{dx}\!\big[\mu\,y\big] \).
5
Integrate both sides and solve for \( y \). Don't forget \( +\,C \).

Example 1: Simple Case

Solve: \( \dfrac{dy}{dx} + 2y = 6 \)

1
Already in standard form: \( P(x) = 2 \), \( Q(x) = 6 \).
2
Integrating factor: \( \mu = e^{\int 2\,dx} = e^{2x} \).
3
Multiply: \( \frac{d}{dx}\!\big[e^{2x}\,y\big] = 6e^{2x} \).
4
Integrate: \( e^{2x}\,y = 3e^{2x} + C \).

Visualizing \( y = 3 + Ce^{-2x} \)

x y 1 3 5
\(y=3\)
\(C=2\)
\(C=-2\)
\(C=0\)

Example 2: Variable Coefficient

Solve: \( \dfrac{dy}{dx} + \dfrac{1}{x}\,y = x^2 \), \( x > 0 \)

1
Standard form with \( P(x) = \frac{1}{x} \), \( Q(x) = x^2 \).
2
\( \mu = e^{\int \frac{1}{x}\,dx} = e^{\ln x} = x \).
3
Multiply: \( \frac{d}{dx}[x\,y] = x^3 \).
4
Integrate: \( x\,y = \frac{x^4}{4} + C \).

Example 3: Initial Value Problem

Solve: \( \dfrac{dy}{dx} - 3y = e^{5x} \), \(\; y(0) = 2 \)

1
\( P(x) = -3 \), so \( \mu = e^{-3x} \).
2
\( \frac{d}{dx}[e^{-3x}\,y] = e^{-3x}\cdot e^{5x} = e^{2x} \).
3
Integrate: \( e^{-3x}\,y = \frac{1}{2}e^{2x} + C \).
4
\( y = \frac{1}{2}e^{5x} + Ce^{3x} \). Apply \( y(0) = 2 \): \( 2 = \frac{1}{2} + C \Rightarrow C = \frac{3}{2} \).

When Does It Apply?

The integrating factor method works on every first-order linear ODE. Watch for equations that look nonlinear but can be rearranged:

✓ Linear
\( xy' + 2y = \sin x \)
Divide by \( x \) to get standard form.
✕ Nonlinear
\( y' + y^2 = x \)
The \( y^2 \) makes this a Riccati equation.

Common Integrating Factors

\( P(x) \) \( \int P(x)\,dx \) \( \mu(x) \)
\( a \) (constant) \( ax \) \( e^{ax} \)
\( \frac{n}{x} \) \( n\ln|x| \) \( |x|^n \)
\( \frac{1}{x+a} \) \( \ln|x+a| \) \( |x+a| \)
\( \sec^2 x \) \( \tan x \) \( e^{\tan x} \)
\( -\sin x \) \( \cos x \) \( e^{\cos x} \)

Common Mistakes

✕ Wrong sign on \( P(x) \)
Given \( y' - 3y = \ldots \), students set \( P = 3 \) instead of \( P = -3 \). Always match the standard form \( y' + P(x)y \).
✕ Forgetting to divide
If the equation is \( 2y' + 4y = 6 \), divide everything by 2 first so the coefficient of \( y' \) is 1.
✕ Dropping the constant
After integrating \( \int \mu\,Q\,dx \), forgetting \( +\,C \) gives only the particular solution, missing the general family.

Question 1 of 5

What is the integrating factor for \( \dfrac{dy}{dx} + 4y = e^x \)?

Question 2 of 5

For the ODE \( \dfrac{dy}{dx} - \dfrac{2}{x}\,y = x^3 \), what is \( \mu(x) \)?

Question 3 of 5

Solve \( y' + y = 2 \) with \( y(0) = 0 \). What is \( y(x) \)?

Question 4 of 5

Which ODE cannot be solved by the integrating factor method?

Question 5 of 5

After multiplying by the integrating factor, the left side of the ODE becomes: