### Distance element $ds^2$ in the elliptical coordinates

As we found earlier,
$x=\frac{abr\cos\varphi}{\sqrt{a^2\sin^2\varphi+b^2\cos^2\varphi}}\\y=\frac{abr\sin\varphi}{\sqrt{a^2\sin^2\varphi+b^2\cos^2\varphi}}$
We have further
$ds^2=\left(\frac{\partial x}{\partial r}dr+\frac{\partial x}{\partial \varphi}d\varphi\right)^2+ \left(\frac{\partial y}{\partial r}dr+\frac{\partial y}{\partial \varphi}d\varphi\right)^2$
The derivatives are
$\frac{\partial x}{\partial r}=\frac{ab\cos\varphi}{\sqrt{a^2\sin^2\varphi+b^2\cos^2\varphi}}\\\frac{\partial y}{\partial r}=\frac{ab\sin\varphi}{\sqrt{a^2\sin^2\varphi+b^2\cos^2\varphi}}\\\frac{\partial x}{\partial \varphi}=-\frac{abr\sin\varphi}{\sqrt{a^2\sin^2\varphi+b^2\cos^2\varphi}}\left(1+\frac{\cos^2\varphi(a^2-b^2)}{a^2\sin^2\varphi+b^2\cos^2\varphi}\right)\\\frac{\partial y}{\partial \varphi}= \frac{abr\cos\varphi}{\sqrt{a^2\sin^2\varphi+b^2\sin^2\varphi}}\left(1-\frac{\cos^2\varphi(a^2-b^2)}{a^2\sin^2\varphi+b^2\cos^2\varphi}\right)$
Please substitute. Calculation of the tangential unit vector $\hat{t}$. Let us consider two close points on the ellipse: $(x,y)$ and $(x+dx,y+dy)$. The vector connecting these two points is a tangential vector, that is, $d\vec{r}=dx \cdot \hat{x}+ dy\cdot\hat{y} \parallel \hat{t}$. However, we have to take into account that $dx$ and $dy$ are not independent, since they have to be calculated with $r=\mbox{const}$, that is,
$dx=(\frac{\partial x}{\partial \varphi})d\varphi, \qquad dy=(\frac{\partial y}{\partial \varphi})d\varphi$
Using this we find
$\hat{t}=\left((\frac{\partial x}{\partial \varphi})\hat{x}+(\frac{\partial y}{\partial \varphi})\hat{y}\right)/ \left((\frac{\partial x}{\partial \varphi})^2+(\frac{\partial y}{\partial \varphi})^2\right)$
Please substitute. After $\hat{t}$ is found, the normal unit vector can be found as $\hat{n}=\hat{z}\times\hat{t}$.