Differential Equations

The language of change in the natural world. Differential equations connect rates of change to the quantities themselves, giving us the power to model everything from population growth and heat flow to the motion of planets and the behavior of electrical circuits.

1. Introduction to Differential Equations

A differential equation is an equation that relates a function to one or more of its derivatives. While algebraic equations involve unknown numbers, differential equations involve unknown functions. They are the primary mathematical tool for modeling systems that change over time or space.

What Is a Differential Equation?

At its simplest, a differential equation is any equation that contains derivatives. For example:

dy/dx = 3x²

This tells us that the rate of change of y with respect to x is 3x². Solving it means finding a function y(x) whose derivative equals 3x². In this case, y = x³ + C, where C is an arbitrary constant.

A more complex example:

d²y/dx² + 5 dy/dx + 6y = 0

Here we must find a function y(x) such that its second derivative plus five times its first derivative plus six times the function itself equals zero.

Classification of Differential Equations

ODE vs. PDE

Order

The order of a differential equation is the highest derivative that appears in the equation.

Linearity

A differential equation is linear if the unknown function y and all its derivatives appear only to the first power and are not multiplied together. Otherwise it is nonlinear.

Homogeneous vs. Non-Homogeneous

A linear ODE is homogeneous if the right-hand side is zero, and non-homogeneous if it is not:

Homogeneous: y″ + 5y′ + 6y = 0
Non-Homogeneous: y″ + 5y′ + 6y = sin(x)

Solutions of Differential Equations

A solution to a differential equation is a function that satisfies the equation when substituted in. There are several types:

An initial value problem (IVP) specifies the value of the unknown function (and possibly its derivatives) at a single point: y(x₀) = y₀. A boundary value problem (BVP) specifies values at two or more points: y(a) = α, y(b) = β. IVPs and BVPs can have very different behavior — existence and uniqueness theorems differ for each.

Example: Verify a Solution

Show that y = e²ˣ is a solution of y″ − 4y = 0.

Step 1: Compute derivatives: y = e²ˣ, y′ = 2e²ˣ, y″ = 4e²ˣ.

Step 2: Substitute into the equation: y″ − 4y = 4e²ˣ − 4e²ˣ = 0. ✓

Since the left side equals zero, y = e²ˣ is indeed a solution.

Example: Solve a Simple ODE

Solve dy/dx = 6x² with y(0) = 5.

Step 1: Integrate both sides: y = ∫ 6x² dx = 2x³ + C.

Step 2: Apply the initial condition y(0) = 5: 5 = 2(0)³ + C → C = 5.

Solution: y = 2x³ + 5.

2. Separable Equations

A first-order ODE is separable if it can be written so that all terms involving y are on one side and all terms involving x are on the other. Separable equations are among the most common and easiest to solve.

Standard Form

A separable equation has the form:

dy/dx = f(x) · g(y)

We separate the variables:

dy / g(y) = f(x) dx

Then integrate both sides:

∫ dy / g(y) = ∫ f(x) dx + C
When separating variables, be careful about values of y where g(y) = 0. These may yield constant (equilibrium) solutions that are lost during separation. Always check for them separately.

Example: Solve dy/dx = xy

Step 1: Separate variables: dy/y = x dx (assuming y ≠ 0).

Step 2: Integrate both sides: ∫ dy/y = ∫ x dx → ln|y| = x²/2 + C₁.

Step 3: Solve for y: |y| = e^(x²/2 + C₁) = e^C₁ · e^(x²/2).

Step 4: Let A = ±e^C₁ (an arbitrary nonzero constant): y = A · e^(x²/2).

Note: y = 0 is also a solution (the equilibrium solution when g(y) = y = 0). It corresponds to A = 0, so the general solution is y = Ae^(x²/2) for any constant A.

Example: Solve dy/dx = (1 + y²) with y(0) = 1

Step 1: Separate: dy/(1 + y²) = dx.

Step 2: Integrate: arctan(y) = x + C.

Step 3: Solve for y: y = tan(x + C).

Step 4: Apply IC y(0) = 1: 1 = tan(C), so C = π/4.

Solution: y = tan(x + π/4).

This solution is valid for −3π/4 < x < π/4, where the tangent is defined.

Example: Solve dy/dx = y²·cos(x) with y(0) = 1

Step 1: Separate: dy/y² = cos(x) dx (for y ≠ 0).

