Standard form, integrating factors, homogeneous and nonhomogeneous equations, mixing problems, RC circuits, motion with resistance, and financial models — the systematic theory of the most tractable class of first-order equations
Chapter 3 introduced separable differential equations, a method built on reorganizing a rate relationship so that integration can recover the unknown function. Separable equations are powerful, but they require a specific structural feature: the right-hand side of the equation must be expressible as a product of a function of x alone and a function of y alone. Many important differential equations do not have this form.
This chapter introduces a broader and equally important class: linear first-order differential equations. These equations involve y and y' appearing only to the first power, with no products of y and y', and with no nonlinear operations applied to y. The linearity of these equations gives them a reliable algebraic structure, and that structure makes a systematic solution method possible.
The method is called the integrating factor method. Rather than separating variables, this method multiplies both sides of the equation by a carefully chosen function that converts the left side into the derivative of a product. Once the equation takes that form, a single integration recovers the solution.
By the end of this chapter, students should understand not only how to apply this method but why it works. The integrating factor is not a formula to be memorized blindly. It is a function that makes a particular algebraic transformation possible, and understanding that transformation is the key to using the method reliably.
A tank initially contains 200 liters of fresh water. A salt solution with concentration 5 grams per liter flows into the tank at a rate of 4 liters per minute. The well-mixed solution drains from the tank at the same rate of 4 liters per minute. How much salt is in the tank at time t? How much salt is in the tank after 10 minutes? What happens to the salt content over a very long time?
This question asks for a function, not just a number. The salt content of the tank changes continuously, and the rate of change depends on both how much salt is flowing in and how much salt is leaving at each moment. Writing that relationship carefully leads to a linear first-order differential equation.
Linear first-order differential equations appear in nearly every scientific and technical field. The charge on a capacitor, the velocity of an object falling through air, the concentration of a drug in the bloodstream, the temperature of a room being heated or cooled, the amount of a pollutant in a lake, and the value of a continuously compounded investment all satisfy linear first-order equations.
What makes these equations especially useful is their structure. Because they are linear, there is a systematic method that works for all of them. The integrating factor method transforms any linear first-order equation into a form that can be solved by a single integration. This reliability makes linear first-order equations both mathematically tractable and practically indispensable.
The word linear in the context of differential equations refers not to the shape of a graph but to a structural property of the equation. A differential equation is linear if the unknown function and all of its derivatives appear only to the first power and are never multiplied together or composed with nonlinear functions.
For a first-order equation involving an unknown function y that depends on the variable x, linearity means the term y' appears to the first power; the term y appears to the first power; there are no products of y and y'; there are no expressions like y², √y, e^y, or sin(y); and the coefficients multiplying y' and y may be functions of x but not of y.
A general linear first-order differential equation takes the form a(x)y' + b(x)y = c(x), where a(x), b(x), and c(x) are functions of x alone. Provided a(x) ≠ 0, dividing through by a(x) puts the equation into standard form.
| Linear First-Order Examples | Nonlinear First-Order Examples | Reason Nonlinear |
|---|---|---|
y' + 3y = 6 | y' = y² | y appears squared |
y' − (2/x)y = x² | y' = √y | y appears under a root |
y' + (sin x)y = cos x | yy' = x | y and y' are multiplied |
y' = 5y | y' = e^y | y appears as an exponent |
The equation y' = ky is linear even though its solution y = Ce^(kx) is an exponential function. Do not confuse the linearity of the equation with the shape of the solution curve. Linearity is a property of the equation, not the solution.
Before applying the integrating factor method, the equation must be written in standard form. Standard form requires: the coefficient of y' is exactly 1; all terms involving y are on the left side; everything else is on the right side.
y' + p(x) y = q(x)
p(x) and q(x) are continuous functions of x. The coefficient of y' is 1.
3y' − 6y = 9x in standard form.3y' − 6y = 9x
÷3: y' − 2y = 3xy' − 2y = 3x. Here p(x) = −2 and q(x) = 3x.y' = 4y + sin x.y' − 4y = sin xp(x) = −4 and q(x) = sin x.Pay careful attention to signs. If the equation reads y' − 2y = 3x, then p(x) = −2, not +2. Using the wrong sign for p(x) leads to an incorrect integrating factor and a wrong solution.
A linear first-order equation is called homogeneous when q(x) = 0. The standard form is y' + p(x)y = 0. This equation is always separable.
Separating variables and integrating:
dy/y = −p(x) dx → ln|y| = −∫p(x) dx + C₁
y = C e^(−∫p(x) dx)
where C is an arbitrary constant that can take any real value, including zero.
y' − 3y = 0.dy/y = 3 dx
ln|y| = 3x + C₁
y = Ce^(3x)3Ce^(3x) − 3(Ce^(3x)) = 0 ✓y' + (2/x)y = 0 for x > 0.dy/y = −(2/x) dx
ln|y| = −2 ln x + C₁ = ln(x^(−2)) + C₁
y = C/x²When q(x) ≠ 0, the equation y' + p(x)y = q(x) is called nonhomogeneous. The right side q(x) is called the forcing function or input function, because it represents an external influence driving the system away from its natural unforced behavior.
Nonhomogeneous equations cannot be solved by simple separation of variables in general. The left side y' + p(x)y is not the derivative of just y, so integrating both sides directly does not work. The approach that does work exploits the product rule from calculus. If there were a function µ(x) such that
µ(x)y' + µ(x)p(x)y = d/dx [µ(x)y]
Multiplying by the right µ(x) converts the left side into a recognizable product derivative — enabling a single integration to solve the equation.
The next two sections show how to find such a function µ(x) and how to use it.
The product rule states: d/dx[µ(x)y] = µ(x)y' + µ'(x)y. Compare this to the left side of the equation after multiplying by µ(x): µ(x)y' + µ(x)p(x)y. For these to be equal, we need µ'(x) = µ(x)p(x). This is itself a separable differential equation for µ(x).
Separating variables in µ'(x) = µ(x)p(x):
dµ/µ = p(x) dx → ln|µ| = ∫p(x) dx
µ(x) = e^(∫p(x) dx)
We choose the simplest integrating factor by setting the constant of integration to zero — any valid integrating factor produces the same final result.
Once the integrating factor is found, multiplying both sides by µ(x) and integrating gives the general solution:
µ(x)y = ∫µ(x)q(x) dx + C
y = (1/µ(x)) [ ∫µ(x)q(x) dx + C ]
where µ(x) = e^(∫p(x) dx) is the integrating factor.
The integrating factor does not create a new equation. It transforms the original equation into one whose left side is recognizable as a product derivative. The transformation is entirely justified by the product rule — no new assumptions are introduced.
The integrating factor µ(x) = e^(∫p(x)dx) requires computing an antiderivative of p(x). When computing this antiderivative, do not include a constant of integration. The integrating factor is always a function of x alone, never of y. If p(x) is a constant k, then µ(x) = e^(kx).
| Standard Form | p(x) | ∫p(x) dx | µ(x) |
|---|---|---|---|
y' + 3y = 6 | 3 | 3x | e^(3x) |
y' − 2y = x | −2 | −2x | e^(−2x) |
y' + (1/x)y = x | 1/x | ln x | x (for x > 0) |
y' + 2xy = x | 2x | x² | e^(x²) |
Always simplify e^(∫p(x)dx) as much as possible. In the third row above, e^(ln x) = x. Leaving the integrating factor as e^(ln x) rather than simplifying to x makes subsequent integration harder and more error-prone.
y' + p(x)y = q(x).µ(x) = e^(∫p(x)dx) with no constant of integration.µy' + µpy = µq.d/dx[µ(x)y].µ(x)y = ∫µ(x)q(x) dx + C.y = (1/µ(x))[∫µq dx + C].y' + 3y = 6.µ(x) = e^(∫3 dx) = e^(3x)
Multiply: e^(3x)y' + 3e^(3x)y = 6e^(3x)
Recognize: d/dx[e^(3x)y] = 6e^(3x)
Integrate: e^(3x)y = ∫6e^(3x) dx = 2e^(3x) + C
Divide: y = 2 + Ce^(−3x)y' − (2/x)y = x² for x > 0.µ(x) = e^(∫−2/x dx) = e^(−2 ln x) = x^(−2) = 1/x²
Multiply both sides by 1/x²:
(1/x²)y' − (2/x³)y = 1
Recognize: d/dx[y/x²] = 1
Integrate: y/x² = x + C
Solve: y = x³ + Cx²y' + 2xy = x.µ(x) = e^(∫2x dx) = e^(x²)
d/dx[e^(x²)y] = xe^(x²)
Integrate (substitution u = x², du = 2x dx):
e^(x²)y = (1/2)e^(x²) + C
y = 1/2 + Ce^(−x²)When an initial condition y(x₀) = y₀ is given, substitute into the general solution to determine the constant C.
y' + y = e^x, y(0) = 1.µ(x) = e^(∫1 dx) = e^x
d/dx[e^x y] = e^x · e^x = e^(2x)
e^x y = ∫e^(2x) dx = (1/2)e^(2x) + C
y = (1/2)e^x + Ce^(−x)
Apply y(0) = 1:
1 = 1/2 + C → C = 1/2
Particular solution:
y = (1/2)e^x + (1/2)e^(−x) = cosh xxy' + y = cos x, y(π) = 0, for x > 0.µ(x) = e^(∫1/x dx) = e^(ln x) = x
Multiply by x:
xy' + y = cos x (the left side was already d/dx[xy])
d/dx[xy] = cos x
xy = sin x + C
y = (sin x)/x + C/x
Apply y(π) = 0:
0 = (sin π)/π + C/π = 0 + C/π → C = 0
Particular solution:
y = (sin x)/xNotice in Example 4.8.2 that the original equation xy' + y already equals d/dx[xy] by the product rule, before any formal integrating factor computation. When you recognize the left side as a ready-made product derivative, you can skip directly to integration and save a step.
A classic and important application of linear first-order equations is the mixing problem, also called the dilution problem or tank problem. The setup involves a container that holds a solution. A substance enters in an inflow stream, mixes with the existing solution, and leaves in an outflow stream.
Let A(t) denote the amount of substance in the container at time t. The fundamental rate equation is:
dA/dt = (rate in) − (rate out)
rate in = c_in · r_in
rate out = (A(t)/V(t)) · r_out
If the inflow and outflow rates are equal, the volume V(t) stays constant. If they differ, V(t) = V₀ + (r_in − r_out)t.
Rate in: 5 g/L × 4 L/min = 20 g/min
Rate out: A/200 g/L × 4 L/min = A/50 g/min
dA/dt + (1/50)A = 20
µ(t) = e^(t/50)
d/dt[e^(t/50) A] = 20e^(t/50)
e^(t/50) A = 1000e^(t/50) + C
A = 1000 + Ce^(−t/50)
A(0) = 0: 0 = 1000 + C → C = −1000
A(t) = 1000(1 − e^(−t/50))A(10) = 1000(1 − e^(−0.2)) ≈ 1000(0.1813) ≈ 181 gramsdA/dt = 0 − 3A/(500 + 2t) (homogeneous, separable)
dA/A = −3/(500 + 2t) dt
ln A = −(3/2)ln(500 + 2t) + C₁
A = C(500 + 2t)^(−3/2)
A(0) = 100: C = 100 · 500^(3/2)
A(t) = 100(500/(500 + 2t))^(3/2)An RC circuit consists of a resistor (resistance R in ohms) and a capacitor (capacitance C in farads), connected to a voltage source E(t) in volts. The charge Q(t) on the capacitor satisfies:
R dQ/dt + Q/C = E(t)
dQ/dt + (1/RC)Q = E(t)/R
Standard form with p = 1/(RC) and time constant τ = RC.
The time constant τ = RC characterizes how quickly the circuit responds. A small time constant means the circuit charges and discharges quickly; a large time constant means slow response.
dQ/dt + Q = 12/100 = 0.12
µ = e^t
d/dt[e^t Q] = 0.12e^t
e^t Q = 0.12e^t + C
Q = 0.12 + Ce^(−t)
Q(0) = 0: C = −0.12
Q(t) = 0.12(1 − e^(−t)) coulombsWhen an object moves through a medium such as air or water, it experiences a resistive force. For low velocities, this drag force is often proportional to velocity: F_drag = −bv, where b > 0 is the drag coefficient. By Newton's second law, for an object of mass m falling under gravity with linear drag:
m dv/dt = mg − bv
dv/dt + (b/m)v = g
Linear first-order equation with p = b/m and q = g. Terminal velocity: v∞ = mg/b.
dv/dt + (15/70)v = 9.8
dv/dt + (3/14)v = 9.8
µ = e^(3t/14)
d/dt[e^(3t/14) v] = 9.8e^(3t/14)
e^(3t/14) v = 9.8·(14/3)e^(3t/14) + C
v = (9.8·14/3) + Ce^(−3t/14) ≈ 45.7 + Ce^(−3t/14)
v(0) = 0: C = −45.7
v(t) = 45.7(1 − e^(−3t/14)) m/sIf a savings account earns continuously compounded interest at annual rate r and the account holder withdraws at a continuous rate of W dollars per year, the balance B(t) satisfies:
dB/dt = rB − W
dB/dt − rB = −W
Linear first-order with p(t) = −r and q(t) = −W. Integrating factor: µ = e^(−rt).
dB/dt − 0.05B = −12000
µ = e^(−0.05t)
d/dt[e^(−0.05t)B] = −12000e^(−0.05t)
e^(−0.05t)B = 240000e^(−0.05t) + C
B(t) = 240000 + Ce^(0.05t)
B(0) = 200000: C = −40000
B(t) = 240000 − 40000e^(0.05t)
Set B = 0: e^(0.05t) = 6
t = ln(6)/0.05 = 20 ln 6 ≈ 35.8 yearsA population P(t) growing at per-capita rate r with constant immigration rate I satisfies dP/dt = rP + I, or equivalently dP/dt − rP = I. This is the same mathematical structure as the financial model: the integrating factor is e^(−rt), and the solution has the form P(t) = A + Be^(rt) for appropriate constants A and B determined by the initial condition.
Standard form is y' + 2y = 3, giving p(x) = 2 and µ = e^(2x). Always divide by the coefficient of y' before identifying p(x).
The integrating factor is µ = e^(∫p(x)dx) computed without a constant of integration. Any constant cancels out in the solution anyway. Choose the simplest antiderivative (C = 0).
After multiplying by µ, the entire left side equals d/dx[µy]. Verify this by differentiating µy with the product rule before integrating.
The right side always gives ∫µq dx + C. Omitting C turns the general solution into a single particular solution that satisfies no general initial condition.
The standard form is y' + p(x)y = q(x). Here p(x) = −2, giving µ = e^(−2x). Read p(x) from the standard form, including its sign.
Find the complete general solution first, then substitute the initial condition to determine C.
The rate out is (A(t)/V(t)) × r_out, using the current concentration A(t)/V(t) in the tank, which changes over time.
Compute V(t) = V₀ + (r_in − r_out)t and use V(t) in the rate-out term whenever the flow rates are unequal.
Chapter 4 has introduced the structure of linear first-order differential equations and the integrating factor method. The method is reliable: every equation of the form y' + p(x)y = q(x), with continuous p and q, has a unique solution satisfying a given initial condition, and that solution can always be expressed using an integrating factor.
The applications, including mixing, circuits, and motion with resistance, all share the same mathematical form: a quantity changes at a rate that depends partly on its current value (the p(x)y term) and partly on an external input (the q(x) term). Recognizing this common structure across different physical contexts is one of the central skills of applied mathematics.
Chapter 5 will bring first-order methods, both separable and linear, into a comprehensive modeling framework. Students will learn to construct differential equation models from verbal descriptions, to classify the equations that arise, and to interpret solutions in context. The modeling process itself, not just the solution technique, will become the focus.
Later chapters extend these ideas in important directions. Second-order linear equations in Chapter 6 describe systems involving acceleration, oscillation, and inertia. Systems of equations in Chapter 9 handle multiple interacting quantities. Laplace transforms in Chapter 10 provide a powerful alternative approach to initial value problems, especially with discontinuous forcing. All of these extensions build on the linear structure and solution ideas developed here.
Classify each equation as linear or nonlinear. For linear equations, write in standard form and identify p(x) and q(x).
y' + 5y = 10y' = y² + x3y' − 6xy = 12xyy' = sin xy' = −y/x + x²y' = e^x y + e^(2x)y' + √y = xx²y' + xy = 1y' = kyy' = k(a − y)Find µ(x) = e^(∫p(x)dx) for each equation.
y' + 4y = 8y' − 3y = x²y' + (3/x)y = xy' + 2xy = 4xy' + (cos x)y = cos xFind the general solution using the integrating factor method.
y' + 2y = 6y' − y = e^(2x)y' + (1/x)y = x²y' + 3y = e^(−3x)y' − 2y = 4xy' + y cot x = cos x(1 + x²)y' + 2xy = 4xSolve each initial value problem. Show all steps.
y' + y = 4, y(0) = 1y' − 3y = 6, y(0) = 0y' + 2y = e^(−x), y(0) = 3y' + (1/x)y = x, y(1) = 2y' + 4y = e^(−4x), y(0) = 5y' − y = e^x, y(0) = 1y' + 2xy = 2x, y(0) = 0y' + y = sin x, y(0) = 1Identify the error in each solution and write the correct answer.
Solve y' + 2y = 6. A student writes: "µ = e^(2x). Then e^(2x)y' + e^(2x)y = 6e^(2x). So d/dx[e^(2x)y] = 6e^(2x). Then e^(2x)y = 3e^(2x) + C, giving y = 3 + Ce^(−2x)."
Hint: Check the second line carefully. What happened to p(x) = 2?
Solve 2y' + 4y = 8, y(0) = 1. A student writes: "p(x) = 4, so µ = e^(4x)…" and continues from there.
Hint: What required step was skipped before identifying p(x)?
Solve y' − y = x. A student writes: "µ = e^(−x). Then d/dx[e^(−x)y] = xe^(−x). Then e^(−x)y = xe^(−x) + C. So y = x + Ce^x."
Hint: Check the integration step. What is ∫xe^(−x) dx?
A mixing problem: 100-liter tank, 3 g/L inflow at 5 L/min, outflow at 5 L/min. A student writes: "Rate out = 3 × 5 = 15 g/min."
What is wrong with this rate-out calculation? What is the correct expression?
y' + x²y = ln xy' = y² − y + 13y' = 9 − 6yxy' = 2y + x³y' + 5y = 15.y' − (1/x)y = x² for x > 0.y' + y = e^x, y(0) = 0.The integrating factor method is a powerful and elegant technique specific to linear first-order equations. As you move to Chapter 5, the focus shifts from technique to modeling: how do you build a differential equation from a real-world scenario? Students will encounter situations where deciding whether the resulting equation is separable or linear is itself part of the mathematical work.
Chapters 6 through 8 will extend linearity to second-order equations, where two linearly independent solutions must be combined, and where forcing and resonance become central ideas. Chapter 10 will introduce Laplace transforms, a method that converts linear initial value problems into algebraic equations and handles discontinuous forcing elegantly. All of this rests on the linear structure introduced here.