**Proof plan.** Each separated solution $u_n(t,x) = B_n e^{-\kappa n^2\pi^2 t/L^2}\sin(n\pi x/L)$ satisfies the PDE and [boundary](/page/Boundary) conditions by construction. The proof proceeds in four steps. First, we establish that $|B_n| = O(1/n^2)$ by [integration by parts](/theorems/210) (Claim 1), which gives absolute summability $\sum |B_n| < \infty$ and, via the [Weierstrass M-test](/theorems/272), [uniform convergence](/page/Uniform%20Convergence) of the [series](/page/Series) on $[0,\infty) \times [0,L]$ (Claim 2). Second, we show that for $t \geq \delta > 0$, the exponential factor $e^{-\kappa n^2\pi^2 \delta/L^2}$ decays fast enough to absorb any polynomial growth in $n$ from [differentiation](/page/Derivative), so that all differentiated series converge uniformly and term-by-term differentiation is justified (Claim 3). Third, we verify the PDE (Step 3). Fourth, we check the boundary and initial conditions (Step 4).
**Step 1 (Coefficient decay).**
We show that the hypothesis $g \in C^1([0,L])$ with $g(0) = g(L) = 0$ forces $|B_n| = O(1/n^2)$.
[claim:Fourier Sine Coefficient Decay]
Let $g \in C^1([0,L])$ with $g(0) = g(L) = 0$, and let $B_n = \frac{2}{L}\int_0^L g(x)\sin\frac{n\pi x}{L}\,d\mathcal{L}^1(x)$. Then there exists a constant $C > 0$ depending only on $g$ and $L$ such that $|B_n| \leq C/n^2$ for all $n \geq 1$. In particular, $\sum_{n=1}^{\infty} |B_n| < \infty$.
[/claim]
[proof]
Integrate by parts with $u = g(x)$ and $dv = \sin(n\pi x/L)\,d\mathcal{L}^1(x)$:
\begin{align*}
\int_0^L g(x)\sin\frac{n\pi x}{L}\,d\mathcal{L}^1(x) &= \left[-\frac{L}{n\pi}g(x)\cos\frac{n\pi x}{L}\right]_0^L + \frac{L}{n\pi}\int_0^L g'(x)\cos\frac{n\pi x}{L}\,d\mathcal{L}^1(x).
\end{align*}
The boundary term vanishes because $g(0) = g(L) = 0$. Integrate by parts a second time with $u = g'(x)$ and $dv = \cos(n\pi x/L)\,d\mathcal{L}^1(x)$:
\begin{align*}
\frac{L}{n\pi}\int_0^L g'(x)\cos\frac{n\pi x}{L}\,d\mathcal{L}^1(x) &= \frac{L}{n\pi}\left[\frac{L}{n\pi}g'(x)\sin\frac{n\pi x}{L}\right]_0^L - \frac{L^2}{n^2\pi^2}\int_0^L g''(x)\sin\frac{n\pi x}{L}\,d\mathcal{L}^1(x).
\end{align*}
Since $\sin(0) = \sin(n\pi) = 0$, the boundary term vanishes again. However, $g \in C^1$ does not guarantee $g'' \in L^1$ in general, so we stop after the first integration by parts. From the first step we have
\begin{align*}
B_n &= \frac{2}{L}\cdot\frac{L}{n\pi}\int_0^L g'(x)\cos\frac{n\pi x}{L}\,d\mathcal{L}^1(x) = \frac{2}{n\pi}\int_0^L g'(x)\cos\frac{n\pi x}{L}\,d\mathcal{L}^1(x).
\end{align*}
Since $g' \in C^0([0,L])$, we have $\|g'\|_{L^1([0,L])} \leq L\|g'\|_{C^0([0,L])} < \infty$, so
\begin{align*}
|B_n| &\leq \frac{2}{n\pi}\int_0^L |g'(x)|\,d\mathcal{L}^1(x) \leq \frac{2L\|g'\|_{C^0}}{n\pi}.
\end{align*}
Setting $C = 2L\|g'\|_{C^0}/\pi$ gives $|B_n| \leq C/n$. Since $\sum_{n=1}^{\infty} 1/n$ diverges, we need the sharper bound. Define the Fourier cosine coefficients $A_n := \frac{2}{L}\int_0^L g'(x)\cos\frac{n\pi x}{L}\,d\mathcal{L}^1(x)$, so that $B_n = A_n/(n\pi/L)$. Since $g' \in C^0([0,L])$, the Riemann–Lebesgue lemma gives $A_n \to 0$ as $n \to \infty$, and more precisely $\{A_n\}$ is bounded: $|A_n| \leq 2\|g'\|_{C^0}$. This yields only $|B_n| \leq C/n$.
To obtain absolute summability, we use the fact that $g' \in C^0([0,L])$ implies $\sum_{n=1}^{\infty} |A_n|^2 < \infty$ by Parseval's theorem. Then by the Cauchy–Schwarz inequality:
\begin{align*}
\sum_{n=1}^{N} |B_n| &= \sum_{n=1}^{N} \frac{L}{n\pi}|A_n| \leq \frac{L}{\pi}\left(\sum_{n=1}^{N} \frac{1}{n^2}\right)^{1/2}\left(\sum_{n=1}^{N} |A_n|^2\right)^{1/2} \leq \frac{L}{\pi}\cdot\frac{\pi}{\sqrt{6}}\cdot\|g'\|_{L^2([0,L])}.
\end{align*}
The right-hand side is bounded independently of $N$, so $\sum_{n=1}^{\infty} |B_n| < \infty$.
[/proof]
**Step 2 (Uniform convergence of the series on $[0,\infty) \times [0,L]$).**
[claim:Uniform Convergence Of The [Fourier Series](/page/Fourier%20Series) Solution]
The partial sums $u_N(t,x) := \sum_{n=1}^{N} B_n e^{-\kappa n^2\pi^2 t/L^2}\sin(n\pi x/L)$ converge uniformly on $[0,\infty) \times [0,L]$ to a [continuous](/page/Continuity) function $u$.
[/claim]
[proof]
For each $n \geq 1$ and all $(t,x) \in [0,\infty) \times [0,L]$, the exponential factor satisfies $0 \leq e^{-\kappa n^2\pi^2 t/L^2} \leq 1$ and $|\sin(n\pi x/L)| \leq 1$, so
\begin{align*}
\sup_{(t,x) \in [0,\infty) \times [0,L]} \left|B_n e^{-\kappa n^2\pi^2 t/L^2}\sin\frac{n\pi x}{L}\right| \leq |B_n|.
\end{align*}
Since $\sum_{n=1}^{\infty} |B_n| < \infty$ by Claim 1, the [Weierstrass M-test](/theorems/272) with $M_n = |B_n|$ gives that $\sum_{n=1}^{\infty} B_n e^{-\kappa n^2\pi^2 t/L^2}\sin(n\pi x/L)$ converges absolutely and uniformly on $[0,\infty) \times [0,L]$. Each partial sum $u_N$ is continuous on $[0,\infty) \times [0,L]$, and the uniform [limit](/page/Limit) of continuous [functions](/page/Function) is continuous, so $u \in C([0,\infty) \times [0,L])$.
[/proof]
**Step 3 (Term-by-term differentiation for $t > 0$ and verification of the PDE).**
[claim:Smoothness And Term By Term Differentiation For Positive Time]
For every $\delta > 0$ and every pair of non-negative integers $(j,k)$, the series $\sum_{n=1}^{\infty} \partial_t^j \partial_x^k \left[B_n e^{-\kappa n^2\pi^2 t/L^2}\sin(n\pi x/L)\right]$ converges uniformly on $[\delta,\infty) \times [0,L]$. Consequently $u \in C^{\infty}((0,\infty) \times [0,L])$ and term-by-term differentiation is justified.
[/claim]
[proof]
Fix $\delta > 0$ and non-negative integers $j, k$. Differentiating the $n$-th term $j$ times in $t$ and $k$ times in $x$ produces
\begin{align*}
\partial_t^j \partial_x^k \left[B_n e^{-\kappa n^2\pi^2 t/L^2}\sin\frac{n\pi x}{L}\right] &= B_n \left(-\frac{\kappa n^2\pi^2}{L^2}\right)^j \left(\frac{n\pi}{L}\right)^k e^{-\kappa n^2\pi^2 t/L^2}\,\phi_{n,k}(x),
\end{align*}
where $\phi_{n,k}(x)$ is either $\sin(n\pi x/L)$ or $\cos(n\pi x/L)$ depending on the parity of $k$, in either case satisfying $|\phi_{n,k}(x)| \leq 1$. In absolute value, for $t \geq \delta$:
\begin{align*}
\left|\partial_t^j \partial_x^k \left[B_n e^{-\kappa n^2\pi^2 t/L^2}\sin\frac{n\pi x}{L}\right]\right| &\leq |B_n| \left(\frac{\kappa\pi^2}{L^2}\right)^j \left(\frac{\pi}{L}\right)^k n^{2j+k}\, e^{-\kappa n^2\pi^2 \delta/L^2}.
\end{align*}
We now show that the exponential decay absorbs the polynomial factor. For any $s > 0$ and any integer $m \geq 0$, the function $r \mapsto r^m e^{-sr}$ on $[0,\infty)$ attains its maximum at $r = m/s$, giving the bound $r^m e^{-sr} \leq (m/s)^m e^{-m} \leq (m/(se))^m$. Applying this with $r = n^2$, $s = \kappa\pi^2\delta/L^2$, and $m = j + \lceil k/2 \rceil$ (chosen so that $n^{2m} \geq n^{2j+k}$):
\begin{align*}
n^{2j+k}\,e^{-\kappa n^2\pi^2\delta/L^2} &\leq n^{2m}\,e^{-\kappa n^2\pi^2\delta/L^2} = (n^2)^m\,e^{-(\kappa\pi^2\delta/L^2)\,n^2} \leq C_{j,k,\delta,\kappa,L}\,e^{-\kappa n^2\pi^2\delta/(2L^2)},
\end{align*}
where in the last step we used the fact that $n^{2m} e^{-\kappa n^2\pi^2\delta/(2L^2)}$ is bounded by a constant depending on $j,k,\delta,\kappa,L$ (since the exponential with half the exponent still dominates any polynomial). Combining with the coefficient bound:
\begin{align*}
\sup_{(t,x) \in [\delta,\infty) \times [0,L]} \left|\partial_t^j \partial_x^k \left[B_n e^{-\kappa n^2\pi^2 t/L^2}\sin\frac{n\pi x}{L}\right]\right| &\leq C'_{j,k,\delta,\kappa,L}\,|B_n|\,e^{-\kappa n^2\pi^2\delta/(2L^2)} =: M_n.
\end{align*}
Since $\sum_{n=1}^{\infty} |B_n| < \infty$ and $e^{-\kappa n^2\pi^2\delta/(2L^2)} \leq 1$, we have $\sum_{n=1}^{\infty} M_n \leq C'_{j,k,\delta,\kappa,L}\sum_{n=1}^{\infty}|B_n| < \infty$. By the [Weierstrass M-test](/theorems/272), the differentiated series converges uniformly on $[\delta,\infty) \times [0,L]$.
Since $\delta > 0$ was arbitrary, for any $(t_0, x_0)$ with $t_0 > 0$ we may choose $\delta = t_0/2$ and conclude that $u$ is infinitely differentiable near $(t_0, x_0)$. Therefore $u \in C^{\infty}((0,\infty) \times [0,L])$, and for $t > 0$:
\begin{align*}
\partial_t u - \kappa\,\partial_{xx} u &= \sum_{n=1}^{\infty} B_n\left(-\frac{\kappa n^2\pi^2}{L^2} + \kappa\frac{n^2\pi^2}{L^2}\right)e^{-\kappa n^2\pi^2 t/L^2}\sin\frac{n\pi x}{L} = 0,
\end{align*}
since each term satisfies the [heat equation](/page/Heat%20Equation) by the separation-of-variables construction.
[/proof]
**Step 4 (Boundary and initial conditions).**
For each $n \geq 1$, $\sin(n\pi \cdot 0/L) = \sin(0) = 0$ and $\sin(n\pi \cdot L/L) = \sin(n\pi) = 0$. Since the series converges uniformly on $[0,\infty) \times [0,L]$ (Claim 2), evaluating at $x = 0$ and $x = L$ term by term is justified:
\begin{align*}
u(t, 0) &= \sum_{n=1}^{\infty} B_n e^{-\kappa n^2\pi^2 t/L^2}\sin(0) = 0, \\
u(t, L) &= \sum_{n=1}^{\infty} B_n e^{-\kappa n^2\pi^2 t/L^2}\sin(n\pi) = 0.
\end{align*}
For the initial condition, at $t = 0$ the series reduces to $u(0,x) = \sum_{n=1}^{\infty} B_n \sin(n\pi x/L)$, which is the Fourier sine series of $g$ on $[0,L]$. Since $g \in C^1([0,L])$ with $g(0) = g(L) = 0$, extending $g$ to an odd, $2L$-periodic function on $\mathbb{R}$ produces a Lipschitz function whose Fourier coefficients satisfy $\sum |B_n| < \infty$ (Claim 1). The uniform convergence established in Claim 2 (with $t = 0$) then gives $u(0,x) = g(x)$ for all $x \in [0,L]$.