Skip to content
LoveToCalc

Definition — what does that mean?

First-order linear differential equation

y′ + ay = f(x) is solved by multiplying by e^(ax): the left side becomes the derivative of a product, and one integration gives y.

In Swedish: Linjär differentialekvation av första ordningen

y′(x)+ay(x)=f(x)

General solution

y=e(−a)x(∫eaxf(x)dx+C)

C is an arbitrary constant.

x
The variable
a
The constant coefficient of y

What the formula says

y′ + ay = f(x)

Holds when a is a constant and f is continuous on an interval.

A first-order linear differential equation with a constant coefficient a. First-order because only y′ appears, linear because y and y′ appear on their own, never squared or inside a function. f(x) is any function of x. With f(x) = 0 it is y′ = ky with k = −a.

The method is the integrating factor e^(ax). Multiply both sides by it:

e^(ax)y′ + a·e^(ax)y = e^(ax)f(x)

The left side is now what the product rule gives for (e^(ax)·y)′. So

(e^(ax)·y)′ = e^(ax)f(x), e^(ax)·y = ∫ e^(ax)f(x) dx + C, y = e^(−ax)(∫ e^(ax)f(x) dx + C)

Worked example

Solve y′ + 2y = 4x with y(0) = 2.

  1. The integrating factor is e^(2x). Multiplied through: (e^(2x)y)′ = 4x·e^(2x).
  2. Integrate (by parts): e^(2x)y = 2x·e^(2x) − e^(2x) + C.
  3. Divide by e^(2x): y = 2x − 1 + C·e^(−2x).
  4. The condition: y(0) = −1 + C = 2, so C = 3, and y = 2x − 1 + 3e^(−2x).

Check: y′ = 2 − 6e^(−2x), and y′ + 2y = 2 − 6e^(−2x) + 4x − 2 + 6e^(−2x) = 4x. Right.

The C that has to be divided too

A common mistake is in step 3. The constant was added before dividing by e^(2x), so it is divided as well: C·e^(−2x), not C. Writing y = 2x − 1 + C looks like a family of solutions and is not one — y′ + 2y then comes to 4x + 2C, which is 4x only when C = 0.

A second example: cooling

Coffee at 90 °C in a 20 °C room cools by Newton’s law, T′ = −0.1(T − 20), with t in minutes. Written in the standard form: T′ + 0.1T = 2.

The integrating factor e^(0.1t) gives (e^(0.1t)T)′ = 2e^(0.1t), so e^(0.1t)T = 20e^(0.1t) + C and T = 20 + C·e^(−0.1t). With T(0) = 90, C = 70. After 10 minutes: T = 20 + 70e^(−1) ≈ 45.8 °C.

The constant right-hand side gives a constant particular solution, T = 20, the temperature the coffee approaches.

The other route: homogeneous plus particular

Upper-secondary courses often solve the same equation without the integrating factor: the general solution is the solution of y′ + ay = 0, which is C·e^(−ax), plus one solution of the full equation, found by guessing its form.

f(x) Guess for the particular solution
a constant y = A
a polynomial of degree n a polynomial of degree n
e^(bx), b ≠ −a y = A·e^(bx)
sin bx or cos bx y = A sin bx + B cos bx

For y′ + 2y = 4x, guess y = Ax + B: A + 2(Ax + B) = 4x gives A = 2 and B = −1, and with the homogeneous part, y = 2x − 1 + C·e^(−2x) — the same answer as above.

When a depends on x

y′ + a(x)·y = f(x) is solved the same way, with the factor e^(∫a(x) dx) in place of e^(ax). The product rule still turns the left side into (e^(∫a dx)·y)′.

Common mistakes

Common questions

Why does the integrating factor work? Because the derivative of e^(ax) is a·e^(ax). Multiplying y′ + ay by e^(ax) produces exactly the two terms the product rule gives for (e^(ax)y)′, so the left side becomes a single derivative and can be integrated.

Integrating factor or guessing — which should I use? Guessing is quicker when f(x) is a polynomial, an exponential or a sine, and it is the method many upper-secondary courses teach. The integrating factor works for any f(x) whose integral you can find, and for a coefficient that varies with x.

Laplace transform table

Table

Laplace transform table
f(t)F(s)Valid whenName
Transform pairs
11ss > 0Constant
tnn!sn+1s > 0Power (n = 0, 1, 2, …)
eat1s−as > aExponential
sin(ωt)ωs²+ω²s > 0Sine
cos(ωt)ss²+ω²s > 0Cosine
eat sin(ωt)ω(s−a)²+ω²s > aDamped sine
eat cos(ωt)s−a(s−a)²+ω²s > aDamped cosine
teat1(s−a)²s > aLinear times exponential
tneatn!(s−a)n+1s > aPower times exponential
eat−e−at2as²−a²s > |a|Hyperbolic sine
eat+e−at2ss²−a²s > |a|Hyperbolic cosine
1,t≥a0,otherwisee−asss > 0Unit step u(t − a), a ≥ 0
δ(t−a)e−asall sUnit impulse (Dirac delta), a ≥ 0
Rules
αf(t)+βg(t)αF(s)+βG(s)where F and G both existLinearity
eatf(t)F(s−a)where F(s − a) existsShift in s
u(t−a)f(t−a)e−asF(s)where F existsShift in t, a ≥ 0
f′(t)sF(s)−f(0)where F existsFirst derivative
f″(t)s²F(s)−sf(0)−f′(0)where F existsSecond derivative
tf(t)−F′(s)where F existsMultiplication by t
∫0tf(τ)dτF(s)swhere F exists and s > 0Integration
∫0tf(τ)g(t−τ)dτF(s)G(s)where F and G both existConvolution

Last reviewed October 6, 2026 ·How pages are reviewed

CalculusAll formulas