Differential Equations • First-Order Differential Equations

Integrating Factor Method

A powerful technique that transforms unsolvable first-order equations into ones you can integrate directly.

A changing curve with sigma and variable symbols for differential equations
Inside this lesson 10 sections 5 questions 8 figures

SECTION 1

Historical Context & Motivation

Differential equations — equations that relate a function to its derivatives — have been central to mathematics and science since the late 1600s. When scientists wanted to model how things change over time, from the motion of planets to the cooling of hot objects, they needed tools to solve these equations. The simplest differential equations, called separable equations, can be solved by moving all the x terms to one side and all the y terms to the other. But many important equations refuse to separate so neatly.

Mathematicians in the 17th and 18th centuries needed a systematic method to handle first-order linear differential equations — equations of the form dy/dx + P(x)·y = Q(x). The breakthrough came with the idea of multiplying both sides of the equation by a cleverly chosen function, called an integrating factor, that transforms the left side into the derivative of a product. This elegant trick made a whole class of previously stubborn equations solvable.

1675 • Leibniz Introduces Calculus Notation

Gottfried Wilhelm Leibniz develops the notation dy/dx and the integral symbol ∫, laying the groundwork for expressing and solving differential equations systematically.

1691 • Leibniz Solves First-Order Linear Equations

Leibniz publishes solutions to first-order linear differential equations, using the concept of multiplying by a special function — the earliest form of the integrating factor idea.

1739 • Euler Formalizes the Method

Leonhard Euler systematizes the integrating factor technique and connects it to the exponential function, giving us the formula μ(x) = e^(∫P(x)dx) that we still use today.

1800s • Widespread Applications Emerge

Engineers and physicists apply integrating factors to model electrical circuits, heat flow, population dynamics, and chemical reactions, establishing the method as a cornerstone of applied mathematics.

The central question the integrating factor method answers is this: when you have a first-order linear equation that cannot be separated, how can you systematically find a solution? The answer lies in a single, well-chosen multiplier that unlocks the equation.

SECTION 2

Core Principles & Definitions

Before diving into the mechanics of the integrating factor method, you need to understand a few foundational ideas. These principles explain why the method works, not just how to apply it. Once these click, the entire procedure will feel logical rather than like a memorized recipe.

1

Standard Form

A first-order linear ODE must be written as dy/dx + P(x)·y = Q(x) before applying the method. The coefficient of dy/dx must be exactly 1. If it isn't, divide every term by that coefficient first.
2

The Product Rule Connection

The entire method is built on the product rule from calculus: d/dx[μ·y] = μ·(dy/dx) + (dμ/dx)·y. The integrating factor is chosen so that the left side of the equation becomes exactly this derivative of a product.
3

The Integrating Factor μ(x)

The integrating factor is the function μ(x) = e raised to the power of ∫P(x)dx. Multiplying every term by μ(x) makes the left side collapse into d/dx[μ(x)·y], which you can then integrate both sides of directly.
4

Linearity is Required

This method works only for linear equations — equations where y and dy/dx appear to the first power and are not multiplied together. If y² or y·(dy/dx) appears, the equation is nonlinear and needs different techniques.
✦

KEY TAKEAWAY

Think of the integrating factor like a combination lock. You have an equation that's "locked" — you can't solve it as-is. The integrating factor μ(x) is the exact combination that "unlocks" the equation by turning the messy left side into a clean derivative of a product. Once it's unlocked, you just integrate both sides and you're done. The beauty is that the formula for finding this magic multiplier always works for any first-order linear equation, no guesswork needed.

SECTION 3

Visual Explanation

The flowchart below shows the complete integrating factor method as a step-by-step process. Each stage builds on the previous one, and the entire procedure follows a single, consistent path from the original equation to the final solution.

Integrating Factor Method — Step-by-Step Flowdy/dx + P(x)·y = Q(x)Start: Standard FormStep 1: Identify P(x)The coefficient of y in standard formStep 2: Compute ∫P(x) dxFind the antiderivative (no +C needed here)Step 3: Form the integrating factorμ(x) = e^(∫P(x) dx)Step 4: Multiply both sides by μ(x)d/dx[μ(x)·y] = μ(x)·Q(x)Step 5: Integrate both sides & solve for yy = (1/μ(x))·∫μ(x)·Q(x) dx + C/μ(x)
The flowchart traces the five steps of the integrating factor method. Notice how each step feeds into the next: identify P(x), compute its integral, form μ(x), multiply through, then integrate to get y.

The key insight in this process is Step 4. When you multiply by the integrating factor, the left side magically becomes the derivative of the product μ(x)·y. This is not a coincidence — the integrating factor was specifically designed to make this happen. The product rule in reverse is what does all the heavy lifting, collapsing two terms into a single derivative that you can integrate directly.

