Heat flow from a triangular initial temperature (source code)

= Heat flow from a triangular initial temperature
{title2=$T(x,t)=\sum_{n\geq1}8H\sin(n\pi/2)\sin(n\pi x/L)e^{-D(n\pi/L)^2t}/(\pi^2n^2)$}

On $0<x<L$ with zero-temperature endpoints, let the initial <temperature> rise linearly from zero to height $H$ at $L/2$ and then fall linearly to zero. <Integration by parts> on the two halves gives <Fourier sine series> coefficients $8H\sin(n\pi/2)/(\pi^2n^2)$. Under the <heat equation> $T_t=DT_{xx}$ with $D>0$, each coefficient decays by $e^{-D(n\pi/L)^2t}$, giving the displayed solution. Only odd spatial modes occur; absolute coefficient summability proves <uniform convergence> for $t\geq0$ via the <Weierstrass M-test>. This spatial profile also occurs in a <midpoint-plucked fixed-end string>, where the time factors oscillate instead of decaying.