maths.free › Differential Equations › First-order linear equations

First-order linear equations

y′ + P(x)y = Q(x) and the integrating factor that makes it integrable.

Multiply y′ + P(x)y = Q(x) by μ = e^{∫P dx} and the left side collapses to (μy)′, one integration finishes it. This is the workhorse for mixing tanks, RC circuits and Newton's law of cooling.

Worked example · y' + y = x

Y' + y = x

y{\left(x \right)} + \frac{d}{d x} y{\left(x \right)} = x

Step by step

  1. y{\left(x \right)} + \frac{d}{d x} y{\left(x \right)} = x

    The differential equation.

  2. \text{order } 1

    Order 1: the highest derivative present.

  3. \text{Exact}

    M dx + N dy = 0 with ∂M/∂y = ∂N/∂x: find the potential F with F_x = M, F_y = N; the solution is F = C.

  4. r + 1 = 0

    Characteristic equation of the homogeneous part (substitute y = e^{rx}).

  5. r = -1

    Its roots.

  6. y{\left(x \right)} = C_{1} e^{- x} + x - 1

    General solution (C₁, C₂ … are arbitrary constants).

  7. \checkmark

    Verified: substituting the solution back into the equation gives 0.

Reveal the answer
y{\left(x \right)} = C_{1} e^{- x} + x - 1

Now you Pick a problem, or type or draw your own. Every step, a picture, the answer hidden until you ask.

Keep your own working

A free account adds notes on every lesson, a record of what you have finished, your solved problems in one place, and a tutor you can ask about this page. The maths itself is open to everyone, signed in or not.

Sign Up Login

Symbols used here

Tap any symbol for the full definition, a picture, and what every letter in it means.

How to: First-order linear equations

  1. The differential equation.
  2. Order 1: the highest derivative present.
  3. M dx + N dy = 0 with ∂M/∂y = ∂N/∂x: find the potential F with F_x = M, F_y = N; the solution is F = C.
  4. Characteristic equation of the homogeneous part (substitute y = e^{rx}).
  5. Its roots.
  6. General solution (C₁, C₂ … are arbitrary constants).
  7. Verified: substituting the solution back into the equation gives 0.

Questions people ask

What is a differential equation?

An equation whose unknown is a function, relating it to its own derivatives. "The rate of growth is proportional to the population" is y′ = ky, and solving it means finding y as a function of time.

Why does the solution have arbitrary constants?

Integrating loses information: many functions share the same derivative. An n-th order equation has n constants, fixed by n initial or boundary conditions.

More in Differential Equations