SECTION 4

Mathematical Framework

Let's now build the formulas step by step so you can see exactly where the integrating factor comes from. We start with the standard form of a first-order linear ordinary differential equation.

STANDARD FORM

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

Here, P(x) is the coefficient function multiplying y, and Q(x) is the function on the right side. Both can be any continuous function of x. The coefficient of dy/dx must be 1.

We want to find a function μ(x) such that when we multiply the entire equation by it, the left side becomes the derivative of the product μ(x)·y. Using the product rule, d/dx[μ·y] = μ·(dy/dx) + (dμ/dx)·y. For this to match μ·(dy/dx) + μ·P(x)·y, we need dμ/dx = μ·P(x). This is itself a separable differential equation for μ!

INTEGRATING FACTOR FORMULA

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

Solving dμ/dx = μ·P(x) by separation of variables gives ln|μ| = ∫P(x) dx, which means μ(x) = e raised to the integral of P(x). We don't need a constant of integration here — any single integrating factor will work.

Once you have μ(x), multiply through the original equation. The left side becomes d/dx[μ(x)·y] and the right side becomes μ(x)·Q(x). Integrate both sides with respect to x to get the general solution.

GENERAL SOLUTION

y=(1/μ(x))⋅[∫μ(x)⋅Q(x)dx+C]y = (1/μ(x)) · [ ∫ μ(x) · Q(x) dx + C ]

Here, C is the constant of integration. If an initial condition y(x₀) = y₀ is given, substitute to find the specific value of C.

⚠

Don't Forget!

Always rewrite the equation in standard form before identifying P(x). If your equation looks like 3·(dy/dx) + 6x·y = 9x², divide every term by 3 first to get dy/dx + 2x·y = 3x². The P(x) is whatever multiplies y after the coefficient of dy/dx is 1.

SECTION 5

Detailed Breakdown & Common Integrating Factors

While the formula μ(x) = e^(∫P(x) dx) works for every first-order linear ODE, certain forms of P(x) appear so frequently that it helps to recognize their integrating factors on sight. The table below shows the most common cases you'll encounter.

P(x)∫P(x) dxμ(x) = e^(∫P(x) dx)
k (constant)kxekx
n/xn·ln|x|xn
2xx²ex²
−1−xe−x
cos(x)sin(x)esin(x)

Common integrating factors for frequently encountered P(x) functions

Before vs. After Multiplying by the Integrating FactorBEFORE (cannot integrate directly)AFTER (clean product rule form)dy/dx + P(x)·y = Q(x)Two separate terms on the leftd/dx[μ(x)·y] = μ(x)·Q(x)Single derivative on the left!Example: dy/dx + 2y = 4xP(x) = 2, so μ(x) = e²ˣLeft side has dy/dx and 2y— can't combine them easily× e²ˣd/dx[e²ˣ · y] = 4x · e²ˣLeft side is one derivative!→ Integrate both sides ✓Why does this work?Product Rule: d/dx[μ·y] = μ·(dy/dx) + (dμ/dx)·yWe choose μ so that dμ/dx = μ·P(x), making the terms match perfectly.
This diagram compares the equation before and after multiplying by the integrating factor. On the left, the equation has two separate terms involving y and dy/dx that can't be easily combined. On the right, those same terms have been packaged into a single derivative of a product, which can be integrated directly.

A common source of confusion is the constant of integration when computing ∫P(x) dx for the integrating factor. You can safely omit the constant of integration at this step. Why? If you added a constant C₁, your integrating factor would be e^(∫P dx + C₁) = eC1e^{C₁} · e^(∫P dx). The extra eC1e^{C₁} is just a constant that would multiply both sides and cancel out in the final answer. So there's no benefit to including it.

SECTION 6

Worked Example

Let's solve a complete problem using the integrating factor method. We'll work through every step in detail so you can see how the pieces fit together.

