Fiveable

โž—Calculus II Unit 4 Review

QR code for Calculus II practice questions

4.5 First-order Linear Equations

4.5 First-order Linear Equations

Written by the Fiveable Content Team โ€ข Last updated August 2025
Written by the Fiveable Content Team โ€ข Last updated August 2025
โž—Calculus II
Unit & Topic Study Guides

First-order Linear Equations

First-order linear equations are differential equations where the dependent variable and its derivative both appear to the first power. They show up constantly in modeling: population growth, radioactive decay, cooling, mixing problems. The key technique for solving them is the integrating factor method, which this section is all about.

Standard Form of Linear Equations

Before you can solve a first-order linear equation, you need to get it into standard form:

dydx+P(x)y=Q(x)\frac{dy}{dx} + P(x)y = Q(x)

Here, P(x)P(x) and Q(x)Q(x) are functions of xx only (or constants). The requirements are:

  • The coefficient of dydx\frac{dy}{dx} must be 1. If it's not, divide the entire equation through until it is.
  • The coefficient of yy must depend only on xx, not on yy.
  • Everything on the right side must depend only on xx.

For example, if you're given 2dydx+6xy=4x2\frac{dy}{dx} + 6xy = 4x, divide everything by 2 first to get dydx+3xy=2x\frac{dy}{dx} + 3xy = 2x. Now it's in standard form with P(x)=3xP(x) = 3x and Q(x)=2xQ(x) = 2x.

Integrating Factors for Equation Solving

The integrating factor is the tool that makes first-order linear equations solvable in a systematic way. The idea: multiply both sides of the equation by a carefully chosen function that turns the left side into the derivative of a product, which you can then integrate directly.

Given the standard form dydx+P(x)y=Q(x)\frac{dy}{dx} + P(x)y = Q(x), here's the process:

  1. Compute the integrating factor: ฮผ(x)=eโˆซP(x)โ€‰dx\mu(x) = e^{\int P(x)\,dx} You don't need a constant of integration here; any single antiderivative of P(x)P(x) works.

  2. Multiply both sides by ฮผ(x)\mu(x): ฮผ(x)dydx+ฮผ(x)P(x)y=ฮผ(x)Q(x)\mu(x)\frac{dy}{dx} + \mu(x)P(x)y = \mu(x)Q(x)

  3. Recognize the left side as a product rule derivative. This is the whole point of the integrating factor. The left side equals: ddx[ฮผ(x)โ€‰y]=ฮผ(x)Q(x)\frac{d}{dx}\bigl[\mu(x)\,y\bigr] = \mu(x)Q(x)

  4. Integrate both sides with respect to xx: ฮผ(x)โ€‰y=โˆซฮผ(x)โ€‰Q(x)โ€‰dx+C\mu(x)\,y = \int \mu(x)\,Q(x)\,dx + C

  5. Solve for yy: y=1ฮผ(x)(โˆซฮผ(x)โ€‰Q(x)โ€‰dx+C)y = \frac{1}{\mu(x)}\left(\int \mu(x)\,Q(x)\,dx + C\right)

Why does this work? The integrating factor ฮผ(x)\mu(x) is specifically constructed so that ฮผโ€ฒ(x)=ฮผ(x)P(x)\mu'(x) = \mu(x)P(x). That's what makes the left side collapse into a single derivative via the product rule. If you ever forget the formula, you can re-derive it from this condition.

Standard form of linear equations, First-order Linear Equations ยท Calculus

Worked Example

