---
title: "Derive 1D heat equation and solve"
subject: "Applied Mathematics"
chapter: 3
key: "semester_4/applied_mathematics:heat-eq-derive-and-solve"
source: https://www.bctengineer.com/q/semester_4/applied_mathematics/heat-eq-derive-and-solve
site: BCT Engineering
---

# Derive 1D heat equation and solve

Applied Mathematics · Chapter 3: Partial Differential Equations

- Asked in: 2073 Bhadra, 10 marks; 2071 Magh, 10 marks; 2068 Magh, 10 marks (asked 3 times)
- Video: [One Dimensional Heat Equation (Part 1) |  Solution Derivation | S2 Differential Equations](https://www.youtube.com/watch?v=8sAgqGs_xs8) — BTech Mathematics
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_4/applied_mathematics/heat-eq-derive-and-solve
- Whole chapter: https://www.bctengineer.com/md/semester_4/applied_mathematics/chapter-3

## Question

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

## 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.

## Answer

#### 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:

```text
σρ 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²

```text
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.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Heat flow across a section is
   A. -K A du/dx
   B. K A du/dx
   C. -K du/dt
   D. K A d2u/dx2
   Answer: A. Heat flows from hot to cold. (Key point: Conduction law)

2. The equation equates
   A. heat in to heat out
   B. net heat gained by the element to sigma rho A dx du/dt
   C. K to rho
   D. du/dt to zero
   Answer: B. Net gain raises temperature. (Key point: Balance)

3. c^2 =
   A. sigma rho/K
   B. K sigma rho
   C. K/(sigma rho)
   D. K/rho
   Answer: C. Thermal diffusivity. (Key point: Diffusivity)

4. The separation constant is negative because
   A. it makes sin vanish
   B. it gives c imaginary
   C. it speeds decay
   D. a positive one would make temperature grow without bound
   Answer: D. Physical. (Key point: Separation sign)

## Close variants set in other exams

- [Derive one-dimensional heat equation](https://www.bctengineer.com/question.md?key=semester_4%2Fapplied_mathematics%3Aheat-eq-derive) — Applied Mathematics, chapter 3, asked 5×

## Related in Applied Mathematics

- [Derive 1D wave equation and solve](https://www.bctengineer.com/question.md?key=semester_4%2Fapplied_mathematics%3Awave-eq-derive-and-solve) — Applied Mathematics, chapter 3, asked 5×
- [Derive one-dimensional wave equation](https://www.bctengineer.com/question.md?key=semester_4%2Fapplied_mathematics%3Awave-eq-derive) — Applied Mathematics, chapter 3, asked 2×
- [Derive two-dimensional heat equation](https://www.bctengineer.com/question.md?key=semester_4%2Fapplied_mathematics%3Aheat-eq-2d-derive) — Applied Mathematics, chapter 3, asked 2×
- [Heat equation, insulated ends, u(x,0)=lx-x²](https://www.bctengineer.com/question.md?key=semester_4%2Fapplied_mathematics%3Aheat-eq-insulated-ends-lx-x2) — Applied Mathematics, chapter 3, asked 2×
- [Heat equation, insulated ends, u(x,0)=x](https://www.bctengineer.com/question.md?key=semester_4%2Fapplied_mathematics%3Aheat-eq-insulated-ends-u-x) — Applied Mathematics, chapter 3

## Related in other subjects

- [Solve one dimensional heat equation](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Asolve-one-dimensional-heat-equation) — Mathematics III, chapter 4
- [Solve one dimensional heat equation](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Asolve-one-dimensional-heat-equation-three) — Mathematics III, chapter 4
- [Solve one dimensional heat equation](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Asolve-one-dimensional-heat-equation-two) — Mathematics III, chapter 4
- [Variational approach for one-dimensional heat conduction](https://www.bctengineer.com/question.md?key=semester_8%2Ffinite_element_method%3Avariational-approach-heat-conduction) — Finite Element Method, chapter 5
