Given an inhomogeneous problem on the domain $\Omega =(0,\infty)\times (0, \pi)$:
$$\begin{cases} \partial_t u-\partial_{xx}^2u=\sin(x)&\text{in }\Omega\\ u(0,x)=\sin(x)+3\sin(3x)& t=0\\ u(t,0)=0=u(t,\pi)&x=0 \text{ or } x=\pi \end{cases}$$
MY ATTEMPT:
(1) Since $\sin$ is odd function and boundary conditions are given at $x=0$ and $x=\pi$, one can try to extend the initial conditions from $(0, \pi)$ to $\mathbb R$ without affecting the initial condition for $x=0$ and $x=\pi$, since it will be the odd extension (not sure if this is actually correct but at least trying to solve this way), which reduces the problem to:
$$\begin{cases} \partial_t u-\partial_{xx}^2u=\sin(x)&\text{in } (0,\infty)\times \mathbb R\\ u(0,x)=\sin(x)+3\sin(3x)& t=0 \end{cases}$$
(2) Adjust the function $u$ to get $0$ on the boundary:
$$\tilde u(t,x) := u(t,x) - (\sin (x) + 3 \sin (3x))$$
Thus we reduce the problem to:
$$\begin{cases} \partial_t \tilde u-\partial_{xx}^2 \tilde u=27\sin(3x)&\text{in }(0,\infty)\times \mathbb R\\ \tilde u(0,x)=0& t=0 \end{cases}$$
This can be solved using the fundamental solution of the heat equation, i.e.
$$\tilde u (t,x)= \int_0 ^t \text{ds} \int _{\mathbb R} \frac{1}{4 \pi (t-s)} \exp\left(\frac{-|x-y|^2}{4(t-s)}\right) \cdot (27\sin(3y))\text{ dy},$$
however, I wanted to ask (perhaps if the calculation is correct), whether the equation is solvable in terms of elementary functions.
Thank you!