Source: Cambridge Electromagnetism, Chapter 8 exercises, Question 3; accompanies David Tong’s Electromagnetism .
Two plane, semi-infinite dielectric slabs with refractive index $n$ are separated by a vacuum region of width $d$. A plane wave of wavenumber $k$ is incident on the vacuum region from one of the slabs at an angle of incidence $\theta_I$ to the normal, with $n \sin \theta_I > 1$. The electric field of the incident radiation is normal to the plane of incidence (normal polarisation).
Show that some of the radiation is transmitted across the gap, and that the ratio of the amplitudes of the electric fields of the transmitted and incident waves satisfies:
\[\left| \frac{E_T}{E_I} \right|^2 = \frac{1}{1 + \alpha^2 \sinh^2 \kappa d},\tag{1.1}\]
where
\[\alpha = \frac{k(1 - 1/n^2)}{2\kappa \cos \theta_I}
\quad \text{and} \quad
\kappa = k \sqrt{\sin^2 \theta_I - \frac{1}{n^2}}.\tag{1.2}\]
(This process is known as frustrated total internal reflection and is analogous to quantum tunnelling.)
[Hint: you will need to consider both growing and decaying evanescent waves in the gap since it is of finite width. ]
Let's take the first interface to be at $x=0$, and the incident electric field to be in the $y$-direction.
The electric field of the whole setup can be written as
\[\mathbf{E}(t, \mathbf{x}) = \hat{\mathbf{y}}\begin{cases}
E_{I0}e^{i\mathbf{k}_I\cdot \mathbf{x}-i\omega t } + E_{R0}e^{i\mathbf{k}_R\cdot \mathbf{x}-i\omega t },&x<0,\\
E_{+0}e^{i\mathbf{k}_+\cdot \mathbf{x}-i\omega t } + E_{-0}e^{i\mathbf{k}_-\cdot \mathbf{x}-i\omega t }, &0<x<d,\\
E_{T0}e^{i\mathbf{k}_T\cdot \mathbf{x}-i\omega t },& x>d,
\end{cases}\tag{1.3}\]
where we take
\[\mathbf{k}_I = (k\cos\theta_I,0,-k\sin\theta_I), \quad \mathbf{k}_R=(-k_R\cos\theta_R, 0, -k_R\sin\theta_R),\tag{1.4}\]
\[\mathbf{k}_+ = (k_+\cos\theta_+,0,-k_+\sin\theta_+), \quad \mathbf{k}_-=(-k_-\cos\theta_-, 0, -k_-\sin\theta_-),\tag{1.5}\]
and
\[\mathbf{k}_T = (k_T\cos\theta_T,0,-k_T\sin\theta_T).\tag{1.6}\]
At the boundaries, we require
\[\hat{\mathbf{{x}}}\cdot(\varepsilon_1\mathbf{E}^+ - \varepsilon_0\mathbf{E}^-)=0,
\tag{1.7}\]
\[\hat{\mathbf{{x}}}\times(\mathbf{E}^+ - \mathbf{E}^-)=0,
\tag{1.8}\]
\[\hat{\mathbf{{x}}}\times(\varepsilon_1\mathbf{B}^+ - \varepsilon_0\mathbf{B}^-)=0,
\tag{1.9}\]
\[\hat{\mathbf{{x}}}\cdot(\mathbf{B}^+ - \mathbf{B}^-)=0.
\tag{1.10}\]
Hence, the phase factor at the boundary must vanishes for all $t$, $z$, and $y$ for our case. Therefore, all the angular frequencies are set to be the same. The boundary condition also requires
\[\mathbf{k}_I\cdot \hat{\mathbf{z}} = \mathbf{k}_R\cdot \hat{\mathbf{z}} = \mathbf{k}_+\cdot \hat{\mathbf{z}}= \mathbf{k}_-\cdot \hat{\mathbf{z}}
\tag{1.11}\]
at $x=0$. (1.11) tells us that
\[k\sin\theta_I = k_R\sin\theta_R = k_+\sin\theta_+ = k_-\sin\theta_-.\tag{1.12}\]
In the dielectric, we have
\[\frac{ck}{n} = \frac{ck_R}{n} = \omega,\tag{1.13}\]
which implies $k=k_R$ and $\theta_I = \theta_R$.
Therefore,
\[\begin{aligned}\frac{n\omega}{c}\sin\theta_I = k_\pm \sin\theta_\pm \implies \mathbf{k}_\pm \cdot \hat{\mathbf{x}} &= \pm\sqrt{|\mathbf{k}_\pm|^2 -(\mathbf{k}_\pm \cdot \hat{\mathbf{z}})^2 } \notag\\&=\pm k\sqrt{1/n^2-\sin^2\theta_I} = \pm i\kappa,\end{aligned}\tag{1.14}\]
which is the evanescent wave in the vacuum due to the total reflection ($n\sin\theta_I >1$).
The electric field can be rewritten as
\[\mathbf{E}(\mathbf{x}) = \hat{\mathbf{y}}\begin{cases}
E_{I0}e^{i\mathbf{k}_I\cdot \mathbf{x} } + E_{R0}e^{i\mathbf{k}_R\cdot {\mathbf{x}} },&x<0,\\
E_{+0}e^{i\mathbf{k}_I\cdot \hat{\mathbf{z}} z}e^{-\kappa x} + E_{-0}e^{i\mathbf{k}_I\cdot \hat{\mathbf{z}}z }e^{+\kappa x}, &0<x<d,\\
E_{T0}e^{i\mathbf{k}_T\cdot \mathbf{x}},& x>d,
\end{cases}\tag{1.15}\]
where we have hidden the time-dependence for convenience.
By the same boundary condition at $x=d$, we find
\[- k_T\sin\theta_T \,z= -k_I\sin\theta_I \,z \implies \theta_T = \theta_I \quad \text{and} \quad k_I = k_T.\tag{1.16}\]
The corresponding magnetic field is given by
\[\mathbf{B}(\mathbf{x}) = \begin{cases}
\frac{1}{\omega}\Big[
(-k_{Iz}\hat{\mathbf x} + k_{Ix}\hat{\mathbf z}) E_{I0} e^{i\mathbf{k}_I\cdot \mathbf{x}}
+
(-k_{Rz}\hat{\mathbf x} + k_{Rx}\hat{\mathbf z}) E_{R0} e^{i\mathbf{k}_R\cdot \mathbf{x}}
\Big], & x<0, \\[6pt]
\frac{1}{\omega}\Big[
(-k_{Iz}\hat{\mathbf x} + i\kappa \hat{\mathbf z}) E_{+0} e^{i\mathbf{k}_I\cdot \hat{\mathbf z} z} e^{-\kappa x}
+
(-k_{Iz}\hat{\mathbf x} - i\kappa \hat{\mathbf z}) E_{-0} e^{i\mathbf{k}_I\cdot \hat{\mathbf z} z} e^{+\kappa x}
\Big], & 0<x<d, \\[6pt]
\frac{1}{\omega}
(-k_{Tz}\hat{\mathbf x} + k_{Tx}\hat{\mathbf z}) E_{T0} e^{i\mathbf{k}_T\cdot \mathbf{x}}, & x>d.
\end{cases}\tag{1.17}\]
Now, we are left to match the amplitude at the boundaries. By (1.7), we have
\[E_{I0} + E_{R0} = E_{+0} + E_{-0},\tag{1.18}\]
and
\[E_{T0} =E_{+0}e^{-\kappa d} + E_{-0}e^{+\kappa d}.\tag{1.19}\]
Also, by (1.10), we have
\[i\kappa(E_{+0}-E_{-0}) = k\cos\theta_I(E_{I0}-E_{R0}),\tag{1.20}\]
and
\[k\cos\theta_IE_{T0} = i\kappa(E_{+0}e^{-\kappa d}-E_{-0}e^{+\kappa d}).\tag{1.21}\]
With some tedious algebra, one would find
\[\left| \frac{E_T}{E_I} \right|^2 = \frac{1}{1 + \alpha^2 \sinh^2 \kappa d}.\tag{1.22}\]