Mathwords logoMathwords

Integrating Factor — Definition, Formula & Examples

An integrating factor is a function you multiply through a first-order linear differential equation to make the left side collapse into the derivative of a product, allowing you to solve by direct integration.

For a first-order linear ODE in standard form dydx+P(x)y=Q(x)\frac{dy}{dx} + P(x)\,y = Q(x), the integrating factor is μ(x)=eP(x)dx\mu(x) = e^{\int P(x)\,dx}. Multiplying both sides by μ(x)\mu(x) transforms the left side into ddx[μ(x)y]\frac{d}{dx}[\mu(x)\,y], reducing the problem to a single integration.

Key Formula

μ(x)=eP(x)dx\mu(x) = e^{\int P(x)\,dx}
Where:
  • μ(x)\mu(x) = The integrating factor
  • P(x)P(x) = The coefficient of y after writing the ODE in standard form dy/dx + P(x)y = Q(x)

How It Works

First, rewrite the equation in standard form dydx+P(x)y=Q(x)\frac{dy}{dx} + P(x)\,y = Q(x). Compute the integrating factor μ(x)=eP(x)dx\mu(x) = e^{\int P(x)\,dx}. Multiply every term by μ(x)\mu(x); the left side becomes ddx[μ(x)y]\frac{d}{dx}[\mu(x)\,y] exactly. Integrate both sides with respect to xx and solve for yy. The constant of integration is determined if an initial condition is given.

Worked Example

Problem: Solve the differential equation dy/dx + 2y = 6 with initial condition y(0) = 1.
Identify P(x) and Q(x): The equation is already in standard form with P(x) = 2 and Q(x) = 6.
dydx+2y=6\frac{dy}{dx} + 2y = 6
Compute the integrating factor: Integrate P(x) = 2 and exponentiate.
μ(x)=e2dx=e2x\mu(x) = e^{\int 2\,dx} = e^{2x}
Multiply through and integrate: Multiply both sides by e^(2x). The left side becomes the derivative of e^(2x) y. Integrate both sides.
ddx[e2xy]=6e2x    e2xy=3e2x+C\frac{d}{dx}\bigl[e^{2x}y\bigr] = 6e^{2x} \implies e^{2x}y = 3e^{2x} + C
Solve for y and apply the initial condition: Divide by e^(2x), then use y(0) = 1 to find C.
y=3+Ce2x1=3+CC=2y = 3 + Ce^{-2x} \quad\Rightarrow\quad 1 = 3 + C \quad\Rightarrow\quad C = -2
Answer: y=32e2xy = 3 - 2e^{-2x}

Why It Matters

The integrating factor method is typically the first general technique taught in a differential equations course and appears constantly in engineering and physics. Circuits (RC/RL), mixing problems, and Newton's law of cooling all produce first-order linear ODEs solved this way.

Common Mistakes

Mistake: Forgetting to divide by the leading coefficient before identifying P(x). For example, in 3(dy/dx) + 6y = 9, students set P(x) = 6 instead of first dividing everything by 3.
Correction: Always rewrite the equation so the coefficient of dy/dx is 1. Here, divide by 3 to get dy/dx + 2y = 3, giving P(x) = 2.