# Toroidal coordinates

Toroidal coordinates are a three-dimensional orthogonal coordinate system that results from rotating the two-dimensional bipolar coordinate system about the axis that separates its two foci. Thus, the two foci $F_{1}$ and $F_{2}$ in bipolar coordinates become a ring of radius $a$ in the $xy$ plane of the toroidal coordinate system; the $z$-axis is the axis of rotation. The focal ring is also known as the reference circle.

## Definition

The most common definition of toroidal coordinates $(\tau ,\sigma ,\phi )$ is
    $x=a\ {\frac {\sinh \tau }{\cosh \tau -\cos \sigma }}\cos \phi$
    $y=a\ {\frac {\sinh \tau }{\cosh \tau -\cos \sigma }}\sin \phi$
    $z=a\ {\frac {\sin \sigma }{\cosh \tau -\cos \sigma }}$
together with $\mathrm {sign} (\sigma )=\mathrm {sign} (z$). The $\sigma$ coordinate of a point $P$ equals the angle $F_{1}PF_{2}$ and the $\tau$ coordinate equals the natural logarithm of the ratio of the distances $d_{1}$ and $d_{2}$ to opposite sides of the focal ring
    $\tau =\ln {\frac {d_{1}}{d_{2}}}.$
The coordinate ranges are $-\pi <\sigma \leq \pi$, $\tau \geq 0$ and $0\leq \phi <2\pi .$

### Coordinate surfaces

Surfaces of constant $\sigma$ correspond to spheres of different radii
    $\left(x^{2}+y^{2}\right)+\left(z-a\cot \sigma \right)^{2}={\frac {a^{2}}{\sin ^{2}\sigma }}$
that all pass through the focal ring but are not concentric. The surfaces of constant $\tau$ are non-intersecting tori of different radii
    $z^{2}+\left({\sqrt {x^{2}+y^{2}}}-a\coth \tau \right)^{2}={\frac {a^{2}}{\sinh ^{2}\tau }}$
that surround the focal ring. The centers of the constant-$\sigma$ spheres lie along the $z$-axis, whereas the constant-$\tau$ tori are centered in the $xy$ plane.

### Inverse transformation

The $(\sigma ,\tau ,\phi )$ coordinates may be calculated from the Cartesian coordinates (x, y, z) as follows. The azimuthal angle $\phi$ is given by the formula
    $\tan \phi ={\frac {y}{x}}$
The cylindrical radius $\rho$ of the point P is given by
    $\rho ^{2}=x^{2}+y^{2}=\left(a{\frac {\sinh \tau }{\cosh \tau -\cos \sigma }}\right)^{2}$
and its distances to the foci in the plane defined by $\phi$ is given by
    $d_{1}^{2}=(\rho +a)^{2}+z^{2}$
    $d_{2}^{2}=(\rho -a)^{2}+z^{2}$
The coordinate $\tau$ equals the natural logarithm of the focal distances
    $\tau =\ln {\frac {d_{1}}{d_{2}}}$
whereas $|\sigma |$ equals the angle between the rays to the foci, which may be determined from the law of cosines
    $\cos \sigma ={\frac {d_{1}^{2}+d_{2}^{2}-4a^{2}}{2d_{1}d_{2}}}.$
Or explicitly, including the sign,
    $\sigma =\mathrm {sign} (z)\arccos {\frac {r^{2}-a^{2}}{\sqrt {(r^{2}-a^{2})^{2}+4a^{2}z^{2}}}}$
where $r={\sqrt {\rho ^{2}+z^{2}}}$.
The transformations between cylindrical and toroidal coordinates can be expressed in complex notation as
    $z+i\rho \ =ia\coth {\frac {\tau +i\sigma }{2}},$
    $\tau +i\sigma \ =\ln {\frac {z+i(\rho +a)}{z+i(\rho -a)}}.$

### Scale factors