Step 2: Integrate: ∫ y⁻² dy = ∫ cos(x) dx → −1/y = sin(x) + C.

Step 3: Apply IC y(0) = 1: −1/1 = sin(0) + C → C = −1.

Step 4: Solve for y: −1/y = sin(x) − 1 → y = 1/(1 − sin(x)).

Solution: y = 1/(1 − sin(x)), valid where sin(x) ≠ 1.

3. First-Order Linear Equations

A first-order linear ODE has the standard form:

dy/dx + P(x)·y = Q(x)

This equation is linear in y (no y², y·y′, etc.). Even when it is not separable, there is a systematic method using an integrating factor.

The Integrating Factor Method

The key idea is to multiply both sides by a carefully chosen function μ(x) — the integrating factor — that makes the left side collapse into the derivative of a product.

Step 1: Write the equation in standard form: dy/dx + P(x)·y = Q(x).

Step 2: Compute the integrating factor:

μ(x) = e^(∫ P(x) dx)

Step 3: Multiply both sides by μ(x). The left side becomes d/dx[μ(x)·y]:

d/dx[μ(x)·y] = μ(x)·Q(x)

Step 4: Integrate both sides:

μ(x)·y = ∫ μ(x)·Q(x) dx + C

Step 5: Solve for y:

y = [1/μ(x)] · [∫ μ(x)·Q(x) dx + C]
Why does the integrating factor work? After multiplying by μ(x), the left side becomes μ·y′ + μ·P·y. If μ satisfies μ′ = μ·P (i.e., μ = e^(∫P dx)), then μ·y′ + μ′·y = d/dx(μ·y) by the product rule. This is the entire trick.

Example: Solve dy/dx + 2y = e⁻ˣ

Step 1: P(x) = 2, Q(x) = e⁻ˣ.

Step 2: Integrating factor: μ = e^(∫ 2 dx) = e²ˣ.

Step 3: Multiply: e²ˣ·dy/dx + 2e²ˣ·y = e²ˣ·e⁻ˣ = eˣ.

Left side is d/dx[e²ˣ·y], so: d/dx[e²ˣ·y] = eˣ.

Step 4: Integrate: e²ˣ·y = ∫ eˣ dx = eˣ + C.

Step 5: Solve for y: y = e⁻²ˣ·(eˣ + C) = e⁻ˣ + Ce⁻²ˣ.

General solution: y = e⁻ˣ + Ce⁻²ˣ.

Example: Solve x·dy/dx − 3y = x⁴ with y(1) = 2

Step 1: Divide by x to get standard form: dy/dx − (3/x)·y = x³.

Here P(x) = −3/x and Q(x) = x³.

Step 2: Integrating factor: μ = e^(∫ −3/x dx) = e^(−3 ln|x|) = x⁻³ = 1/x³.

Step 3: Multiply by 1/x³: (1/x³)·dy/dx − (3/x⁴)·y = 1.

Left side: d/dx[y/x³] = 1.

Step 4: Integrate: y/x³ = x + C.

Step 5: Solve for y: y = x⁴ + Cx³.

Step 6: Apply IC y(1) = 2: 2 = 1 + C → C = 1.

Solution: y = x⁴ + x³.

4. Exact Equations

An equation of the form:

M(x, y) dx + N(x, y) dy = 0

is called exact if there exists a function F(x, y) such that:

∂F/∂x = M    and    ∂F/∂y = N

In that case, the solution is simply:

F(x, y) = C

Test for Exactness

By Clairaut's theorem, if F has continuous second partial derivatives, then ∂²F/∂y∂x = ∂²F/∂x∂y. This means:

∂M/∂y = ∂N/∂x    (condition for exactness)

Solving an Exact Equation

Step 1: Verify ∂M/∂y = ∂N/∂x.

Step 2: Integrate M with respect to x (holding y constant): F = ∫ M dx + g(y), where g(y) is an unknown function of y.

Step 3: Differentiate F with respect to y and set it equal to N: ∂F/∂y = ∂/∂y[∫ M dx] + g′(y) = N. Solve for g′(y) and integrate to find g(y).

Step 4: Write the solution F(x, y) = C.

If the equation is not exact, you can sometimes find an integrating factor μ that depends on x alone or y alone to make it exact. If (∂M/∂y − ∂N/∂x)/N depends only on x, then μ = e^(∫ [(∂M/∂y − ∂N/∂x)/N] dx). If (∂N/∂x − ∂M/∂y)/M depends only on y, then μ = e^(∫ [(∂N/∂x − ∂M/∂y)/M] dy).

