Skip to main content

Derive 1D heat equation and solve

Short answer

From Fourier's law and energy conservation for a thin bar, ∂u/∂t=c²∂²u/∂x² with c²=K/(σρ). For zero end temperatures, separation yields u(x,t)=∑ B_n sin(nπx/l) exp(-c²n²π²t/l²), where B_n = (2/l)∫ f(x) sin(nπx/l)dx.

Derive one dimensional heat equation u_t = c² u_xx and solve it completely.

Part 1: Derivation of u_t = c² u_xx

Consider a thin uniform bar of cross-section A, with insulated lateral surface, so heat flows only along x. Let

  • u(x, t) = temperature
  • ρ = density, σ = specific heat, K = thermal conductivity (all constant)

Law of conduction. The rate of heat flow across a section in the +x direction is −K A ∂u/∂x.

Consider the element between x and x + δx.

  • Heat entering at x per unit time = −K A (∂u/∂x)ₓ
  • Heat leaving at x + δx per unit time = −K A (∂u/∂x)_{x+δx}

Net gain of heat per unit time:

K A [ (∂u/∂x)_{x+δx} − (∂u/∂x)ₓ ]

This heat raises the temperature of the element, whose mass is ρ A δx:

rate of gain = σ ρ A δx ∂u/∂t

Equating the two:

σρ A δx ∂u/∂t = K A [ (∂u/∂x)_{x+δx} − (∂u/∂x)ₓ ]
∂u/∂t = (K/σρ) · [ (∂u/∂x)_{x+δx} − (∂u/∂x)ₓ ] / δx

Let δx → 0 and write c² = K/(σρ) (the diffusivity):

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

Part 2: Complete solution

Problem. Bar of length l, ends kept at 0°C, initial temperature f(x):

  1. u(0, t) = u(l, t) = 0 for t ≥ 0
  2. u(x, 0) = f(x), 0 < x < l

Step 1: separate variables. u = X(x)T(t):

X T′ = c² X″ T, so X″/X = T′/(c²T) = −p²

X″ + p² X = 0        →  X = A cos px + B sin px
T′ + c²p² T = 0      →  T = C e^{−c²p²t}

The negative constant is chosen because a positive constant would make the temperature grow without bound (physically impossible), and zero gives only a linear solution that vanishes with the end conditions.

Step 2: boundary conditions.

  • u(0, t) = 0 gives A = 0.
  • u(l, t) = 0 gives B sin pl = 0, so p = nπ/l.

Step 3: general solution.

u(x, t) = Σ_{n=1}^{∞} Bₙ sin(nπx/l) e^{−c²n²π²t/l²}

Step 4: initial condition. u(x, 0) = f(x) = Σ Bₙ sin(nπx/l), so

Bₙ = (2/l) ∫₀^l f(x) sin(nπx/l) dx

As t → ∞, every term decays and u → 0. The n-th mode decays at rate c²n²π²/l², so higher modes die out faster.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Applied Mathematics chapter 3 questions →