Why can't I add the energies in this WKB approximation example to get the allowed energies for the given potential? 
Use the WKB approximation to find the allowed energies ($E_n$) of an infinite square well with a "shelf", of height $V_0$ extending half-way across:
$$V(x)=\begin{cases}
V_0 &, \text{ if} \quad 0<x<a/2 \\
0 &, \text{ if} \quad a/2<x<a \\
\infty &, \text{ otherwise}
\end{cases}$$

This is what I did:
For the region $0<x<a/2$:
$$\phi (x)=\frac{1}{\hbar}\int_0^{a/2}p(x)dx=n\pi$$
$$\frac{ap}{2}=n\pi \hbar$$
$p=\sqrt{2m(E-V_0)}$, so solving for $E$ yields:
$$E=\frac{2n^2\pi ^2 \hbar ^2}{ma^2}+V_0$$
For the region $a/2<x<a$:
$$E=\frac{2n^2\pi ^2 \hbar ^2}{ma^2}$$
So then I said that we can't have 2 different allowed energies defining the entire potential, so I summed them up.
$$E_n = \frac{4n^2\pi ^2 \hbar ^2}{ma^2} + V_0$$
$$=8E_n^0 + V_0$$
where $E_n^0 = \frac{n^2\pi ^2 \hbar ^2}{2ma^2}$
...but the given answer is
$$E_n = E_n^0 + \frac{V_0}{2} + \frac{V_0^2}{16E_n^0}$$
Why isn't it correct to simply add the energies like I did?
 A: Hints:


*

*OP apparently thinks of the potential as two half-width infinite wells and add the two energy spectra. OP this way gets higher energy levels than the energy levels for the two individual half-width wells. This method and result are incorrect. In fact, in reality, the extra space lowers the energy levels.

*The important notion is the length 
$$\ell(V) ~=~ \frac{a}{2}\theta(V)+  \frac{a}{2}\theta(V-V_0)\tag{A}$$
of the classically accessible position region. 

*As explained in my Phys.SE answer here, the number $n$ of bound states below energy level $E$ (in the WKB approximation) is
$$ n~\approx~ \frac{\sqrt{2m}}{h}\int_{\min(0,V_0)}^E  \frac{\ell(V)~dV}{\sqrt{E-V}}
~\stackrel{(A)}{=}~\frac{\sqrt{2m}}{h}a \left(\sqrt{E}+  \sqrt{E-V_0}\right).\tag{B}$$


*From eq. (B) we deduce that 
$$ 2\sqrt{E_0}~\stackrel{(B)}{=}~\sqrt{E}+ \sqrt{E-V_0},\tag{C}$$
where $E_0$ denotes the energy levels for the system without the shelf $V_0=0$. (We have here suppressed the index $n$ from the notation.)

*Rearrange eq. (C) to derive the sought-for formula:
$$ E~\stackrel{(C)}{=}~\left(\sqrt{E_0}+\frac{V_0}{4\sqrt{E_0}}\right)^2~=~E_0+ \frac{V_0}{2}+\frac{V_0^2}{16E_0}.\tag{D}$$
