I have the set $$M=\{(x,y,z)\in\mathbb{R}^3:z^2-(a^2x^2+b^2y^2)=R^2,\ z>0\}$$ and I have to write the differential equation that describe the geodesic curve and draw it.
I used the parametrization $$ M=\left\{ \begin{pmatrix} x\\[1mm] y\\[1mm] \sqrt{R^2+(a^2x^2+b^2y^2)} \end{pmatrix}\in\mathbb{R}^3: x,y\in[0,\infty) \right\}, $$ and I found the Lagrangian $$ L(t,x,y,x',y')=\frac{\sqrt{(z(x,y)^2+a^4x^2)x'^2+(z(x,y)^2+b^4y^2)y'^2+2a^2b^2xyx'y'}} {z(x,y)} $$ where $z=\sqrt{R^2+(a^2x^2+b^2y^2)}$, and the first part of Euler-Lagrange equation is \begin{align*} \frac{\partial L}{\partial x}&= \frac{(2 x a^4 + 2 x a^2)x'^2 + 2 a^2 x y'^2 + 2 a^2 b^2 y x' y'}{2 z(x,y) \sqrt{(z(x,y)^2+a^4x^2)x'^2+(z(x,y)^2+b^4y^2)y'^2+2a^2b^2xyx'y'}} \\[3mm] &\phantom{=}- \frac{a^2 x \sqrt{(z(x,y)^2+a^4x^2)x'^2+(z(x,y)^2+b^4y^2)y'^2+2a^2b^2xyx'y'} }{z(x,y)^{2}} \end{align*} and this is awful.
Then, I used another parameterization: $$ M=\left\{ \begin{pmatrix} \frac{R}{a}\sinh u \cos v\\[1mm] \frac{R}{b}\sinh u \sin v\\[1mm] R\cosh u \end{pmatrix}\in\mathbb{R}^3:u>0,\ v\in[0,\pi) \right\}, $$ but, I can't simplify the expression: \begin{align*} ds^2&=dx^2+dy^2+dz^2\\[2mm] &=\frac{R^2}{a^2}(\cosh u \cos v\,du-\sinh u \sin v\,dv)^2 +\frac{R^2}{b^2}(\cosh u \sin v\,du+\sinh u \cos v\,dv)^2\\ &\phantom{={}}+(R\sinh u\,du)^2. \end{align*}
Are there a simpler way to find the equation?
Here's a link to a demonstration project that does almost what you want. The code is available, you can modify it. Link: