Rationale behind Separation of Variables for PDEs When studying the solution to the Heat Equation with one spatial dimension there is an assumption that I have always struggled to understand; once we separate variables we have:
$$\frac{T'(t)}{T(t)} = \frac{X''(x)}{X(x)}$$
From here, and taken from the wikipedia article on the Heat Equation, we have:
Since the right hand side depends only on x and the left hand side only on t, both sides are equal to some constant value 
Why is that true?
 A: Say it is equal to some function $U(t,x)$:
$$
\frac{T'(t)}{T(t)} = \frac{X'(x)}{X(x)} = U(t,x).
$$
then take the derivative by $t$:
$$
\frac{d}{dt}U(t,x) = \frac{d}{dt}\frac{X'(x)}{X(x)}=0.
$$
Since $X$ doesn't depend on $t$, the derivative is $0$. By integrating $dU(t,x)/dt=0$, we conclude that $U(t,x) = f(x) + C$. Then we do the same for $x$:
$$
\frac{d}{dx}U(t,x) = f'(x) = \frac{d}{dx}\frac{T'(t)}{T(t)}=0.
$$
Since $T$ doesn't depend on $x$, the derivative is $0$ again. From $f'(x)=0$ we conclude that $f(x)=C$ 
A: If you hold $x$ constant, then $X''(x)/X(x)$ is a number $C$, and $C$ must equal $T'(t)/T(t)$ for all $t$. So there exists a constant $C$ such that
$$
       C=\frac{T'(t)}{T(t)}.
$$
Then, the following must also hold for all $x$:
$$
                \frac{X''(x)}{X(x)}=C.
$$
So there must exist a constant $C$ such that $X''(x)=CX(x)$ and $T'(t)=CT(t)$ for all $t$ and $x$.
Now it can happen that $T(t)=0$ for some $t$ or $X(x)=0$ for some $x$. So you have some special cases to consider, too.
