@TedShifrin Okay, so I just started working $u_t + \frac{1}{2}u_{xx} = x + t,\ u(0,\ t) = u(5,\ t) = u(x,\ 0) = 0$. Applying Duhamel's principle, I'm solving $u_s + \frac{1}{2}u_{xx} = 0,\ u(0,\ s) = u(5,\ s) = 0$, which I get to be $u = \sum_{n = 1}^\infty B_n e^{-\frac{n^2 \pi^2 s}{50}}\sin(\frac{n\pi x}{5})$.
When I apply the IC $u(x,\ s) = x + s$, I get $x + s = \sum_{n = 1}^\infty B_n e^{-\frac{n^2 \pi^2 s}{50}}\sin(\frac{n\pi x}{5})$, but I am not allowed to assume $s = 0$, so I cannot eliminate the exponential factor and solve the Fourier series?