Example: Solve (2xy + 3) dx + (x² + 4y) dy = 0

Step 1: Identify M = 2xy + 3 and N = x² + 4y.

Check: ∂M/∂y = 2x and ∂N/∂x = 2x. Since ∂M/∂y = ∂N/∂x, the equation is exact. ✓

Step 2: Integrate M with respect to x: F = ∫ (2xy + 3) dx = x²y + 3x + g(y).

Step 3: Differentiate F with respect to y: ∂F/∂y = x² + g′(y). Set equal to N: x² + g′(y) = x² + 4y → g′(y) = 4y → g(y) = 2y².

Step 4: The solution is F(x, y) = C:

Solution: x²y + 3x + 2y² = C.

Example: Solve (3x²y + eʸ) dx + (x³ + xeʸ − 2y) dy = 0

Step 1: M = 3x²y + eʸ, N = x³ + xeʸ − 2y.

∂M/∂y = 3x² + eʸ, ∂N/∂x = 3x² + eʸ. Exact ✓

Step 2: F = ∫ (3x²y + eʸ) dx = x³y + xeʸ + g(y).

Step 3: ∂F/∂y = x³ + xeʸ + g′(y) = x³ + xeʸ − 2y → g′(y) = −2y → g(y) = −y².

Solution: x³y + xeʸ − y² = C.

5. Second-Order Linear Equations

A second-order linear ODE with constant coefficients has the general form:

ay″ + by′ + cy = 0

where a, b, c are real constants and a ≠ 0. These equations arise naturally in physics—especially in the study of vibrations, oscillations, and electrical circuits.

The Characteristic Equation

We guess a solution of the form y = eʳˣ. Substituting into ay″ + by′ + cy = 0 gives:

ar²eʳˣ + breʳˣ + ceʳˣ = 0 → eʳˣ(ar² + br + c) = 0

Since eʳˣ ≠ 0, we need:

ar² + br + c = 0    (characteristic equation)

The nature of the roots r₁ and r₂ determines the form of the general solution:

Case 1: Two Distinct Real Roots (b² − 4ac > 0)

y = C₁e^(r₁x) + C₂e^(r₂x)

Case 2: Repeated Real Root (b² − 4ac = 0)

r₁ = r₂ = r = −b/(2a). A single exponential is not enough; we need a second linearly independent solution:

y = C₁eʳˣ + C₂xeʳˣ = (C₁ + C₂x)eʳˣ

Case 3: Complex Conjugate Roots (b² − 4ac < 0)

r = α ± βi, where α = −b/(2a) and β = √(4ac − b²)/(2a). Using Euler's formula:

y = eᵅˣ(C₁ cos(βx) + C₂ sin(βx))

This represents oscillatory behavior with exponential growth or decay (depending on the sign of α).

For complex roots, when α < 0 the oscillations decay (damped oscillation). When α = 0 the oscillations are sustained (simple harmonic motion). When α > 0 the oscillations grow without bound.

Example: Solve y″ − 5y′ + 6y = 0

Step 1: Write the characteristic equation: r² − 5r + 6 = 0.

Step 2: Factor: (r − 2)(r − 3) = 0, so r₁ = 2, r₂ = 3.

Step 3: Two distinct real roots → y = C₁e²ˣ + C₂e³ˣ.

Example: Solve y″ + 4y′ + 4y = 0

Step 1: Characteristic equation: r² + 4r + 4 = 0.

Step 2: Factor: (r + 2)² = 0, so r = −2 (repeated root).

Step 3: Repeated root → y = (C₁ + C₂x)e⁻²ˣ.

Example: Solve y″ + 2y′ + 5y = 0

Step 1: Characteristic equation: r² + 2r + 5 = 0.

Step 2: Discriminant: 4 − 20 = −16 < 0. Use the quadratic formula:

r = (−2 ± √(−16))/2 = (−2 ± 4i)/2 = −1 ± 2i.

So α = −1, β = 2.

Step 3: Complex roots → y = e⁻ˣ(C₁ cos(2x) + C₂ sin(2x)).

This represents a decaying oscillation since α = −1 < 0.

Example: IVP — Solve y″ + 9y = 0, y(0) = 2, y′(0) = −3

