Analytic solution of the heat equation with a source term

boundary value problemheat equationpartial differential equations

I have the heat equation with Dirichlet boundary conditions
$$u_t(t,x)=u_{xx}(t,x)+\sin(x)$$
$$u(t,0)=u(t,2\pi)=0$$
$$u(0,x)=u_0(x)$$
Now, without the source term I could write the solution as
$$u(t,x) = \sum_{n=1}^\infty B_n \sin(n\pi x)e^{-n^2\pi^2t}$$
where
$$B_n=2\int_0^{2\pi}u_0(x)\sin(n\pi x)dx$$
but I'm not sure what it looks like with a source term. I had a problem set question which assumed knowledge of the solution to show it converges to it's stationary form, so I'm guessing it can be derived using the homogenous equation.

Best Answer

Hint:

the $\sin x$ source term is time independent: what happens if you add $t \sin x$ to your solution?
does it respect the PDE ? and the boundary conditions ?

Related Question