Separation of variables for a non homogeneous PDE. I found this problem on this page http://www.math.psu.edu/wysocki/M412/Notes412_10.pdf
Consider the problem on $(x,t) \in (0,L)\times (0,\infty)$ given by: $$u_t-ku_{xx} = f(x,t),\quad u(0,t)=u(L,t)=0,\quad u(x,0)=\phi(x).$$ Now we look for a solution via separation of variables, i.e. $u(x,t)=X(x)T(t)$. Then we enter this in our PDE to obtain: $$XT' -kTX'' =f(x,t) .$$ We may rearrange this to form $$\frac{X''}{X}=\frac{T'}{T}-\frac{f}{XT}.\quad \quad(\star)$$ Now on the website it says we get an ODE for $X$ of the form: $$X''+\lambda X = 0,\quad X(0)=X(l)=0.\quad \quad (*)$$ So this is just what you'd get if $f=0$. So they are saying that $\frac{X''}{X}$ is not a function of $x$ (and obviously not of $t$). However, in $(\star)$ the right side may still be a function of $x$ due to the fact that we keep $f$ unspecified right? In particular, $\frac{f}{XT}$ might be a function of $x$ as well as possible a function of $t$. I might be missing something here, but I do not know what. If anyone can help me see how they arrived at $(*)$ I would be very thankful. Thanks in advance!
The sentence "We look for solutions $u$ in the form $u(x, t) = T(t)X(x)$" in the notes is a little misleading. What they are looking for is a solution of the form $u(x,t)=\sum_n T_n(t) X_n(x)$ where the functions $X_n(x)$ are chosen as before (the homogeneous case) while the functions $T_n(t)$ have to be chosen so as to take care of the right-hand side $f(x,t)$.
In particular, they never directly insert $u=XT$ into the PDE. They just re-use the eigenfunctions that were already known from the homogeneous case, and expand not only $u$ and $\phi$ but also $f$ in terms of them.