Solve dydx+2y=e3x\frac{dy}{dx} + 2y = e^{3x}.

  1. It's already in standard form: P(x)=2P(x) = 2, Q(x)=e3xQ(x) = e^{3x}.
  2. Integrating factor: ฮผ(x)=eโˆซ2โ€‰dx=e2x\mu(x) = e^{\int 2\,dx} = e^{2x}.
  3. Multiply both sides by e2xe^{2x}: e2xdydx+2e2xy=e5xe^{2x}\frac{dy}{dx} + 2e^{2x}y = e^{5x}
  4. The left side is ddx[e2xy]\frac{d}{dx}[e^{2x}y], so: ddx[e2xy]=e5x\frac{d}{dx}[e^{2x}y] = e^{5x}
  5. Integrate: e2xy=15e5x+Ce^{2x}y = \frac{1}{5}e^{5x} + C.
  6. Solve for yy: y=15e3x+Ceโˆ’2xy = \frac{1}{5}e^{3x} + Ce^{-2x}.

Real-World Applications of Linear Equations

First-order linear equations model situations where a quantity changes at a rate that depends on the quantity itself and possibly some external input. Common applications include population dynamics, radioactive decay, heat transfer, and mixing problems.

To apply the method to a word problem:

  1. Identify the variables (what's changing, and with respect to what).
  2. Translate the problem's description into a differential equation.
  3. Note any initial conditions (e.g., "at time t=0t = 0, the temperature is 90ยฐC").
  4. Put the equation in standard form and solve using the integrating factor.
  5. Use the initial condition to find CC, then interpret your answer.
Standard form of linear equations, Linear Equations: Writing an Equation in Standard Form on Vimeo

Classic Models

  • Exponential growth/decay: dPdt=kP\frac{dP}{dt} = kP, where k>0k > 0 gives growth and k<0k < 0 gives decay. This is separable and linear. Solution: P(t)=P0ektP(t) = P_0 e^{kt}.
  • Radioactive decay: dNdt=โˆ’ฮปN\frac{dN}{dt} = -\lambda N, where ฮป\lambda is the decay constant. If a substance has a half-life of 5 years, then ฮป=lnโก25โ‰ˆ0.1386ย yrโˆ’1\lambda = \frac{\ln 2}{5} \approx 0.1386 \text{ yr}^{-1}.
  • Newton's law of cooling: dTdt=โˆ’k(Tโˆ’Ta)\frac{dT}{dt} = -k(T - T_a), where TaT_a is the ambient temperature. Rewriting: dTdt+kT=kTa\frac{dT}{dt} + kT = kT_a. This is linear with P(t)=kP(t) = k and Q(t)=kTaQ(t) = kT_a. For instance, a cup of coffee at 90ยฐC in a 20ยฐC room cools according to this model.
  • Mixing problems: A tank holds a solution, and liquid flows in and out at given rates. The equation typically looks like dAdt=(rateย in)โˆ’(rateย out)\frac{dA}{dt} = (\text{rate in}) - (\text{rate out}), where A(t)A(t) is the amount of solute. The "rate out" term usually depends on AA, making the equation linear.

Types of First-Order Differential Equations

First-order linear equations are one type among several. Knowing the landscape helps you pick the right technique:

  • Separable equations: Variables can be separated to opposite sides and integrated independently. Example: dydx=xy\frac{dy}{dx} = xy becomes dyy=xโ€‰dx\frac{dy}{y} = x\,dx.
  • Homogeneous equations: Can be reduced to separable form using the substitution v=y/xv = y/x.
  • Exact equations: Have the form M(x,y)โ€‰dx+N(x,y)โ€‰dy=0M(x,y)\,dx + N(x,y)\,dy = 0 where โˆ‚Mโˆ‚y=โˆ‚Nโˆ‚x\frac{\partial M}{\partial y} = \frac{\partial N}{\partial x}. Solved by finding a potential function.
  • Bernoulli equations: Have the form dydx+P(x)y=Q(x)yn\frac{dy}{dx} + P(x)y = Q(x)y^n where nโ‰ 0,1n \neq 0, 1. These are nonlinear, but the substitution v=y1โˆ’nv = y^{1-n} transforms them into a linear equation you can solve with an integrating factor.

A given equation might fit more than one category. For example, dPdt=kP\frac{dP}{dt} = kP is both separable and linear. Use whichever method you find more straightforward.