Derivation (scattering by a potential step)
Stationary states $\psi(x,t) = \chi(x) \exp(-i\frac{E}{\hbar}t)$ satisfy the Schrodinger's equation $$ \begin{align*} -\frac{\hbar^2}{2m} \dfd[2]{\chi}{x} + U(x) \chi = E\chi. \end{align*} $$
Before the step ($x<0$), $U(x) = 0$, and we have solutions $$ \begin{align*} \chi(x) = A \exp(ikx) + B\exp(-ikx), \qquad k = \frac{\sqrt{2mE}}{\hbar}. \end{align*} $$
-
$A\exp(ikx)$ moves to the right and corresponds to the incident beam, which has momentum $p=\hbar k$ and probability current $j_i = |A|^2 \hbar k/m$.
-
$B\exp(-ikx)$ moves to the left and corresponds to the reflected beam, which has momentum $p=-\hbar k$ and probability current $j_r = -|B|^2 \hbar k/m$.
We can see that the total probability current density is $$ \begin{align*} j ={}& -\frac{i\hbar}{2m}\left(\chi^\star \dfd{\chi}{x} - \chi \dfd{\chi^\star}{x}\right) \\ ={}& -\frac{i\hbar}{2m}\Big((A^\star e^{-ikx} + B^\star e^{ikx})(ikAe^{ikx} - ikBe^{-ikx}) \\ &- (Ae^{ikx} + Be^{-ikx})(-ikA^\star e^{-ikx} + ikB^\star e^{ikx})\Big) \\ ={}& \frac{\hbar k}{m}(AA^\star - BB^\star) \\ ={}& j_i + j_r. \end{align*} $$
Now consider after the step ($x>0$).
$U_0<E$
Suppose $U(x) = U_0 < E$. Then we have solutions $$ \begin{align*} \chi(x) = C\exp(ik'x) + D\exp(-ik'x), \qquad k' = \frac{\sqrt{2m(E-U_0)}}{\hbar}. \end{align*} $$
-
$C\exp(ik'x)$ moves to the right and corresponds to the transmitted beam, which has momentum $p=\hbar k'$ and probability current $j_t = |C|^2 \hbar k'/m$.
-
$D\exp(-ik'x)$ moves to the left, which is not relevant.
Therefore $$ \begin{align*} \chi(x) = \begin{cases} A\exp(ikx) + B\exp(-ikx), & x<0, \\ C\exp(ik'x), &x>0. \end{cases} \end{align*} $$ Require $\chi$ and $\chi'$ to be continuous at $x=0$: $$ \begin{align*} \begin{cases} A+B = C, \\ ikA - ikB = ik'C. \end{cases} \end{align*} $$ Solving $$ \begin{align*} B = \frac{k-k'}{k+k'}A, \qquad C = \frac{2k}{k+k'}A. \end{align*} $$ Therefore the flux are $$ \begin{align*} j_i ={}& \frac{\hbar k}{m}|A|^2, \\ -j_r ={}& \frac{\hbar k}{m}|B|^2 = \frac{\hbar k}{m} \left(\frac{k-k'}{k+k'}\right)^2 |A|^2, \\ j_t ={}& \frac{\hbar k'}{m}|C|^2 = \frac{\hbar k}{m} \frac{4kk'}{(k+k')^2} |A|^2 \end{align*} $$ and hence the reflection and transmission coefficients are $$ \begin{align*} R ={}& \frac{-j_r}{j_i} = \left(\frac{k-k'}{k+k'}\right)^2 = \left(\frac{\sqrt{E} - \sqrt{E-U_0}}{\sqrt{E} + \sqrt{E-U_0}}\right)^2, \\ T ={}& \frac{j_t}{j_i} = \frac{4kk'}{(k+k')^2} = \frac{4\sqrt{E}\sqrt{E-U_0}}{(\sqrt{E} + \sqrt{E-U_0})^2}. \end{align*} $$
$U_0 > E$
Now suppose $U(x) = U_0 > E$. We have solutions $$ \begin{align*} \chi(x) = C\exp(-\kappa x) + D\exp(\kappa x), \qquad \kappa = \frac{\sqrt{2m(U_0 - E)}}{\hbar}. \end{align*} $$ $D\exp(\kappa x)$ is not physical, so the transmitted wave is $$ \begin{align*} \chi(x) = C\exp(-\kappa x). \end{align*} $$ This has probability current $$ \begin{align*} j_t = -\frac{i\hbar}{2m}\left(\chi^\star \dfd{\chi}{x} - \chi \dfd{\chi^\star}{x}\right) = 0. \end{align*} $$
Requiring $\chi$ and $\chi'$ to be continuous at $x=0$, $$ \begin{align*} \begin{cases} A+B = C, \\ ikA - ikB = -\kappa C. \end{cases} \end{align*} $$ Solving, $$ \begin{align*} B = \frac{k-\kappa i}{k+\kappa i}A, \qquad C = \frac{2k}{k+\kappa i}A. \end{align*} $$
Therefore the flux are $$ \begin{align*} j_i ={}& \frac{\hbar k}{m}|A|^2, \\ -j_r ={}& \frac{\hbar k}{m}|B|^2 = \frac{\hbar k}{m}|A|^2, \\ j_t ={}& 0 \end{align*} $$ and hence $$ \begin{align*} R = \frac{-j_r}{j_i} = 1, \qquad T = \frac{j_t}{j_i} = 0. \end{align*} $$