The WKB wavefunction can be derived as follows by considering the following assumptions:

* A smooth potential can be decomposed into piecewise constant pads.

* There is no back reflection in a smooth potential.

The later can be justified by considering sufficiently small pads. In general, a wavefunction has an amplitude and a phase, that is,

$$

\psi(x) = A(x)e^{i\phi(x)}.

$$

First, let us focus on the phase. By moving along a single pad, the phase evolve as $\Delta \phi = \phi(x_{i+1})-\phi(x_{i})$. Over a constant potential, the acquired phase is $\Delta \phi = p(x_i) \Delta x / \hbar$, where $p(x)=\sqrt{2m(E-V(x))}$. Therefore, the total phase can be obtaining by summing the contributions of all the pads, that is,

Note that, for the moment, it is implicitly assumed that $E>V(x)$. In the last equality, the sum is taken to the continuum limit. Second, consider the amplitude. The current is given by $j(x) = |\psi(x)^2| v(x)$ where the velocity is $v(x) = p(x)/m$. Since there is no back reflection, the current is constant. Therefore, $|\psi(x)^2| \sim 1/p(x)$. From here, we find that the amplitude of the wavefunction goes as $A(x) \sim 1/\sqrt{p(x)}$. Then, the WKB wavefunction will be given by,

$$

\psi_{WKB}(x) = \frac{1}{\sqrt{p(x)}} \exp\left( \frac{i}{\hbar} \int_{x_0}^x p(x') d x'\right).

$$

### WKB for evanescent waves

We assumed that $E>V(x)$, but this heuristic derivation holds for $E < V(x)$ as well. In this case, the wavefunction does not accumulate a phase, but accumulates a decaying amplitude. On the formal level, $p(x)=\sqrt{2m(E-V(x))}=i\sqrt{2m(V(x)-E)}=i|p(x)|$. Therefore, the WKB function in a region where $E < V(x)$ is,

$$

\psi_{WKB}(x) = \frac{1}{\sqrt{p(x)}} \exp\left( \frac{\pm 1}{\hbar} \int_{x_0}^x p(x') d x'\right).