Solve: dy/dx − 3y = 6, with y(0) = 1

  1. 1

    Step 1 — Write in Standard Form

    The equation dy/dx − 3y = 6 is already in standard form dy/dx + P(x)·y = Q(x). Comparing, we see that P(x) = −3 (notice the negative sign!) and Q(x) = 6.
    P(x) = −3, Q(x) = 6
  2. 2

    Step 2 — Compute the Integrating Factor

    We need μ(x) = e^(∫P(x) dx) = e^(∫(−3) dx) = e−3xe^{−3x}. So our integrating factor is μ(x) = e−3xe^{−3x}.
    μ(x) = e−3xe^{−3x}
  3. 3

    Step 3 — Multiply Both Sides by μ(x)

    Multiply every term by e−3xe^{−3x}: e−3xe^{−3x}·(dy/dx) − 3e−3x3e^{−3x}·y = 6e−3x6e^{−3x}. By the product rule, the left side equals d/dx[e−3xe^{−3x}·y]. So the equation becomes d/dx[e−3xe^{−3x}·y] = 6e−3x6e^{−3x}.
    d/dx[e−3xe^{−3x} · y] = 6e−3x6e^{−3x}
  4. 4

    Step 4 — Integrate Both Sides

    Integrating both sides with respect to x: e−3xe^{−3x}·y = ∫6e−3x6e^{−3x} dx. To evaluate the right side, recall that ∫eaxe^{ax} dx = (1/a)·eaxe^{ax} + C. With a = −3, we get ∫6e−3x6e^{−3x} dx = 6 × (1/(−3)) × e−3xe^{−3x} + C = −2e−3x2e^{−3x} + C. So: e−3xe^{−3x}·y = −2e−3x2e^{−3x} + C.
    e−3xe^{−3x} · y = −2e−3x2e^{−3x} + C
  5. 5

    Step 5 — Solve for y and Apply the Initial Condition

    Divide both sides by e−3xe^{−3x} (equivalently, multiply by e3xe^{3x}): y = −2 + C·e3xe^{3x}. Now apply y(0) = 1: 1 = −2 + C·e0e^{0} = −2 + C, so C = 3.
    y = −2 + 3e3x3e^{3x}
💡

Verification Tip

You can always check your answer by plugging it back into the original equation. Here, dy/dx = 9e3x9e^{3x}, and −3y = −3(−2 + 3e3x3e^{3x}) = 6 − 9e3x9e^{3x}. Adding: dy/dx − 3y = 9e3x9e^{3x} + 6 − 9e3x9e^{3x} = 6. ✓ Also, y(0) = −2 + 3(1) = 1. ✓

SECTION 7

Strengths, Limitations & Comparison with Other Methods

The integrating factor method is one of several techniques for solving first-order differential equations. Understanding when to use it — and when another method might be better — is an important skill. Below is a comparison of the three main first-order techniques you'll encounter.

MethodWhen to UseStrengthsLimitations
Separation of VariablesEquation can be written as g(y) dy = f(x) dxSimple and intuitive; works for nonlinear equations tooOnly works if the equation is separable
Integrating FactorFirst-order linear: dy/dx + P(x)·y = Q(x)Always works for any first-order linear ODE; systematic formulaOnly for linear equations; may require difficult integrals
Exact EquationsM(x,y)dx + N(x,y)dy = 0 where ∂M/∂y = ∂N/∂xHandles certain non-linear multi-variable casesRequires exactness condition to be met

Comparison of first-order ODE solution techniques

✦

KEY TAKEAWAY

Think of these methods like tools in a toolbox. Separation of variables is like a screwdriver — simple and effective, but only for certain screws. The integrating factor is like a universal wrench that adjusts to fit any first-order linear bolt. It's not always the fastest tool, but it always works for its class of problems. Your job is to recognize which type of equation you're dealing with and reach for the right tool.

SECTION 8

Connection to Advanced Theory

The integrating factor method is your first encounter with a broader idea in differential equations: transforming a hard problem into an easier one. This theme recurs at every level of mathematics, and mastering it here prepares you for more powerful techniques later.

What You Learn NowWhere It Leads
Multiplying by μ(x) = e^(∫P dx)Integrating factors for exact equations and higher-order ODEs
Recognizing d/dx[μ·y] via the product ruleVariation of parameters for non-homogeneous second-order equations
Using e^(∫P dx) as a solution toolMatrix exponentials for systems of differential equations
Solving first-order linear ODEsLaplace transforms, which also convert differential equations into algebraic ones

How the integrating factor method connects to future topics

In college-level courses, you'll learn that the integrating factor approach is actually a special case of a more general strategy: finding a transformation that simplifies a differential equation. Laplace transforms, for instance, turn a differential equation in time into an algebraic equation in frequency — a completely different kind of "unlocking" that shares the same philosophical DNA as the integrating factor. For now, focus on mastering this method; it builds the intuition you'll need for all of those advanced techniques.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

Explain in your own words why we need the integrating factor to equal e^(∫P(x) dx) rather than any other function. What specific property must the integrating factor satisfy, and how does the product rule play a role?
Show answer
The integrating factor μ(x) must satisfy the condition dμ/dx = μ·P(x). This ensures that when we multiply the equation by μ, the left side becomes d/dx[μ·y] by the product rule, because μ·(dy/dx) + (dμ/dx)·y = μ·(dy/dx) + μ·P(x)·y = d/dx[μ·y]. The function e^(∫P(x) dx) is the unique (up to a constant multiple) function whose derivative equals itself times P(x), which comes from solving the separable equation dμ/μ = P(x) dx. Without this specific choice, the left side would not collapse into a single derivative, and we couldn't integrate both sides directly.