Step 1: Characteristic equation: r² + 9 = 0 → r = ±3i. Pure imaginary roots (α = 0, β = 3).

Step 2: General solution: y = C₁ cos(3x) + C₂ sin(3x).

Step 3: Apply y(0) = 2: C₁ cos(0) + C₂ sin(0) = C₁ = 2.

Step 4: y′ = −3C₁ sin(3x) + 3C₂ cos(3x). Apply y′(0) = −3: 3C₂ = −3 → C₂ = −1.

Solution: y = 2 cos(3x) − sin(3x). (Simple harmonic motion.)

6. Non-Homogeneous Equations

A non-homogeneous second-order linear ODE has the form:

ay″ + by′ + cy = f(x)

where f(x) ≠ 0 is the forcing function (or input, or driving term).

Structure of the Solution

The general solution is the sum of two parts:

y = y_h + y_p

Method of Undetermined Coefficients

This method works when f(x) is a polynomial, exponential, sine, cosine, or a combination of these. We guess the form of y_p based on f(x), plug it into the equation, and solve for the unknown coefficients.

f(x) Guess for y_p
aₙxⁿ + … + a₁x + a₀ Aₙxⁿ + … + A₁x + A₀
aeᵏˣ Aeᵏˣ
a cos(kx) + b sin(kx) A cos(kx) + B sin(kx)
Product/sum of above Product/sum of corresponding guesses
Modification Rule: If your initial guess y_p is already a solution to the homogeneous equation, multiply by x (or x² if needed) until it is no longer a homogeneous solution. For example, if y_h includes e²ˣ and f(x) = e²ˣ, guess y_p = Axe²ˣ instead of Ae²ˣ.

Example: Solve y″ − 3y′ + 2y = 4x

Step 1: Solve the homogeneous equation: r² − 3r + 2 = 0 → (r−1)(r−2) = 0 → r = 1, 2.

y_h = C₁eˣ + C₂e²ˣ.

Step 2: Guess y_p = Ax + B (a polynomial matching f(x) = 4x).

Step 3: y_p′ = A, y_p″ = 0. Substitute: 0 − 3A + 2(Ax + B) = 4x.

2Ax + (2B − 3A) = 4x + 0.

Matching coefficients: 2A = 4 → A = 2; 2B − 3(2) = 0 → B = 3.

Solution: y = C₁eˣ + C₂e²ˣ + 2x + 3.

Example: Solve y″ + y = 3 sin(2x)

Step 1: Homogeneous: r² + 1 = 0 → r = ±i. y_h = C₁ cos(x) + C₂ sin(x).

Step 2: Guess y_p = A cos(2x) + B sin(2x).

Step 3: y_p″ = −4A cos(2x) − 4B sin(2x). Substitute:

−4A cos(2x) − 4B sin(2x) + A cos(2x) + B sin(2x) = 3 sin(2x).

−3A cos(2x) − 3B sin(2x) = 3 sin(2x).

Coefficients: −3A = 0 → A = 0; −3B = 3 → B = −1.

Solution: y = C₁ cos(x) + C₂ sin(x) − sin(2x).

Variation of Parameters

This method works for any forcing function f(x), not just the special types above. Given a homogeneous solution y_h = C₁y₁ + C₂y₂, we seek a particular solution of the form:

y_p = u₁(x)·y₁(x) + u₂(x)·y₂(x)

where u₁ and u₂ are unknown functions determined by:

u₁′ = −y₂·f(x) / W     u₂′ = y₁·f(x) / W

and W is the Wronskian:

W = y₁·y₂′ − y₂·y₁′

Example: Solve y″ + y = sec(x) using Variation of Parameters

Step 1: Homogeneous solution: y₁ = cos(x), y₂ = sin(x).

Step 2: Wronskian: W = cos(x)·cos(x) − sin(x)·(−sin(x)) = cos²(x) + sin²(x) = 1.

Step 3: Compute u₁′ and u₂′ (with f(x) = sec(x), since the equation is already in standard form with a = 1):

u₁′ = −sin(x)·sec(x)/1 = −sin(x)/cos(x) = −tan(x).

u₂′ = cos(x)·sec(x)/1 = cos(x)/cos(x) = 1.

Step 4: Integrate: u₁ = ∫ −tan(x) dx = ln|cos(x)|. u₂ = ∫ 1 dx = x.

