Skip to content

First-order linear equations and integrating factors

Solve y' + P(x) y = Q(x) by the integrating factor, with the constant in the right place, and fit an initial condition.

It opens on

In x y' + 2y = x² the y terms and x terms are added, so nothing separates. Yet multiplying by x turns the left side into the derivative of x² y. Why does that work?

Why it matters

Many models, from a drug infusion to a circuit, are linear equations whose input changes with time, and separation cannot solve them.

Good to know first

  • General and particular solutions by separation of variables: a separable equation is solved by moving y terms and x terms apart, and an initial condition fixes the constant
  • Modelling situations with differential equations and verifying solutions: a solution is checked by substituting it into the equation
  • Integrating using integration by parts: ∫ u dv = uv − ∫ v du

Step by step

  1. Standard form and a product in disguise

    Put a first-order linear equation in standard form and see which factor turns its left side into one derivative.

    Divide the equation by x to get y' + (2/x) y = x, so P = 2/x and Q = x, the slope on the field.

    A common mix-up

    Read P = 2 straight from x y' + 2y = x².

    In fact: The coefficient of y' must be 1 first, so P = 2/x.

  2. The integrating factor and the general solution

    Find μ = exp(∫P dx), multiply the whole equation, integrate with +C, and divide by μ.

    Multiply the equation y' + (2/x) y = x by the factor μ = x²: (x² y)' = x³, the right side multiplied too.

    A common mix-up

    Add +C at the end of y = x²/4.

    In fact: C belongs where the integral was taken and is divided by μ with the rest.

  3. A second equation with a starting value

    Solve y' + 2y = 4x with y(0) = 3 using parts, then check by substitution.

    The equation y' + 2y = 4x is already in standard form, so P = 2, Q = 4x and the factor is μ = e²ˣ.

    A common mix-up

    Apply y(0) = 3 before dividing by μ.

    In fact: The condition acts on the finished y, where C e⁻²ˣ has become 4 at x = 0.

Try it

Write 2y' + 6y = 4x in standard form and give P and Q.Answer

y' + 3y = 2x; P = 3, Q = 2x (hint: divide every term by 2).

Solve x y' + 3y = x² for x > 0.Answer

y = x²/5 + C/x³ (hint: divide by x, then μ = x³).

Solve y' − 2y = e³ˣ.Answer

y = e³ˣ + C e²ˣ (hint: μ = e⁻²ˣ, then the right side is eˣ).

On the field, whose equation is x y' + 2y = x², can every y go with dy on one side and every x on the other?Answer

No, the terms are added.

Why does μ' = P μ make (μ y)' = μ (y' + P y)?Answer

Product rule: (μ y)' = μ y' + μ' y, and μ' = P μ.

First-order linear equations and integrating factors

30 minutes every month. No card.