The scale factors for the toroidal coordinates $\sigma$ and $\tau$ are equal
    $h_{\sigma }=h_{\tau }={\frac {a}{\cosh \tau -\cos \sigma }}$
whereas the azimuthal scale factor equals
    $h_{\phi }={\frac {a\sinh \tau }{\cosh \tau -\cos \sigma }}$
Thus, the infinitesimal volume element equals
    $dV={\frac {a^{3}\sinh \tau }{\left(\cosh \tau -\cos \sigma \right)^{3}}}\,d\sigma \,d\tau \,d\phi$

### Differential Operators

The Laplacian is given by ${\begin{aligned}\nabla ^{2}\Phi ={\frac {\left(\cosh \tau -\cos \sigma \right)^{3}}{a^{2}\sinh \tau }}&\left[\sinh \tau {\frac {\partial }{\partial \sigma }}\left({\frac {1}{\cosh \tau -\cos \sigma }}{\frac {\partial \Phi }{\partial \sigma }}\right)\right.\\[8pt]&\quad +\left.{\frac {\partial }{\partial \tau }}\left({\frac {\sinh \tau }{\cosh \tau -\cos \sigma }}{\frac {\partial \Phi }{\partial \tau }}\right)+{\frac {1}{\sinh \tau \left(\cosh \tau -\cos \sigma \right)}}{\frac {\partial ^{2}\Phi }{\partial \phi ^{2}}}\right]\end{aligned}}$
For a vector field ${\vec {n}}(\tau ,\sigma ,\phi )=n_{\tau }(\tau ,\sigma ,\phi ){\hat {e}}_{\tau }+n_{\sigma }(\tau ,\sigma ,\phi ){\hat {e}}_{\sigma }+n_{\phi }(\tau ,\sigma ,\phi ){\hat {e}}_{\phi },$ the Vector Laplacian is given by ${\begin{aligned}\Delta {\vec {n}}(\tau ,\sigma ,\phi )&=\nabla (\nabla \cdot {\vec {n}})-\nabla \times (\nabla \times {\vec {n}})\\&={\frac {1}{a^{2}}}{\vec {e}}_{\tau }\left\{n_{\tau }\left(-{\frac {\sinh ^{4}\tau +(\cosh \tau -\cos \sigma )^{2}}{\sinh ^{2}\tau }}\right)+n_{\sigma }(-\sinh \tau \sin \sigma )+{\frac {\partial n_{\tau }}{\partial \tau }}\left({\frac {(\cosh \tau -\cos \sigma )(1-\cosh \tau \cos \sigma )}{\sinh \tau }}\right)+\cdots \right.\\&\qquad +{\frac {\partial n_{\tau }}{\partial \sigma }}(-(\cosh \tau -\cos \sigma )\sin \sigma )+{\frac {\partial n_{\sigma }}{\partial \sigma }}(2(\cosh \tau -\cos \sigma )\sinh \tau )+{\frac {\partial n_{\sigma }}{\partial \tau }}(-2(\cosh \tau -\cos \sigma )\sin \sigma )+\cdots \\&\qquad +{\frac {\partial n_{\phi }}{\partial \phi }}\left({\frac {-2(\cosh \tau -\cos \sigma )(1-\cosh \tau \cos \sigma )}{\sinh ^{2}\tau }}\right)+{\frac {\partial ^{2}n_{\tau }}{{\partial \tau }^{2}}}(\cosh \tau -\cos \sigma )^{2}+{\frac {\partial ^{2}n_{\tau }}{{\partial \sigma }^{2}}}(-(\cosh \tau -\cos \sigma )^{2})+\cdots \\&\qquad \left.+{\frac {\partial ^{2}n_{\tau }}{{\partial \phi }^{2}}}{\frac {(\cosh \tau -\cos \sigma )^{2}}{\sinh ^{2}\tau }}\right\}\\&+{\frac {1}{a^{2}}}{\vec {e}}_{\sigma }\left\{n_{\tau }\left(-{\frac {(\cosh ^{2}\tau +1-2\cosh \tau \cos \sigma )\sin \sigma }{\sinh \tau }}\right)+n_{\sigma }\left(-\sinh ^{2}\tau -2\sin ^{2}\sigma \right)+\ldots \right.\\&\qquad \left.+{\frac {\partial n_{\tau }}{\partial \tau }}(2\sin \sigma (\cosh \tau -\cos \sigma ))+{\frac {\partial n_{\tau }}{\partial \sigma }}\left(-2\sinh \tau (\cosh \tau -\cos \sigma )\right)+\cdots \right.\\&\qquad \left.+{\frac {\partial n_{\sigma }}{\partial \tau }}\left({\frac {(\cosh \tau -\cos \sigma )(1-\cosh \tau \cos \sigma )}{\sinh \tau }}\right)+{\frac {\partial n_{\sigma }}{\partial \sigma }}(-(\cosh \tau -\cos \sigma )\sin \sigma )+\cdots \right.\\&\qquad \left.+{\frac {\partial n_{\phi }}{\partial \phi }}\left(2{\frac {(\cosh \tau -\cos \sigma )\sin \sigma }{\sinh \tau }}\right)+{\frac {\partial ^{2}n_{\sigma }}{{\partial \tau }^{2}}}(\cosh \tau -\cos \sigma )^{2}+{\frac {\partial ^{2}n_{\sigma }}{{\partial \sigma }^{2}}}(\cosh \tau -\cos \sigma )^{2}+\cdots \right.\\&\qquad \left.+{\frac {\partial ^{2}n_{\sigma }}{{\partial \phi }^{2}}}\left({\frac {(\cosh \tau -\cos \sigma )^{2}}{\sinh ^{2}\tau }}\right)\right\}\\&+{\frac {1}{a^{2}}}{\vec {e}}_{\phi }\left\{n_{\phi }\left(-{\frac {(\cosh \tau -\cos \sigma )^{2}}{\sinh ^{2}\tau }}\right)+{\frac {\partial n_{\tau }}{\partial \phi }}\left({\frac {2(\cosh \tau -\cos \sigma )(1-\cosh \tau \cos \sigma )}{\sinh ^{2}\tau }}\right)+\cdots \right.\\&\qquad \left.+{\frac {\partial n_{\sigma }}{\partial \phi }}\left(-{\frac {2(\cosh \tau -\cos \sigma )\sin \sigma }{\sinh \tau }}\right)+{\frac {\partial n_{\phi }}{\partial \tau }}\left({\frac {(\cosh \tau -\cos \sigma )(1-\cosh \tau \cos \sigma )}{\sinh \tau }}\right)+\cdots \right.\\&\qquad \left.+{\frac {\partial n_{\phi }}{\partial \sigma }}(-(\cosh \tau -\cos \sigma )\sin \sigma )+{\frac {\partial ^{2}n_{\phi }}{{\partial \tau }^{2}}}(\cosh \tau -\cos \sigma )^{2}+\cdots \right.\\&\qquad \left.+{\frac {\partial ^{2}n_{\phi }}{{\partial \sigma }^{2}}}(\cosh \tau -\cos \sigma )^{2}+{\frac {\partial ^{2}n_{\phi }}{{\partial \phi }^{2}}}\left({\frac {(\cosh \tau -\cos \sigma )^{2}}{\sinh ^{2}\tau }}\right)\right\}\end{aligned}}$
Other differential operators such as $\nabla \cdot \mathbf {F}$ and $\nabla \times \mathbf {F}$ can be expressed in the coordinates $(\sigma ,\tau ,\phi )$ by substituting the scale factors into the general formulae found in orthogonal coordinates.

