What Is The Integrating Factor Method?
The integrating factor method is a procedure for solving a first-order linear differential equation, an equation that can be arranged into the standard form
$$\frac{dy}{dx} + P(x),y = Q(x),$$
where $P(x)$ and $Q(x)$ are known functions of $x$. "Linear" here means $y$ and its derivative $\dfrac{dy}{dx}$ each appear to the first power and are never multiplied together. The method works by multiplying every term by a single carefully chosen function, the integrating factor
$$\mu(x) = e^{\int P(x),dx}.$$
That factor is engineered so the left side of the equation becomes the derivative of the product $\mu(x),y$. Once the left side is a single derivative, both sides can be integrated directly. The integrating factor method is the standard tool for the linear case of an ordinary differential equation, and it sits alongside separation of variables as one of the two techniques every first course covers. For the wider family it belongs to, see linear differential equations.
How Do You Find The Integrating Factor?
The integrating factor depends only on $P(x)$, the coefficient of $y$ in standard form. You never need $Q(x)$ to build it.
$$\mu(x) = e^{\int P(x),dx}$$
Two practical notes make this reliable:
No constant of integration here. When you compute $\int P(x),dx$, you may drop the $+C$. Adding a constant would multiply $\mu$ by $e^{C}$, a fixed number that later cancels from both sides. One integrating factor is enough.
Simplify the exponential before multiplying. Whenever $\int P(x),dx$ produces a logarithm, collapse it. If $\int P,dx = \ln x$, then $\mu = e^{\ln x} = x$, not $e^{\ln x}$ left unresolved. A clean $\mu$ keeps the arithmetic short.
For example, if $P(x) = \dfrac{2}{x}$, then $\int P,dx = 2\ln x = \ln x^2$, so $\mu(x) = e^{\ln x^2} = x^2$. The factor $\mu$ is built directly from the exponential rule, so a quick look at derivatives of exponential functions explains why $\mu' = \mu,P$, the property the whole method rests on.
Why Does Multiplying By μ(x) Create The Derivative d/dx[μy]?
This is the engine of the method, and it is worth seeing once in full rather than taking on faith. Start from the definition $\mu(x) = e^{\int P(x),dx}$ and differentiate it. By the chain rule, the derivative of $e^{\int P,dx}$ is itself times the derivative of the exponent, and the derivative of $\int P,dx$ is just $P$:
$$\mu'(x) = e^{\int P(x),dx}\cdot P(x) = \mu(x),P(x).$$
So the integrating factor satisfies the key identity $\mu' = \mu P$. Now multiply the standard-form equation through by $\mu$:
$$\mu,\frac{dy}{dx} + \mu,P,y = \mu,Q.$$
Look at the left side and replace $\mu P$ with $\mu'$:
$$\mu,\frac{dy}{dx} + \mu',y.$$
That is exactly the product rule run backwards. The product rule says $\dfrac{d}{dx}\big[\mu,y\big] = \mu,\dfrac{dy}{dx} + \mu',y$, which is the same two terms. Therefore
$$\frac{d}{dx}\big[\mu(x),y\big] = \mu(x),Q(x).$$
The left side is now a single derivative. That collapse is the entire reason $\mu$ is defined as $e^{\int P,dx}$: it is the one function whose own derivative supplies the missing $\mu'y$ term the product rule needs.
What Are The Steps Of The Integrating Factor Method?
The full workflow is four steps, applied in order every time.
Write the equation in standard form. Rearrange it into $\dfrac{dy}{dx} + P(x),y = Q(x)$. If the coefficient of $\dfrac{dy}{dx}$ is not $1$, divide the whole equation by it first, otherwise you will read off the wrong $P(x)$.
Build the integrating factor. Compute $\mu(x) = e^{\int P(x),dx}$ and simplify it.
Multiply through and collapse the left side. Multiplying every term by $\mu$ turns the left side into $\dfrac{d}{dx}\big[\mu,y\big]$, so the equation reads $\dfrac{d}{dx}\big[\mu,y\big] = \mu,Q$.
Integrate both sides and solve for $y$. Integrate to get $\mu,y = \int \mu,Q,dx + C$, then divide by $\mu$.
The general solution in one line is
$$y = \frac{1}{\mu(x)}\left(\int \mu(x),Q(x),dx + C\right).$$
The single arbitrary constant $C$ belongs to this final integration, not to the integrating factor. If the problem supplies an initial value such as $y(x_0) = y_0$, substitute it after this step to pin down $C$.
How Do You Solve A Linear Equation With The Integrating Factor Method? Worked Examples
Each example is fully stepped, and every general solution is verified by substituting it back into the original equation.
Example 1: Constant coefficient.
Solve $\dfrac{dy}{dx} - 3y = 6$.
The equation is already in standard form with $P(x) = -3$ and $Q(x) = 6$. The integrating factor is
$$\mu(x) = e^{\int (-3),dx} = e^{-3x}.$$
Multiply through by $e^{-3x}$ and collapse the left side:
$$\frac{d}{dx}\big[e^{-3x},y\big] = 6e^{-3x}.$$
Integrate both sides. The right side integrates to $6\cdot\dfrac{e^{-3x}}{-3} = -2e^{-3x}$:
$$e^{-3x},y = -2e^{-3x} + C \quad\Longrightarrow\quad y = -2 + Ce^{3x}.$$
Verify: $\dfrac{dy}{dx} = 3Ce^{3x}$, so $\dfrac{dy}{dx} - 3y = 3Ce^{3x} - 3(-2 + Ce^{3x}) = 6$. The original equation is satisfied.
Final answer: $y = -2 + Ce^{3x}$.
Example 2: Variable coefficient (a logarithmic integral).
Solve $\dfrac{dy}{dx} + \dfrac{2}{x},y = x$ for $x > 0$.
Here $P(x) = \dfrac{2}{x}$, so $\int P,dx = 2\ln x = \ln x^2$ and
$$\mu(x) = e^{\ln x^2} = x^2.$$
Multiply through by $x^2$. The left side collapses and the right side becomes $x^2\cdot x = x^3$:
$$\frac{d}{dx}\big[x^2,y\big] = x^3 \quad\Longrightarrow\quad x^2,y = \frac{x^4}{4} + C.$$
Divide by $x^2$:
$$y = \frac{x^2}{4} + \frac{C}{x^2}.$$
Verify: $\dfrac{dy}{dx} = \dfrac{x}{2} - \dfrac{2C}{x^3}$, so $\dfrac{dy}{dx} + \dfrac{2}{x},y = \dfrac{x}{2} - \dfrac{2C}{x^3} + \dfrac{2}{x}\left(\dfrac{x^2}{4} + \dfrac{C}{x^2}\right) = \dfrac{x}{2} + \dfrac{x}{2} = x$. Correct.
Final answer: $y = \dfrac{x^2}{4} + \dfrac{C}{x^2}$.
Example 3: An initial value problem.
Solve $\dfrac{dy}{dx} + y = e^{-x}$ with $y(0) = 1$.
Standard form gives $P(x) = 1$ and $Q(x) = e^{-x}$, so $\mu(x) = e^{\int 1,dx} = e^{x}$. Multiply through:
$$\frac{d}{dx}\big[e^{x},y\big] = e^{x}\cdot e^{-x} = 1.$$
Integrate: $e^{x},y = x + C$, so $y = (x + C)e^{-x}$. Apply $y(0) = 1$:
$$y(0) = (0 + C)e^{0} = C = 1.$$
So $C = 1$ and $y = (x + 1)e^{-x}$.
Verify: $\dfrac{dy}{dx} = e^{-x} - (x+1)e^{-x} = -x,e^{-x}$, so $\dfrac{dy}{dx} + y = -x,e^{-x} + (x+1)e^{-x} = e^{-x}$, and $y(0) = 1$. Both conditions hold.
Final answer: $y = (x + 1)e^{-x}$.
Example 4: A trigonometric right side.
Solve $\dfrac{dy}{dx} + y = \sin x$.
Again $P(x) = 1$, so $\mu(x) = e^{x}$. Multiply through:
$$\frac{d}{dx}\big[e^{x},y\big] = e^{x}\sin x.$$
The right side needs integration by parts applied twice, giving the standard result $\displaystyle\int e^{x}\sin x,dx = \frac{e^{x}}{2}\left(\sin x - \cos x\right) + C$. Therefore
$$e^{x},y = \frac{e^{x}}{2}\left(\sin x - \cos x\right) + C \quad\Longrightarrow\quad y = \frac{\sin x - \cos x}{2} + Ce^{-x}.$$
Verify: $\dfrac{dy}{dx} = \dfrac{\cos x + \sin x}{2} - Ce^{-x}$, so $\dfrac{dy}{dx} + y = \dfrac{\cos x + \sin x}{2} - Ce^{-x} + \dfrac{\sin x - \cos x}{2} + Ce^{-x} = \sin x$. Correct.
Final answer: $y = \dfrac{\sin x - \cos x}{2} + Ce^{-x}$.
How Does The Integrating Factor Connect To Exact Equations?
The integrating factor is not a trick invented only for linear equations. It is one instance of a bigger idea: turning a non-exact equation into an exact differential equation by multiplying through.
Write the standard-form linear equation as a differential relation. Starting from $\dfrac{dy}{dx} + P y = Q$, move everything to one side:
$$\big(P(x),y - Q(x)\big),dx + 1,dy = 0.$$
This has the shape $M,dx + N,dy = 0$ with $M = Py - Q$ and $N = 1$. An equation of this shape is called exact when $\dfrac{\partial M}{\partial y} = \dfrac{\partial N}{\partial x}$. Test it: $\dfrac{\partial M}{\partial y} = P$ while $\dfrac{\partial N}{\partial x} = 0$. Unless $P = 0$, the equation is not exact.
Now multiply through by $\mu(x)$, so $M = \mu(Py - Q)$ and $N = \mu$. Re-test exactness:
$$\frac{\partial M}{\partial y} = \mu P, \qquad \frac{\partial N}{\partial x} = \mu'.$$
The equation becomes exact precisely when $\mu P = \mu'$, which rearranges to $\dfrac{\mu'}{\mu} = P$ and integrates to $\mu = e^{\int P,dx}$. That is the same integrating factor, arriving from a different door. So the linear-equation formula and the exact-equation condition are two views of one requirement: find the multiplier that makes the mixed partials agree. This is why the technique carries the name "integrating factor" across both topics.
Why Does The Integrating Factor Method Work? A Geometric View
Algebraically, the method works because $\mu$ is built to satisfy $\mu' = \mu P$. Geometrically, there is a second way to see it.
A first-order equation is a slope field. The equation $\dfrac{dy}{dx} = Q(x) - P(x),y$ assigns a slope to every point $(x, y)$ in the plane. The solutions are the curves that follow those slopes everywhere, so solving the equation means threading a curve through a direction field.
Multiplying by $\mu$ straightens the family. The product $\mu(x),y$ is a new quantity whose rate of change is simply $\mu(x),Q(x)$, a function of $x$ alone. In the coordinates of $\mu y$, the tangled slope field becomes a set of parallel, easily integrated curves.
The constant $C$ selects one curve. Integrating leaves a family of solution curves, one for each value of $C$. An initial condition names the single curve passing through a chosen starting point, exactly as it does for a separable differential equation.
The picture and the algebra tell the same story. The integrating factor is the change of variable that turns "follow the slope field" into "add up a rate," which is why one multiplication makes the problem a plain integration.
Who Invented The Integrating Factor Method?
Linear differential equations were among the first that early calculus could solve, and the integrating factor grew out of the eighteenth-century push to make those solutions systematic.
Two figures anchor the story with dates:
Leonhard Euler (1707–1783, Switzerland) built the systematic theory of integrating factors and exact equations, and much of the notation of differential equations is his.
Alexis Clairaut (1713–1765, France) stated the exactness condition for $M,dx + N,dy = 0$, the test that the integrating factor is designed to satisfy.
Where Is The Integrating Factor Method Used In The Real World?
Any process whose rate of change depends on its current amount plus an external input is a first-order linear equation, so the method reaches across the sciences.
Physics and cooling: an object losing heat by Newton's law of cooling obeys $\dfrac{dT}{dt} + kT = kT_{\text{room}}$, solved in one step by the integrating factor $e^{kt}$.
Electrical engineering: the current in an RL circuit follows $L\dfrac{di}{dt} + Ri = V(t)$, a linear equation whose transient and steady-state parts fall straight out of the method.
Pharmacology: drug concentration in the bloodstream, with a dose rate coming in and clearance going out, is a linear first-order model used to schedule doses.
Finance and mixing: a savings balance earning interest while receiving deposits, or a tank being filled with brine while draining, are the classic "in minus out" linear equations.
Population and ecology: a population with a constant harvesting or immigration term becomes linear, and the integrating factor gives the exact trajectory.
One formula that turns a rate equation into a single integration is why engineers, pharmacologists, and economists all recognise the same $e^{\int P,dt}$ on their pages.
What Are The Most Common Mistakes With The Integrating Factor Method?
These four errors account for most lost marks, and each matches a question real students ask on r/learnmath and in course error guides.
Skipping standard form and reading off the wrong $P(x)$.
Where it slips in:
Given $2\dfrac{dy}{dx} + 4y = x$, a student takes $P(x) = 4$ directly from the equation.
Don't do this:
Do not read $P(x)$ while the coefficient of $\dfrac{dy}{dx}$ is still something other than $1$.
The correct way:
Divide through by that coefficient first. Here divide by $2$ to get $\dfrac{dy}{dx} + 2y = \dfrac{x}{2}$, so $P(x) = 2$ and $\mu = e^{2x}$.
Dropping the sign of $P(x)$ in the exponent.
Where it slips in:
For $\dfrac{dy}{dx} - 3y = 6$, a student computes $\mu = e^{3x}$, forgetting that $P(x) = -3$.
Don't do this:
Do not ignore a minus sign attached to $P(x)$. The integrating factor for $P = -3$ is $e^{-3x}$, not $e^{3x}$.
The correct way:
Carry the sign into the integral: $\int(-3),dx = -3x$, so $\mu = e^{-3x}$. A wrong sign here breaks the collapse of the left side entirely.
Putting the constant of integration on the integrating factor.
Where it slips in:
A student writes $\int P,dx = \ldots + C$ and carries that $C$ into $\mu = e^{\int P,dx + C}$.
Don't do this:
Do not attach a $+C$ when building $\mu$. The constant belongs to the final integration, after multiplying through.
The correct way:
Drop the constant while forming $\mu$, then add a single $+C$ when you integrate $\int \mu,Q,dx$ at the last step. That is the constant the initial condition later fixes.
Multiplying only one side by $\mu$.
Where it slips in:
A student multiplies the left side by $\mu$ to force the derivative, but forgets to multiply $Q(x)$ on the right.
Don't do this:
Do not treat $\mu$ as if it acts on the left alone. It multiplies every term of the equation.
The correct way:
Multiply the whole equation: the right side must become $\mu(x),Q(x)$ before you integrate. Missing this changes the answer completely.
Practice Problems On The Integrating Factor Method
Solve each, then check against the answer. Every answer is verified by substitution.
Solve $\dfrac{dy}{dx} + y = 2$.
(Answer: $y = 2 + Ce^{-x}$.)Solve $\dfrac{dy}{dx} + \dfrac{1}{x},y = 3$ for $x > 0$.
(Answer: $\mu = x$, so $y = \dfrac{3x}{2} + \dfrac{C}{x}$.)Solve $\dfrac{dy}{dx} - 2y = 0$.
(Answer: $\mu = e^{-2x}$, so $y = Ce^{2x}$.)Solve $\dfrac{dy}{dx} + \dfrac{1}{x},y = x^2$ for $x > 0$.
(Answer: $\mu = x$, so $y = \dfrac{x^3}{4} + \dfrac{C}{x}$.)Solve $\dfrac{dy}{dx} + y = 1$ with $y(0) = 3$.
(Answer: $y = 1 + 2e^{-x}$.)Find the integrating factor and general solution of $\dfrac{dy}{dx} + (\tan x),y = \sec x$.
(Answer: $\mu = \sec x$, so $y = \sin x + C\cos x$.)
Where Should You Go Next After The Integrating Factor Method?
The method is one branch of a connected subject, and several natural doors open from here.
Linear differential equations. See where the standard form $\dfrac{dy}{dx} + P(x),y = Q(x)$ fits and how higher-order linear equations extend it.
Exact differential equations. Follow the integrating-factor idea into its general home, where the multiplier can depend on $x$, on $y$, or on both.
Separable differential equations. Master the other core first-order technique so you can tell at a glance which method a problem wants.
If your child is meeting first-order linear equations for the first time, a live Bhanzu trainer teaches the method from the product-rule idea up, so the integrating factor feels inevitable rather than magic, in the Bhanzu math program.
Was this article helpful?
Your feedback helps us write better content