Step 5: y_p = cos(x)·ln|cos(x)| + x·sin(x).

General solution: y = C₁cos(x) + C₂sin(x) + cos(x)·ln|cos(x)| + x·sin(x).

7. Laplace Transforms

The Laplace transform is a powerful integral transform that converts a differential equation in the time domain into an algebraic equation in the frequency domain. After solving the algebraic equation, we apply the inverse Laplace transform to obtain the solution in the original variable.

Definition

The Laplace transform of a function f(t), defined for t ≥ 0, is:

ℒ{f(t)} = F(s) = ∫₀^∞ e⁻ˢᵗ f(t) dt

provided the integral converges.

Common Laplace Transforms

f(t) F(s) = ℒ{f(t)}
1 1/s   (s > 0)
tⁿ n!/s^(n+1)   (s > 0)
eᵃᵗ 1/(s − a)   (s > a)
sin(bt) b/(s² + b²)
cos(bt) s/(s² + b²)
eᵃᵗ sin(bt) b/((s−a)² + b²)
eᵃᵗ cos(bt) (s−a)/((s−a)² + b²)
tⁿeᵃᵗ n!/(s−a)^(n+1)

Key Properties

The key advantage of the Laplace transform is that it handles initial conditions automatically. You don't need to find the general solution first and then apply the conditions — they are built in from the start.

Solving IVPs with Laplace Transforms

The procedure is:

  1. Take the Laplace transform of both sides of the ODE.
  2. Use the derivative property to incorporate initial conditions.
  3. Solve the resulting algebraic equation for Y(s) = ℒ{y(t)}.
  4. Apply the inverse Laplace transform to find y(t).

Example: Solve y″ + 3y′ + 2y = 0, y(0) = 1, y′(0) = 0 using Laplace transforms

Step 1: Take ℒ of both sides. Using the derivative property:

ℒ{y″} = s²Y − sy(0) − y′(0) = s²Y − s

ℒ{y′} = sY − y(0) = sY − 1

So: (s²Y − s) + 3(sY − 1) + 2Y = 0.

Step 2: Simplify: s²Y − s + 3sY − 3 + 2Y = 0 → Y(s² + 3s + 2) = s + 3.

Step 3: Solve for Y: Y(s) = (s + 3)/((s + 1)(s + 2)).

Step 4: Partial fractions: (s + 3)/((s + 1)(s + 2)) = A/(s + 1) + B/(s + 2).

s + 3 = A(s + 2) + B(s + 1). Setting s = −1: 2 = A. Setting s = −2: 1 = −B → B = −1.

Y(s) = 2/(s + 1) − 1/(s + 2).

Step 5: Inverse transform: y(t) = 2e⁻ᵗ − e⁻²ᵗ.

Verification: y(0) = 2 − 1 = 1 ✓. y′(t) = −2e⁻ᵗ + 2e⁻²ᵗ, y′(0) = −2 + 2 = 0 ✓.

Example: Solve y′ + 2y = e⁻ᵗ, y(0) = 3

Step 1: Transform: (sY − 3) + 2Y = 1/(s + 1).

Step 2: Y(s + 2) = 3 + 1/(s + 1) = (3s + 4)/(s + 1).

Y(s) = (3s + 4)/((s + 1)(s + 2)).

Step 3: Partial fractions: (3s + 4)/((s + 1)(s + 2)) = A/(s + 1) + B/(s + 2).

3s + 4 = A(s + 2) + B(s + 1). s = −1: 1 = A. s = −2: −2 = −B → B = 2.

Y(s) = 1/(s + 1) + 2/(s + 2).

Step 4: y(t) = e⁻ᵗ + 2e⁻²ᵗ.

8. Systems of Differential Equations

Many real-world problems involve multiple interacting quantities, each changing over time. These are modeled by systems of differential equations—a set of coupled ODEs.

General Form

A system of two first-order linear ODEs can be written as:

dx/dt = a₁x + b₁y + f₁(t)
dy/dt = a₂x + b₂y + f₂(t)

In matrix form:

d/dt [x; y] = A · [x; y] + [f₁; f₂]

where A is the coefficient matrix.

Solving Homogeneous Systems with Eigenvalues

For the homogeneous system x′ = Ax, we look for solutions of the form x(t) = veᵏᵗ, where v is a constant vector and λ is a scalar. Substituting gives:

λveᵏᵗ = Aveᵏᵗ → Av = λv