## Toroidal harmonics
### Standard separation

The 3-variable Laplace equation
    $\nabla ^{2}\Phi =0$
admits solution via separation of variables in toroidal coordinates. Making the substitution
    $\Phi =U{\sqrt {\cosh \tau -\cos \sigma }}$
A separable equation is then obtained. A particular solution obtained by separation of variables is:
    $\Phi ={\sqrt {\cosh \tau -\cos \sigma }}\,\,S_{\nu }(\sigma )T_{\mu \nu }(\tau )V_{\mu }(\phi )$
where each function is a linear combination of:
    $S_{\nu }(\sigma )=e^{i\nu \sigma }\,\,\,\,\mathrm {and} \,\,\,\,e^{-i\nu \sigma }$
    $T_{\mu \nu }(\tau )=P_{\nu -1/2}^{\mu }(\cosh \tau )\,\,\,\,\mathrm {and} \,\,\,\,Q_{\nu -1/2}^{\mu }(\cosh \tau )$
    $V_{\mu }(\phi )=e^{i\mu \phi }\,\,\,\,\mathrm {and} \,\,\,\,e^{-i\mu \phi }$
Where P and Q are associated Legendre functions of the first and second kind. These Legendre functions are often referred to as toroidal harmonics.
Toroidal harmonics have many interesting properties. If you make a variable substitution $z=\cosh \tau >1$ then, for instance, with vanishing order $\mu =0$ (the convention is to not write the order when it vanishes) and $\nu =0$
    $Q_{-{\frac {1}{2}}}(z)={\sqrt {\frac {2}{1+z}}}K\left({\sqrt {\frac {2}{1+z}}}\right)$