Question 2: BASIC CALCULATION

Find the integrating factor for the equation dy/dx + 5y = 10. Then write the equation in the form d/dx[μ·y] = (something).
Show answer
Here P(x) = 5, so ∫P(x) dx = 5x, and the integrating factor is μ(x) = e5xe^{5x}. Multiplying both sides of dy/dx + 5y = 10 by e5xe^{5x} gives e5xe^{5x}·(dy/dx) + 5e5x5e^{5x}·y = 10e5x10e^{5x}. The left side equals d/dx[e5xe^{5x}·y] by the product rule (since d/dx[e5xe^{5x}] = 5e5x5e^{5x}, which matches the μ·P(x) term). So the equation becomes d/dx[e5xe^{5x}·y] = 10e5x10e^{5x}.

Question 3: INTERMEDIATE

Solve the initial value problem: dy/dx + (2/x)·y = x², with y(1) = 4.
Show answer
Standard form gives P(x) = 2/x, so ∫P(x) dx = 2 ln|x| = ln(x²), and μ(x) = eln(x2)e^{ln(x²)} = x². Multiplying through: x²·(dy/dx) + 2x·y = x⁴, which equals d/dx[x²·y] = x⁴. Integrating both sides: x²·y = x⁵/5 + C, so y = x³/5 + C/x². Applying y(1) = 4: 4 = 1/5 + C, so C = 19/5. The solution is y = x³/5 + 19/(5x²).

Question 4: APPLIED

A tank initially contains 100 liters of pure water. A salt solution with concentration 0.5 kg/L flows in at 4 L/min, and the well-mixed solution drains out at 4 L/min. Set up and solve a differential equation for A(t), the amount of salt in the tank at time t.
Show answer
The rate of change of salt is dA/dt = (rate in) − (rate out) = (0.5 × 4) − (A/100 × 4) = 2 − A/25. Rewriting: dA/dt + (1/25)·A = 2. This is first-order linear with P(t) = 1/25. The integrating factor is μ(t) = et/25e^{t/25}. Multiplying: d/dt[et/25e^{t/25}·A] = 2et/252e^{t/25}. Integrating: et/25e^{t/25}·A = 50et/2550e^{t/25} + C. So A = 50 + Ce−t/25Ce^{−t/25}. Since A(0) = 0 (pure water initially), 0 = 50 + C gives C = −50. The solution is A(t) = 50(1 − e−t/25e^{−t/25}) kg. As t → ∞, A approaches 50 kg, which makes sense since the tank reaches equilibrium at 0.5 kg/L × 100 L = 50 kg.

Question 5: CRITICAL THINKING

Consider the equation dy/dx + P(x)·y = Q(x). Suppose someone solves it and gets a general solution y = yhy_h + ypy_p, where yhy_h = Ce^(−∫P dx) is the solution to the homogeneous equation (Q = 0) and ypy_p is a particular solution. Explain why every first-order linear ODE's general solution has this structure, and discuss what happens to yhy_h as x → ∞ when P(x) = k > 0 (a positive constant).
Show answer
The general solution from the integrating factor method is y = (1/μ)·[∫μQ dx + C] = (1/μ)·∫μQ dx + C/μ. The term C/μ = Ce^(−∫P dx) satisfies the homogeneous equation dy/dx + Py = 0, and the remaining term is a particular solution ypy_p of the full equation. This additive structure holds because the equation is linear: the difference of any two solutions satisfies the homogeneous equation. When P(x) = k > 0, yhy_h = Ce−kxCe^{−kx}, which decays exponentially to zero as x → ∞. This means every solution approaches the particular solution ypy_p regardless of the initial condition — the "transient" part dies out and the "steady-state" behavior is determined by Q(x). This has important physical meaning: in circuits and mixing problems, initial conditions are eventually "forgotten" when there is positive damping.

SUMMARY

Lesson Summary

Summary

The integrating factor method solves any first-order linear differential equation of the form dy/dx + P(x)·y = Q(x). The procedure begins by identifying P(x) and computing the integrating factor μ(x) = e^(∫P(x) dx). Multiplying both sides by μ(x) transforms the left side into d/dx[μ(x)·y] via the product rule, allowing you to integrate both sides directly and solve for y.

This method is guaranteed to work for every first-order linear ODE, making it one of the most reliable tools in differential equations. Common integrating factors include ekxe^{kx} for constant P(x) and xnx^n for P(x) = n/x. The method connects to broader themes in mathematics — transforming hard problems into easier ones — and serves as a foundation for advanced techniques like variation of parameters and Laplace transforms.

Varsity Tutors • Differential Equations • Integrating Factor Method