Position probability in finite wells

The normalized states of a particle in a well are

$\varphi_{even}(x)=\sqrt{a+(1/q)}*\left\{\begin{matrix}

e^{q a}\cos(k a)e^{q x} & \text{for } x < -a \\

\cos(k x) & \text{for }-a\leq x \leq a \\

e^{q a}\cos(k a)e^{-q x} & \text{for } x > a

\end{matrix}\right.$

$\varphi_{odd}(x)=\sqrt{a+(1/q)}*\left\{\begin{matrix}

-e^{q a}\cos(k a)e^{q x} & \text{for } x < -a \\

\sin(k x) & \text{for }-a\leq x \leq a \\

e^{q a}\cos(k a)e^{-q x} & \text{for } x > a

\end{matrix}\right.$

Find the probability that a particle in the ground state of a finite well is measured to have a position outside of the well. Put the expression in terms of:

(1) $k$, $q$ and $a$ and

(2) $z$ and $z_0$.

In the ground state the wave function is even (see the figure at the bottom), that is symmetrical with

respect to x=0.

$\varphi_{even}(x)=\sqrt{a+(1/q)}*\left\{\begin{matrix}

e^{q a}\cos(k a)e^{q x} & \text{for } x < -a \\

\cos(k x) & \text{for }-a\leq x \leq a \\

e^{q a}\cos(k a)e^{-q x} & \text{for } x > a

\end{matrix}\right.$

The probability to find the particle outside the well (in the walls) is

$P=\int_{-\infty}^{-a} |\varphi|^2 d x+\int_a^{+\infty}|\varphi|^2 d x=$

$=[a+(1/q)]*e^{2qa} [\cos(k a)]^2 *[\int_{-\infty}^{-a} e^{2qx}*d x+ \int_a^{+∞} e^{-2qx} d x]$

$P=[a+(1/q)] e^{2qa} [cos⁡(k a) ]^2 *[(1/2q)(e^{-2qa}-1)-(1/2q)(1-e^{-2qa})]$

$P=\frac{1}{4q} [a+\frac{1}{q}]* [cos⁡(k a)]^2*e^{2qa} [e^{-2qa}-1]=\frac{1}{4q}[a+\frac{1}{q}]*[cos⁡(k a) ]^2*(1-e^{2qa})$

If we make the notations

$z_0=(\sqrt{2mV_0 }/\hbar)*a$  and $z=(\sqrt{2mE_1}/\hbar)*a$

We have

$k a=(\sqrt{2mE_1}/\hbar)*a=z$   inside the well,  and $q a=\sqrt{z_0^2-z^2}$  outside the well

And the probability is

$P=\frac {a} {4\sqrt{z_0^2-z^2 }} (a+\frac{a}{\sqrt{z_0^2-z^2}}) cos^2⁡ z*[1-exp⁡[2\sqrt{(z_0^2-z^2 )} ]]$