# Quantum Eigenstates of Curved and Varying Cross-Sectional Waveguides
## Appendix A Validation
### Logarithmic Spiral  
We now consider a logarithmic spiral. In polar coordinates \((r,\theta)\) it is given by \(r=ce^{b\theta}\). Letting \(b=\cot\mu\), we have  
\[\frac{\mathrm{d}r}{\mathrm{d}\theta}=br\,,\quad\frac{\mathrm{d}s}{\mathrm{d} \theta}=\frac{r}{\sin\mu}\,,\quad s=\frac{r-r_{0}}{\cos\mu}\,,\quad\kappa= \frac{\sin\mu}{r}\,.\]  
Furthermore, \(\mathbf{t}=\mathbf{e}(\theta+\mu)\) and \(\mathbf{n}=\mathbf{e}\left(\theta+\mu+\frac{\pi}{2}\right)\), where \(\mathbf{e}(\theta)=(\cos\theta,\sin\theta)\). We have  
\[s=\frac{r-c}{\cos\mu}\iff r=c+s\cos\mu\iff\theta=\frac{1}{b}\log\frac{c+s \cos\mu}{c}\,.\]  
If we let \(c=R\sin\mu\), then  
\[r =R\sin\mu+s\cos\mu\,,\] \[\theta =\frac{1}{b}\log\frac{r}{R\sin\mu}=\frac{\sin\mu}{\cos\mu}\log \frac{R+s\cot\mu}{R}\,,\] \[\kappa =\frac{\sin\mu}{r}=\frac{1}{R+s\cot\mu}\,.\]  
We have, in particular, the arc length parametrisation  
\[r(\theta)\mathbf{e}(\theta)=(R\sin\mu+s\cos\mu)\mathbf{e}\left(\frac{\sin\mu} {\cos\mu}\log\frac{R+s\cot\mu}{R}\right)\,.\]  
We consider the case \(R=1\) and \(\mu=\pi/4\) and an exponential varying thickness, \(h=\frac{\alpha\mu^{\alpha\mu}}{\epsilon^{2}-1}\). In Figure 11, we plot the difference between the 1D and 2D calculations as a function of \(\epsilon\) for different values of \(\alpha\). When \(\epsilon\) is very small, the difference is seen to increase instead of decrease. This is due to an increase in the discretisation error from solving the exact 2D equation. For the 1D-equation, we used B-splines of degree 3 and 64 knot intervals. That leads to a system matrix of size \(65\times 65\). For the 2D calculations we used standard finite element analysis on a mesh of size \(256\times 256\) and with basis functions of degree 3. That leads to a system matrix of size more than \(10^{6}\times 10^{6}\) (in 3D we would have a size greater than \(2\times 10^{9}\times 2\times 10^{9}\). The reason we need higher resolution for the 2D calculation is that we are interested in the differences \(\lambda_{n}-\lambda_{0}\) and using the 1D model we calculate this quantity directly, while in the 2D case we calculate \(\lambda_{n}\) and as the difference is small we need a very high precision. Even if we had used a mesh of size 65 in all directions we would have a system matrix of size more than \(8\times 10^{4}\times 8\times 10^{4}\) in 2D and \(4\times 10^{7}\times 4\times 10^{7}\) in 3D. Numerical analyses of the logarithmic spiral in cases with a linearly or a trigonometrically varying thickness were also carried out. Compared to the exponentially varying thickness case, the error analysis gives approximately the same good result for the trigonometric case, while even smaller errors are found for the linearly varying thickness case. Similar conclusions are found for the cases with straight and circular-arc waveguides. We now consider the case \(R=1\), \(\mu=0.45\pi\), with \(\theta\in[0,3\pi]\) for a linearly varying thickness \(h=1+\alpha\left(s-\beta\right)\), with \(\alpha=\pm 0.8/L\) and \(\beta=L/2\), where \(L=R\tan\mu\left(e^{3\pi\cot\mu}-1\right)\) is the length of the arc. The two cases are depicted in Figure 12.  
In Table A2, we have listed the first five eigenvalues. In order to compare the eigenfunctions obtained from the 2D and 1D calculations, respectively, we calculate the probability density along the curve. The determinant of the metric tensor is \(G(s,v)=e^{2}h(s)^{2}F(s,v)\) hence for the 2D calculation the probability density along the curve is  
\[f_{2,k}(s)=\frac{h(s)^{2}\int_{-1}^{1}|\psi_{k}(s,v)|^{2}F(s,v)\,\mathrm{d}v}{ \int_{0}^{L}h(s)^{2}\int_{-1}^{1}|\psi_{k}(s,v)|^{2}F(s,v)\,\mathrm{d}v\, \mathrm{d}s}\,,\]  
while for the 1D calulation it is  
\[f_{1,k}(s)=\frac{h(s)^{2}|\chi_{u,k}(s)|^{2}}{\int_{0}^{L}h(s)^{2}|\chi_{u,k}(s )|^{2}\,\mathrm{d}s}\,.\]  
In Figure 11, we have plotted the probability density for the first and fifth state using the 1D and 2D equations.