So λ must be an eigenvalue of A, and v its corresponding eigenvector.

The general solution is:

x(t) = C₁v₁e^(λ₁t) + C₂v₂e^(λ₂t)
The behavior of the system depends on the eigenvalues: real negative eigenvalues give a stable node, real positive give an unstable node, opposite signs give a saddle point, and complex eigenvalues produce spirals or centers.

Example: Solve the system x′ = 3x + y, y′ = x + 3y

Step 1: Write in matrix form: A = [[3, 1], [1, 3]].

Step 2: Characteristic equation: det(A − λI) = (3−λ)² − 1 = 0 → λ² − 6λ + 8 = 0 → (λ−2)(λ−4) = 0.

Eigenvalues: λ₁ = 2, λ₂ = 4.

Step 3 (λ₁ = 2): (A − 2I)v = 0: [[1,1],[1,1]][v₁,v₂]ᵀ = 0 → v₁ + v₂ = 0 → v₁ = [1, −1]ᵀ.

Step 4 (λ₂ = 4): (A − 4I)v = 0: [[−1,1],[1,−1]][v₁,v₂]ᵀ = 0 → −v₁ + v₂ = 0 → v₂ = [1, 1]ᵀ.

General solution:

x(t) = C₁e²ᵗ + C₂e⁴ᵗ

y(t) = −C₁e²ᵗ + C₂e⁴ᵗ

Both eigenvalues are positive, so this is an unstable node.

Example: Solve x′ = −y, y′ = x with x(0) = 1, y(0) = 0

Step 1: A = [[0, −1], [1, 0]]. Characteristic equation: λ² + 1 = 0 → λ = ±i.

Step 2: Complex eigenvalues ±i with eigenvectors. For λ = i: v = [1, −i]ᵀ.

Step 3: The real-valued general solution is:

x(t) = C₁ cos(t) + C₂ sin(t)

y(t) = C₁ sin(t) − C₂ cos(t)

Step 4: Apply ICs: x(0) = C₁ = 1. y(0) = −C₂ = 0 → C₂ = 0.

Solution: x(t) = cos(t), y(t) = sin(t). The trajectory is a circle — a center.

Converting Higher-Order to Systems

Any nth-order ODE can be converted to a system of n first-order ODEs. For y″ + py′ + qy = f(t), let x₁ = y and x₂ = y′. Then:

x₁′ = x₂
x₂′ = −qx₁ − px₂ + f(t)

This technique is essential for numerical methods and theoretical analysis.

9. Applications

Differential equations are the backbone of mathematical modeling in science and engineering. Here are some of the most important applications.

Population Growth Models

Exponential Growth

The simplest model assumes the rate of growth is proportional to the current population:

dP/dt = kP

This is separable: P(t) = P₀eᵏᵗ, where P₀ is the initial population and k is the growth rate constant.

Logistic Growth

Exponential growth is unrealistic for large populations due to limited resources. The logistic equation introduces a carrying capacity K:

dP/dt = kP(1 − P/K)

When P is small compared to K, growth is approximately exponential. As P approaches K, growth slows and eventually stops.

Example: Logistic Growth

A population of bacteria follows dP/dt = 0.5P(1 − P/1000) with P(0) = 100. Find P(t).

Step 1: This is the logistic equation with k = 0.5 and K = 1000.

Step 2: The general solution to the logistic equation is:

P(t) = K / (1 + ((K − P₀)/P₀)·e⁻ᵏᵗ)

Step 3: Substitute values: K = 1000, P₀ = 100, k = 0.5:

P(t) = 1000 / (1 + 9e⁻⁰·⁵ᵗ)

Behavior: P(0) = 1000/(1+9) = 100 ✓. As t → ∞, P → 1000/1 = 1000 (carrying capacity).

Newton's Law of Cooling

The rate of change of an object's temperature is proportional to the difference between its temperature and the ambient temperature T_a:

dT/dt = −k(T − T_a)

This is a first-order linear ODE with solution:

T(t) = T_a + (T₀ − T_a)e⁻ᵏᵗ

Example: Cooling Coffee

A cup of coffee at 90°C is placed in a room at 20°C. After 5 minutes it is 70°C. When will it be 40°C?

Step 1: T(t) = 20 + 70e⁻ᵏᵗ (since T₀ − T_a = 90 − 20 = 70).

