Given the equation $$u_t(x,t)=a^2u_{xx}(x,t) + f(x,t),\ f(x,t)=cos(\frac{\pi x}{l})e^{-\omega t},\ x \in (0,l),\ t>0$$ and boundary values $$u(x,0)=cos(\frac{3\pi}{2l}x),\ u(0,t)=e^{-\alpha t},\ u(l,t)=0$$ solve with Fourier method (variable separation).
I know this could be solved with substitution $u=w+v$ and so on, but at the midway of mindless calculations the following has stroke my mind.
Let $u(x,t)=X(x)T(t)$ as supposed to be and plug in boundary values: $u(x,0)=X(x)T(0)=cos(\frac{3\pi}{2l}x)$.
It must be that $T(0)=C_T=const\ne 0,\ X(x)=\frac{1}{C_T}cos(\frac{3\pi}{2l}x)$.
Similarly get $T(t)=\frac{1}{C_X}e^{-\alpha t}$. After plugging in zeros into found functions we can conclude that $C_X=(C_T)^{-1}$.
Now $u(x,t)=cos(\frac{3\pi}{2l}x)e^{-\alpha t}$ but all the above was done independently from heat equation. Let's make sure this is indeed the solution.
First, let $f(x,t)=\hat X(t)\hat T(t)=cos(\frac{\pi x}{l})e^{-\omega t}$, divide the heat equation by $a^2XT$ and then plug in all we have so far (for simplicity let's assume $C_X=C_T=1$): $$\frac{T_t}{a^2T}=\frac{X_{xx}}{X}+\frac{\hat X \hat T}{a^2XT},$$ $$\frac{-\alpha e^{-\alpha t}}{a^2 e^{-\alpha t}}=\frac{-\frac{9\pi^2}{4l^2}cos(\frac{3\pi}{2l}x)e^{-\alpha t}}{cos(\frac{3\pi}{2l}x)}+\frac{cos(\frac{\pi x}{l})e^{-\omega t}}{a^2 cos(\frac{3\pi}{2l}x)e^{-\alpha t}},$$ $$\frac{-\alpha}{a^2}=-\frac{9\pi^2}{4l^2}e^{-\alpha t}+\frac{cos(\frac{\pi x}{l})e^{-\omega t}}{a^2 cos(\frac{3\pi}{2l}x)e^{-\alpha t}}.$$ On the left side we have a constant, so the right side should be the same constant as well. But it appears to me that there is no way to cancel out cosines, because they are biased by $\pi/2$ and no constant may bring them equal, however I can't write a rigorous proof to this.