---
title: "Heat equation, insulated ends, u(x,0)=lx-x²"
subject: "Applied Mathematics"
chapter: 3
key: "semester_4/applied_mathematics:heat-eq-insulated-ends-lx-x2"
source: https://www.bctengineer.com/q/semester_4/applied_mathematics/heat-eq-insulated-ends-lx-x2
site: BCT Engineering
---

# Heat equation, insulated ends, u(x,0)=lx-x²

Applied Mathematics · Chapter 3: Partial Differential Equations

- Asked in: 2072 Asoj, 10 marks; 2068 Bhadra (asked 2 times)
- Video: [Heat Equation | Separation of Variables Method in PDE | Example & Concepts by GP Sir](https://www.youtube.com/watch?v=NGz3Qo0rGiI) — Dr.Gajendra Purohit
- 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-insulated-ends-lx-x2
- Whole chapter: https://www.bctengineer.com/md/semester_4/applied_mathematics/chapter-3

## Question

Solve the one dimensional heat equation ∂u/∂t = c² ∂²u/∂x² under the conditions: (i) u is not infinite as t → ∞; (ii) ∂u/∂x = 0 for x = 0 and x = l; (iii) u(x,0) = lx - x² for t = 0, between x = 0 and x = l.

## Short answer

Separate variables with insulated ends giving a Fourier cosine series. Compute a₀ = l²/6 and aₙ = −2l²[1+(−1)ⁿ]/(n²π²). The solution is u(x,t) = l²/6 − (l²/π²) Σ_{m=1}^∞ (1/m²) cos(2mπx/l) e^{−4c²m²π²t/l²}.

## Answer

**Problem.** u_t = c² u_xx with (i) u bounded as t → ∞, (ii) u_x = 0 at x = 0 and x = l (ends insulated), (iii) u(x, 0) = lx − x².

**Step 1: separate variables.** u = X(x)T(t): X″/X = T′/(c²T) = k.

**Step 2: choose the sign of k.** Condition (i) rules out k > 0, because T = e^{kc²t} would blow up as t → ∞.

- k = 0: X = A + Bx, T = constant
- k = −p² < 0: X = A cos px + B sin px, T = e^{−c²p²t}

**Step 3: apply (ii) u_x = 0 at both ends.**

- k = 0: X′ = B = 0, so X = constant (allowed).
- k = −p²: X′ = −Ap sin px + Bp cos px. X′(0) = 0 gives B = 0. X′(l) = 0 gives A p sin pl = 0, so p = nπ/l.

**Step 4: general solution.**

u(x, t) = a₀ + Σ_{n=1}^{∞} aₙ cos(nπx/l) e^{−c²n²π²t/l²}

**Step 5: initial condition (iii).** lx − x² = a₀ + Σ aₙ cos(nπx/l) is a Fourier cosine series on (0, l):

```text
a₀ = (1/l) ∫₀^l (lx − x²) dx = (1/l)(l³/2 − l³/3) = l²/6

aₙ = (2/l) ∫₀^l (lx − x²) cos(nπx/l) dx
```

Integrating by parts twice: ∫₀^l (lx − x²) cos(nπx/l) dx = −l³[1 + (−1)ⁿ]/(n²π²).

So aₙ = −2l²[1 + (−1)ⁿ]/(n²π²), which is 0 for odd n. For even n = 2m: aₙ = −4l²/(4m²π²) = −l²/(m²π²).

**Answer:**

u(x, t) = l²/6 − (l²/π²) Σ_{m=1}^{∞} (1/m²) cos(2mπx/l) e^{−4c²m²π²t/l²}

As t → ∞, u → l²/6, the mean initial temperature (no heat escapes through insulated ends).

(Numerical check: l = 2, x = 0.7: the series at t = 0 gives 0.91000 = lx − x² ✓.)

## Check yourself

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

1. u_x = 0 at ends gives
   A. cosines with p = n pi/l and a constant term
   B. sines with p = n pi/l
   C. only the zero solution
   D. exponentials growth
   Answer: A. Insulated. (Key point: Boundary)

2. Condition (i) excludes
   A. k < 0
   B. k > 0
   C. k = 0
   D. n = 0
   Answer: B. e^(k c^2 t) blows up. (Key point: Bounded)

3. a0 equals
   A. l^2/3
   B. 0
   C. l^2/6, the mean of lx - x^2
   D. l^2/2
   Answer: C. (1/l) integral. (Key point: a0)

4. As t -> infinity u ->
   A. 0
   B. l^2/4
   C. infinity
   D. l^2/6, since no heat escapes
   Answer: D. Only constant remains. (Key point: Limit)

## Related in Applied Mathematics

- [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
- [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×
- [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×
- [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×

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