Derivation of time independent Schrödinger equation In the derivation of time-independent Schrödinger equation, after a certain point in time, LHS (time-dependent) and RHS (space dependent) are taken to be equal to a constant. 
$$
i\hbar \frac{1}{\varphi}\frac{\partial\varphi}{\partial t} = -\frac{\hbar^2}{2m}\frac{1}{\psi}\frac{\partial^2\psi}{\partial x^2} + V(x)
$$
Is this true for any case, say $x = 2t$ where $x$ and $t$ are any variables?
 Should both sides be equal to a constant?
 A: The derivation of the time-independent Schrödinger equation doesn't assume both sides equal a constant. It begins with the assumption that the wavefunction can be written as a product of two functions: one depending on the coordinate and one on time.
Edit: Adding details of argument
I am assuming $\varphi$ and $\psi$ are equations of just time and just position, respectively. That is,
$$
\varphi = \varphi(t) \\
\psi = \psi(x)
$$
We have 
$$
i\hbar\frac{1}{\varphi(t)}\frac{d\varphi}{dt}\left(t\right) = -\frac{\hbar^2}{2m}\frac{1}{\psi(x)}\frac{d^2\psi}{dx}\left(x\right) + V(x) \tag{1}
$$
Note that the LHS is a function of $t$ and the RHS is a function of $x$, and $t$ is independent from $x$. Assume both sides are not constant, and that equality holds  for some $t_o, x_o$.
$$
i\hbar\frac{1}{\varphi(t_o)}\frac{d\varphi}{dt}\left(t_o\right) = -\frac{\hbar^2}{2m}\frac{1}{\psi(x_o)}\frac{d^2\psi}{dx}\left(x_o\right) + V(x_o) = A \tag{2}
$$
Since $t$ and $x$ are independent, if equality holds for $t_o, x$ such that $x \neq x_o$,
$$
i\hbar\frac{1}{\varphi(t_o)}\frac{d\varphi}{dt}\left(t_o\right) = -\frac{\hbar^2}{2m}\frac{1}{\psi(x)}\frac{d^2\psi}{dx}\left(x\right) + V(x) \tag{3}
$$
(2) and (3) imply
$$
-\frac{\hbar^2}{2m}\frac{1}{\psi(x)}\frac{d^2\psi}{dx}\left(x\right) + V(x) = A \hspace{2em} \forall x
$$
By similarly writing the equation for $t, x_o$ one gets the LHS of (1) to equal $A$ as well.
A: This will be true for any case where x and t are independant of each other. Because ,suppose you change the value of $t$. Let t be changed from $t_1$ to $t_2$
But for any $t$ we have $$x=2t$$
Then $$x=2t_1$$  and $$x=2t_2$$
Since $x$ is not varying the right hand side of these equation must be equal. This implies that $$2t_1=2t_2$$
This gives $$t_1=t_2$$
Which means $t$ is not varying hence $t$ must be a constant let $t=k^*$. Similarly, if you write down equations for $x_1$ and $x_2$ you will get $x_1=x_2$.which again gives $x$ is also a constant.
Let $x=k'$
So $2t=2k^*=H$ again a constant. But we have $$2t=x$$ that is $$k'=H$$ and both side is equal to the constant which equals: $$k'=H$$
A: The equality
$$
i\hbar\frac{1}{\varphi}\frac{\partial\varphi}{\partial t}=
-\frac{\hbar^2}{2m}\frac{1}{\psi}\frac{\partial^2\psi}{\partial x^2}+V \tag{1}
$$
must hold true for all times and all positions.  
Thus, pick your favourite value for $t$ and call it $t_0$.  This can be anything: $1,-33/7,\sqrt{\pi}$, whatever.  Evaluate the left hand side of (1) at this $t_0$ so it becomes a number, which we call $\epsilon(t_0)$:
$$
\left(i\hbar\frac{1}{\varphi}\frac{\partial\varphi}{\partial t}\right)_{t=t_0}=\epsilon(t_0)=
-\frac{\hbar^2}{2m}\frac{1}{\psi}\frac{\partial^2\psi}{\partial x^2}+V \tag{2}\, .  
$$
This number $\epsilon$ may depend on $t_0$, but it's the same number for all $x$'s since the right hand side does not depend on $t$.   
Now,  start with (2) and note that (1) is still valid, so we can write 
$$
i\hbar\frac{1}{\varphi}\frac{\partial\varphi}{\partial t}=
\epsilon(t_0)=
-\frac{\hbar^2}{2m}\frac{1}{\psi}\frac{\partial^2\psi}{\partial x^2}+V \tag{3}
$$
Pick now any fixed $x=x_0$ to evaluate rightmost term:
$$
i\hbar\frac{1}{\varphi}\frac{\partial\varphi}{\partial t}=
\epsilon(t_0)=
\left(-\frac{\hbar^2}{2m}\frac{1}{\psi}\frac{\partial^2\psi}{\partial x^2}+V \right)_{x=x_0} \tag{4}
$$
The right hand side of (4) is a number which does not depend on $t_0$ since I can choose $x_0$ completely independently from $t_0$, yet the equality must still hold.  Thus, $\epsilon$ does not depend on $t_0$ or $x_0$ and must be a constant:
$$
i\hbar\frac{1}{\varphi}\frac{\partial\varphi}{\partial t}=
\epsilon=
\left(-\frac{\hbar^2}{2m}\frac{1}{\psi}\frac{\partial^2\psi}{\partial x^2}+V \right)_{x=x_0} \tag{5}
$$
Finally, use (1) again to get
$$
i\hbar\frac{1}{\varphi}\frac{\partial\varphi}{\partial t}=
\epsilon=
-\frac{\hbar^2}{2m}\frac{1}{\psi}\frac{\partial^2\psi}{\partial x^2}+V  \tag{5}
$$
since the left hand side of (1) is always equal to its right hand side.
In other words, it is because (1) is valid not just for $x=2t$ for but any $x$ and any $t$ that one eventually reaches (5).  Moreover, both sides of (1) must be equal to the same constant $\epsilon$, rather than each side equal to its own constant.