and
    $P_{-{\frac {1}{2}}}(z)={\frac {2}{\pi }}{\sqrt {\frac {2}{1+z}}}K\left({\sqrt {\frac {z-1}{z+1}}}\right)$
where $\,\!K$ and $\,\!E$ are the complete elliptic integrals of the first and second kind respectively. The rest of the toroidal harmonics can be obtained, for instance, in terms of the complete elliptic integrals, by using recurrence relations for associated Legendre functions.
The classic applications of toroidal coordinates are in solving partial differential equations, e.g., Laplace's equation for which toroidal coordinates allow a separation of variables or the Helmholtz equation, for which toroidal coordinates do not allow a separation of variables. Typical examples would be the electric potential and electric field of a conducting torus, or in the degenerate case, an electric current-ring (Hulme 1982).

### An alternative separation

Alternatively, a different substitution may be made (Andrews 2006)
    $\Phi ={\frac {U}{\sqrt {\rho }}}$
where
    $\rho ={\sqrt {x^{2}+y^{2}}}={\frac {a\sinh \tau }{\cosh \tau -\cos \sigma }}.$
Again, a separable equation is obtained. A particular solution obtained by separation of variables is then:
    $\Phi ={\frac {a}{\sqrt {\rho }}}\,\,S_{\nu }(\sigma )T_{\mu \nu }(\tau )V_{\mu }(\phi )$
where each function is a linear combination of:
    $S_{\nu }(\sigma )=e^{i\nu \sigma }\,\,\,\,\mathrm {and} \,\,\,\,e^{-i\nu \sigma }$
    $T_{\mu \nu }(\tau )=P_{\mu -1/2}^{\nu }(\coth \tau )\,\,\,\,\mathrm {and} \,\,\,\,Q_{\mu -1/2}^{\nu }(\coth \tau )$
    $V_{\mu }(\phi )=e^{i\mu \phi }\,\,\,\,\mathrm {and} \,\,\,\,e^{-i\mu \phi }.$
Note that although the toroidal harmonics are used again for the T function, the argument is $\coth \tau$ rather than $\cosh \tau$ and the $\mu$ and $\nu$ indices are exchanged. This method is useful for situations in which the boundary conditions are independent of the spherical angle $\theta$, such as the charged ring, an infinite half plane, or two parallel planes. For identities relating the toroidal harmonics with argument hyperbolic cosine with those of argument hyperbolic cotangent, see the Whipple formulae.