---
title: "Solve one dimensional heat equation"
subject: "Mathematics III"
chapter: 4
key: "semester_3/mathematics_iii:solve-one-dimensional-heat-equation"
source: https://www.bctengineer.com/q/semester_3/mathematics_iii/solve-one-dimensional-heat-equation
site: BCT Engineering
---

# Solve one dimensional heat equation

Mathematics III · Chapter 4: Fourier Series

- Asked in: 2082 Chaitra (new course), 4 marks
- Video: [Solution of One Dimensional Heat Equation](https://www.youtube.com/watch?v=1WI9zeXJdNw) — Mathematics with Jaskirat Makkar
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_3/mathematics_iii/solve-one-dimensional-heat-equation
- Whole chapter: https://www.bctengineer.com/md/semester_3/mathematics_iii/chapter-4

## Question

Solve the one dimensional heat equation ∂u/∂t = c² ∂²u/∂x² completely.

## Short answer

By separation of variables with ends at 0,L held at 0: u(x,t) = sum_{n=1}^∞ B_n sin(nπx/L) e^{-c²n²π²t/L²}, where B_n = (2/L)∫_0^L f(x) sin(nπx/L) dx from initial temperature f(x).

## Answer

The one dimensional heat equation ∂u/∂t = c² ∂²u/∂x² gives the temperature u(x, t) in a thin rod of length L. It is solved by separation of variables, with the standard conditions u(0, t) = 0, u(L, t) = 0 (ends kept at zero temperature) and u(x, 0) = f(x).

**Step 1: separate.** Let u = X(x)T(t). Then X T′ = c² X″ T, so

X″/X = T′/(c²T) = −p²  (a constant)

The constant must be negative, otherwise u would grow without bound in time or fail the boundary conditions. This gives

X″ + p²X = 0 and T′ + c²p²T = 0

**Step 2: solutions.** X = A cos px + B sin px and T = C e^(−c²p²t). So

u = (A cos px + B sin px) e^(−c²p²t)

**Step 3: boundary conditions.**

- u(0, t) = 0 gives A = 0.
- u(L, t) = 0 gives B sin pL = 0, so p = nπ/L (n = 1, 2, 3, …).

Hence uₙ = Bₙ sin(nπx/L) e^(−c²n²π²t/L²).

**Step 4: superpose and use the initial condition.**

u(x, t) = Σ (n=1 to ∞) Bₙ sin(nπx/L) e^(−c²n²π²t/L²)

Putting t = 0: f(x) = Σ Bₙ sin(nπx/L), a half range sine series, so

**Bₙ = (2/L) ∫₀ᴸ f(x) sin(nπx/L) dx**

This is the complete solution. Each term decays exponentially, and the higher harmonics decay faster, so u → 0 as t → ∞.

## Check yourself

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

1. The separation constant is taken negative (−p^2) because:
   A. it simplifies integration
   B. it makes c vanish
   C. otherwise u grows without bound or fails the boundary conditions
   D. heat flow is always positive
   Answer: C. Negative gives oscillatory X. (Key point: Separation constant)

2. u(L, t) = 0 gives:
   A. p = n/L
   B. p = L/n
   C. p = nπL
   D. p = nπ/L
   Answer: D. sin pL = 0. (Key point: Boundary)

3. Bn is:
   A. (2/L)∫0^L f(x) sin(nπx/L) dx
   B. (1/L)∫ f cos(nπx/L) dx
   C. (2/L)∫ f dx
   D. ∫ f sin dx
   Answer: A. Half-range sine series. (Key point: Coefficient)

4. As t → ∞:
   A. u → ∞
   B. u → 0, higher harmonics decay faster
   C. u stays constant
   D. higher harmonics decay slower
   Answer: B. e^(−c^2n^2π^2 t/L^2). (Key point: Time behaviour)

## Related in Mathematics III

- [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
- [Derive or solve wave equation](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Aderive-or-solve-wave-equation-two) — Mathematics III, chapter 4

## Related in other subjects

- [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×
- [Derive 1D heat equation and solve](https://www.bctengineer.com/question.md?key=semester_4%2Fapplied_mathematics%3Aheat-eq-derive-and-solve) — Applied Mathematics, chapter 3, asked 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
- [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×
