Energies and numbers of bound states in finite potential well Hello I understand how to approach finite potential well (I learned a lot in my other topic here). However i am disturbed by equation which describes number of states $N$ for a finite potential well (
$d$ is a width of a well and $W_p$ is potential 
): 
$$
N \approx \dfrac{\sqrt{2m W_p}d}{\hbar \pi}
$$
I am sure it has something to do with one of the constants $\mathcal L$ or $\mathcal K$ defined this way:
\begin{align}
\mathcal L &\equiv \sqrt{\tfrac{2mW}{\hbar^2}} &  \mathcal{K}&\equiv \sqrt{ \tfrac{ 2m(W_p-W) }{ \hbar^2 }}
\end{align}
and the transcendental equations for ODD and EVEN solutions:
\begin{align}
&\frac{\mathcal K}{\mathcal L} = \tan \left(\mathcal L \tfrac{d}{2}\right) &&-\frac{\mathcal L}{\mathcal K} = \tan \left(\mathcal L \tfrac{d}{2}\right)\\
&\scriptsize{\text{transc. eq. - EVEN}} &&\scriptsize{\text{transc. eq. - ODD}}
\end{align}
QUESTION: Could anyone tell me where does 1st equation come from?
 A: Inside the well, the wave functions of a bound state behave approximately like $\sin(kx)$ i.e. standing waves where $k=\pi M/d$ for an integer $M$. This contributes the kinetic energy $\hbar^2 k^2/ 2m$. The highest-lying bound states are those for which the energy left to the particle is $0-$, a small negative number, outside the well. 
So the kinetic energy inside the well must be approximately equal to the height of the well $W_p$:
$$ W_p = \frac{\hbar^2 k^2}{2m} $$
This implies 
$$ k = \frac{\sqrt{2mW_p}}{\hbar}$$
for the maximum allowed $k$ but I have mentioned that the spacing between the eigenstates in the $k$ space is $\pi/d$. So one has to divide the maximum $k$ above by $\pi/d$ to get the formula for $N$ you asked about.
A: In general, The number of bound states can be derived from Bohr-Sommerfeld quantization formula: 
$$\oint \sqrt(W-W_p(x))~ dx= \left(n+\gamma \right) \pi \approx N \pi$$, where N is number of bound states up to Energy $W$, and $\gamma$ is called Maslov Index. For Harmonic oscillator, It is $1/2$.
For a Finite square well of width $d$, and depth $W_p$ , The number of Bound states $\color{blue}{\textrm{up to energy $W$ }}$ is given as, 
$$N(W) \approx \pi^{-1} \left[\int _{-d/2}^{d/2} \sqrt(W+W_p) dx + \int _{d/2}^{-d/2} \sqrt(W+W_p) (-dx) \right ]\approx 2 \pi^{-1} \int _{-d/2}^{d/2} \sqrt(W+W_p) dx \color{\red}{ \approx \pi^{-1}\sqrt{W+W_p} ~d.} $$
$\color{blue}{\textrm{ The "TOTAL" number}}$ of Bound states can be found by setting $W$ equal to $0$ (because, the highest-lying  Bound state of a potential well will be close to $0$, or very small negative number).
So "Total" number is given as:$\color{\red}{  N \approx \pi^{-1}\sqrt{W_p} ~d.}$
$\color{green}{\textrm{Numerics}}$: For the $W_p=5.$ and $d=1.$ Plot of transcendental equation (Last two equations of OP) for even and odd solutions as a function of $W$  are as, 

$\color{green}{\textrm{Which gives "ONE" bound states. }}$ 
and, $N \approx 0.712$
Note: In general (after so- many calculations) we found a rule: the Total number of bound states for a square potential well are given as $[N]+1$, where [.] denotes the integer part} Reference.
$\color{green}{\textrm{Hence, $N$ gives "One" bound states.}}$ 
I have the used: $\hbar=1, 2m=1$