Step 2: Use T(5) = 70: 70 = 20 + 70e⁻⁵ᵏ → 50 = 70e⁻⁵ᵏ → e⁻⁵ᵏ = 5/7.

k = −ln(5/7)/5 = ln(7/5)/5 ≈ 0.0673.

Step 3: Solve T(t) = 40: 40 = 20 + 70e⁻ᵏᵗ → 20 = 70e⁻ᵏᵗ → e⁻ᵏᵗ = 2/7.

t = −ln(2/7)/k = ln(7/2)/k ≈ 1.2528/0.0673 ≈ 18.6 minutes.

Spring-Mass Systems (Harmonic Oscillators)

A mass m attached to a spring with spring constant k (and damping coefficient c) satisfies:

m·y″ + c·y′ + k·y = F(t)

where y is the displacement from equilibrium and F(t) is any external force.

Example: Underdamped Spring-Mass

A 1 kg mass on a spring (k = 10 N/m) with damping c = 2 N·s/m. Find y(t) with y(0) = 0.5, y′(0) = 0.

Step 1: The ODE: y″ + 2y′ + 10y = 0.

Step 2: Characteristic equation: r² + 2r + 10 = 0 → r = (−2 ± √(4−40))/2 = −1 ± 3i.

Step 3: General solution: y = e⁻ᵗ(C₁ cos(3t) + C₂ sin(3t)).

Step 4: y(0) = C₁ = 0.5. y′ = e⁻ᵗ(−C₁ cos(3t) − C₂ sin(3t) − 3C₁ sin(3t) + 3C₂ cos(3t)).

y′(0) = −C₁ + 3C₂ = 0 → C₂ = C₁/3 = 1/6.

Solution: y(t) = e⁻ᵗ(0.5 cos(3t) + (1/6) sin(3t)).

The system oscillates at frequency 3 rad/s with exponentially decaying amplitude.

Electrical Circuits (RLC Circuits)

An RLC series circuit with resistance R, inductance L, and capacitance C, driven by a voltage E(t), satisfies:

L · dI/dt + R · I + (1/C) · q = E(t)

Since I = dq/dt, this becomes a second-order ODE in the charge q:

L · q″ + R · q′ + (1/C) · q = E(t)

This is mathematically identical to the spring-mass equation! The analogy is: L ↔ m, R ↔ c, 1/C ↔ k, E(t) ↔ F(t).

Example: Series RL Circuit

An RL circuit (no capacitor) with L = 2 H, R = 6 Ω, and E = 12 V. Find I(t) with I(0) = 0.

Step 1: The ODE: 2 dI/dt + 6I = 12 → dI/dt + 3I = 6.

Step 2: Integrating factor: μ = e³ᵗ. d/dt[e³ᵗ I] = 6e³ᵗ.

Step 3: Integrate: e³ᵗ I = 2e³ᵗ + C → I = 2 + Ce⁻³ᵗ.

Step 4: IC: I(0) = 0 → 0 = 2 + C → C = −2.

Solution: I(t) = 2(1 − e⁻³ᵗ) amperes.

The current rises from 0 and approaches the steady-state value I = E/R = 2 A.

10. Introduction to Partial Differential Equations

Partial differential equations (PDEs) involve functions of several variables and their partial derivatives. PDEs are essential for describing phenomena that depend on multiple independent variables, such as position and time.

The Heat Equation

The heat equation models how temperature u(x, t) evolves in a rod over time:

∂u/∂t = k · ∂²u/∂x²

where k > 0 is the thermal diffusivity. This is a parabolic PDE.

To solve the heat equation, we typically need:

Separation of Variables

We assume u(x, t) = X(x)·T(t). Substituting into the PDE:

X·T′ = k·X″·T → T′/(kT) = X″/X = −λ

Since the left side depends only on t and the right only on x, both must equal a constant −λ. This gives two ODEs:

X″ + λX = 0      T′ + kλT = 0

With boundary conditions u(0,t) = u(L,t) = 0, we need X(0) = 0 and X(L) = 0. The eigenvalues and eigenfunctions are:

λₙ = (nπ/L)²     Xₙ(x) = sin(nπx/L)     n = 1, 2, 3, …

The corresponding time solutions are:

Tₙ(t) = e^(−k(nπ/L)²t)

The general solution is a Fourier sine series:

u(x, t) = Σ Bₙ sin(nπx/L) · e^(−k(nπ/L)²t)

