Trinh @ Bath

This is an old revision of the document!


Lecture 24: Computation of the heat equation III

Example 15.4: Solution of the inhomogeneous Dirichlet problem

This lecture starts off with Example 15.4 from the notes, where we look to solve $$ \begin{gathered} u_t = u_{xx} \\ u(0, t) = 2, \qquad u(\pi, t) = 1 \\ u(x, 0) = 0. \end{gathered} $$

We show that the solution is given by $$ u(x, t) = U(x) + \sum_{n=1}^\infty B_n \sin(nx) \mathrm{e}^{-n^2 t} $$ where we have found the steady-state solution $$ U(x) = 2 - \frac{x}{\pi}, $$ as well as the coefficients $$ B_n = \frac{2}{n\pi}[(-1)^n - 2]. $$