Skip to content
  • Open the math solver
  • Ask the AI tutor
  • Find an AP course
  • Create a quiz
  • Open the calculator
  • Graphing Calculator
  • Browse all calculators
  • Read math guides
↑ ↓Enter to open · Esc to close
Solve a problem
Differential EquationsDifferential EquationsCollege

Linear First-Order Equations

Use an integrating factor.

A first-order linear differential equation has the form dydx+P(x)y=Q(x)\frac{dy}{dx} + P(x)y = Q(x). Unlike separable equations, the variables cannot generally be split, but an integrating factor μ(x)=e∫P(x) dx\mu(x) = e^{\int P(x)\,dx} makes the left side the derivative of a product, ddx(μy)\frac{d}{dx}(\mu y).

After multiplying through by μ\mu, integrate both sides and divide by μ\mu. These equations describe mixing tanks, RC circuits and objects falling with air resistance, where a rate of change depends linearly on the current amount plus an outside input.

Key terms

Integrating factor
Multiplying by it turns the left side into a derivative of a product.
μ(x)=e∫P(x) dx\mu(x) = e^{\int P(x)\,dx}

Key ideas

  • Write the equation in standard form, with coefficient 1 on dydx\frac{dy}{dx}, before finding μ\mu.
  • μ=e∫P dx\mu = e^{\int P\,dx}; no constant is needed in this integral.
  • After multiplying, the left side is always (μy)′(\mu y)'.
  • Remember +C+C when integrating the right side, then divide everything by μ\mu.

Worked example

Solve dydx+2y=4\frac{dy}{dx} + 2y = 4 with y(0)=0y(0) = 0.

  1. P=2P = 2, so μ=e2x\mu = e^{2x}.
  2. Multiply: (e2xy)′=4e2x(e^{2x}y)' = 4e^{2x}.
  3. Integrate: e2xy=2e2x+Ce^{2x}y = 2e^{2x} + C, so y=2+Ce−2xy = 2 + Ce^{-2x}.
  4. y(0)=0y(0) = 0 gives C=−2C = -2: y=2−2e−2xy = 2 - 2e^{-2x}.

Answer: y=2−2e−2xy = 2 - 2e^{-2x}

Common mistakes

  • Forgetting to divide by the leading coefficient first.
  • Multiplying only the left side by μ\mu.
  • Dividing only the integral term, not the constant, by μ\mu.

Practice questions

Try each one, then open the answer. Numerical answers on this page are verified by an automated calculation check.

  1. 1.For y=2−2e−2xy = 2 - 2e^{-2x}, what value does yy approach as x→∞x \to \infty?

    Show answer

    22

  2. 2.Find the integrating factor of y′+3y=xy' + 3y = x, evaluated at x=1x = 1, to two decimals.

    Show answer

    e3≈20.09e^3 \approx 20.09

  3. 3.For y=2−2e−2xy = 2 - 2e^{-2x}, find y(1)y(1) to three decimals.

    Show answer

    1.7291.729

More in Differential Equations