where the coefficients Bₙ are determined by the initial condition via Bₙ = (2/L) ∫₀ᴸ f(x) sin(nπx/L) dx.

Example: Heat Equation on a Rod

Solve ∂u/∂t = ∂²u/∂x² on 0 < x < π with u(0,t) = u(π,t) = 0 and u(x,0) = sin(x) + 3sin(2x).

Step 1: Here L = π, k = 1, so λₙ = n² and the general solution is u = Σ Bₙ sin(nx) e^(−n²t).

Step 2: Apply the initial condition: u(x,0) = Σ Bₙ sin(nx) = sin(x) + 3sin(2x).

By inspection: B₁ = 1, B₂ = 3, Bₙ = 0 for n ≥ 3.

Solution: u(x, t) = sin(x)·e⁻ᵗ + 3sin(2x)·e⁻⁴ᵗ.

The higher-frequency component (sin 2x) decays faster (e⁻⁴ᵗ vs. e⁻ᵗ), which is characteristic of diffusion.

The Wave Equation

The wave equation models vibrations (strings, membranes, sound):

∂²u/∂t² = c² · ∂²u/∂x²

where c is the wave speed. This is a hyperbolic PDE.

For a string of length L fixed at both ends (u(0,t) = u(L,t) = 0), with initial displacement u(x,0) = f(x) and initial velocity uₜ(x,0) = g(x), separation of variables gives:

u(x, t) = Σ [Aₙ cos(nπct/L) + Bₙ sin(nπct/L)] · sin(nπx/L)

where:

Aₙ = (2/L) ∫₀ᴸ f(x) sin(nπx/L) dx
Bₙ = (2/(nπc)) ∫₀ᴸ g(x) sin(nπx/L) dx
Unlike the heat equation, the wave equation preserves energy — the solution oscillates indefinitely rather than decaying. The frequencies nπc/L are the natural frequencies (harmonics) of the string. This is why a guitar string produces a fundamental note plus overtones.

Example: Vibrating String

Solve ∂²u/∂t² = 4 · ∂²u/∂x² on 0 < x < 1 with u(0,t) = u(1,t) = 0, u(x,0) = sin(πx), uₜ(x,0) = 0.

Step 1: c = 2, L = 1. General solution: u = Σ [Aₙ cos(2nπt) + Bₙ sin(2nπt)] sin(nπx).

Step 2: uₜ(x,0) = 0 → all Bₙ = 0. u(x,0) = sin(πx) → A₁ = 1, Aₙ = 0 for n ≥ 2.

Solution: u(x, t) = sin(πx)·cos(2πt).

This is a standing wave — the string oscillates with period T = 1 (since 2π/(2π) = 1).

Laplace's Equation

Laplace's equation models steady-state (time-independent) phenomena such as electrostatics, steady-state heat distribution, and incompressible fluid flow:

∂²u/∂x² + ∂²u/∂y² = 0    (or ∇²u = 0)

This is an elliptic PDE. Solutions are called harmonic functions and have many remarkable properties:

Example: Steady-State Temperature in a Rectangular Plate

Solve ∇²u = 0 on the rectangle 0 < x < a, 0 < y < b with:

u(0,y) = 0, u(a,y) = 0, u(x,0) = 0, u(x,b) = f(x).

Step 1: Separation of variables u = X(x)Y(y) gives: X″/X = −Y″/Y = −λ.

Step 2: With X(0) = 0, X(a) = 0: Xₙ = sin(nπx/a), λₙ = (nπ/a)².

Step 3: Y equation: Y″ − (nπ/a)²Y = 0 with Y(0) = 0. Solution: Yₙ = sinh(nπy/a).

Step 4: u(x,y) = Σ Cₙ sin(nπx/a) sinh(nπy/a).

Step 5: Apply u(x,b) = f(x): Cₙ sinh(nπb/a) = (2/a)∫₀ᵃ f(x)sin(nπx/a)dx.

Classification of Second-Order PDEs

A general second-order PDE in two variables can be written as:

Au_xx + 2Bu_xy + Cu_yy + (lower order terms) = 0

The classification depends on the discriminant B² − AC:

The three classic PDEs — heat, wave, and Laplace — serve as prototypes for each type. Their different characters reflect fundamentally different physical phenomena: diffusion spreads and smooths, waves propagate and preserve, and steady states reach equilibrium. Understanding these differences is key to applied mathematics and physics.