= Solution
The initial <function> is <odd>, so all $a_n$, including $a_0$, vanish. Set $k_n=n\pi/L$. For $k_n\ne1$, product-to-sum and <integration by parts> give
$$
\int_0^L\sin x\sin(k_nx)\,dx=\frac{(-1)^nk_n\sin L}{1-k_n^2},\qquad\int_0^Lx\sin(k_nx)\,dx=-\frac{L(-1)^n}{k_n}.
$$
Consequently the coefficients of the <periodic sine with an endpoint-correcting linear term> are
$$
\boxed{b_n=\frac{2(-1)^n\sin L}{n\pi[1-(n\pi/L)^2]}.}
$$
Insert them into the sine terms of the preceding solution. If $L=m\pi$ for a positive <integer> $m$, the original initial profile is simply $\sin x$, with $k_m=1$. The apparent $0/0$ in the displayed coefficient has removable <limit> $b_m=1$, while $b_n=0$ for $n\ne m$. In that case
$$
\boxed{u(x,t)=e^{-\kappa t}\sin x.}
$$
Back to article page