Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Recipe

Solve a first-order linear equation with an integrating factor

Use when: the equation can be arranged as dy/dx + P(x)y = Q(x), with y and y' appearing only to the first power and never multiplied by each other

Goal: the general solution, found without ever needing the equation to separate

Taught in First-order linear equations and integrating factors

  1. 1

    Rearrange so the coefficient of dy/dx is exactly 1, then read off P(x) and Q(x).

    Example

    \dfrac{dy}{dx}+\dfrac1xy=x^2 (for x>0) is already in standard form, with P(x)=\dfrac1x and Q(x)=x^2.

    Why: P(x) has to be identified from an equation already scaled so the y' coefficient is 1; reading it off any other form gives the wrong integrating factor.

  2. 2

    Compute \mu(x)=e^{\int P(x)\,dx}, dropping the constant of integration inside the exponent.

    Example

    \mu(x) = e^{\int (1/x)\,dx} = e^{\ln x} = x

    Why: any nonzero multiple of \mu(x) collapses the equation's left side the same way, so the simplest choice, no constant, is standard.

  3. 3

    Multiply every term of the standard-form equation by \mu(x). By construction, the left side becomes the derivative of a single product, \dfrac{d}{dx}\big[\mu(x)y\big].

    Example

    x\frac{dy}{dx}+y = x^3 \quad\Longrightarrow\quad \frac{d}{dx}\big[xy\big] = x^3

    Why: this is a product rule run in reverse, arranged by the specific choice of \mu(x) in Step 2 so the left side always collapses this way.

  4. 4

    Integrate the right side with respect to x; the left side integrates instantly, since it's already a single derivative.

    Example

    xy = \int x^3\,dx = \frac{x^4}{4}+C

    Why: once the left side is one clean derivative, this is the only calculus step left in the whole method.

  5. 5

    Divide both sides by \mu(x) to solve for y explicitly.

    Example

    \boxed{y = \frac{x^3}{4}+\frac{C}{x}}

    Why: this is the general solution, one member for every value of C, obtained without the equation ever needing to separate.

Common mistakes

  • Reading P(x) off an equation that hasn't been scaled to a 1-coefficient on y' yet.
  • Keeping the constant of integration inside \mu(x)'s own exponent.
  • Forgetting to divide by \mu(x) at the very end and reporting \mu(x)y as the answer.
  • Trying to separate a linear equation that doesn't factor into an x-only piece times a y-only piece.