The equation below shows up when dealing with geodesic curves on elliptic paraboloids:

\begin{equation} u-c^2=u(1+4c^2)\sin^2\left(v-2c \ln\left(k(2\sqrt{u-c^2}+\sqrt{4u+1})\right)\right) \tag{1} \end{equation}

Obtaining a solution for $v(u)$ is rather straightforward using Solve, like so:

Solve[u-c^2==u(1+4 c^2) Sin[v-2c Log[k (2 Sqrt[u-c^2]+Sqrt[4u+1])]]^2,v,Reals]

[output omitted]

It would be much more convenient to find the inverse function $u(v)$, so I tried solving for $u$, but MMA gave up with "... cannot be solve with the methods available to Solve". That's when I gave Reduce a shot:

Reduce[u-c^2==u(1+4c^2)Sin[v-2c Log[k\left(2 Sqrt[u-c^2]+Sqrt[4u+1]\right)]]^2,u,Reals]

Same message as before.

Is there a way to make this equation more tractable for Mathematica, to let it arrive at a symbolic solution for $u(v)$?

NB: $c$ and $k$ are constants, more precisely $c,k \in \mathbb{R}$; $u \geq 0$ ($u$ denotes the radius)

Edit: How can we obtain the paraboloid geodesic $(1)$ above?

First, define the paraboloid surface as follows:

\begin{equation}(u,v)\mapsto\begin{pmatrix}\sqrt{u}\cos{v} \\ \sqrt{u}\sin{v} \\ u \end{pmatrix} \tag{2}\end{equation}

In order to trace out a complete paraboloid, let $u\geq 0$ and $v \in [0,2\pi)$. I would rather use $r$ and $\varphi$ to make their meaning a little more clear, but let's stick to the usual naming scheme w.r.t. differential geometry.

Next, calculate the general solution to the geodesics using the Euler-Lagrange equation:

\begin{equation} \underbrace{\frac{\frac{\partial P}{\partial v}+2v\,'\frac{\partial Q}{\partial v}+v\,'^2\frac{\partial R}{\partial v}}{2\sqrt{P+2Qv\,'+Rv\,'^2}}}_{\displaystyle{=0}}-\frac{d}{du}\left(\frac{Q+Rv'}{\sqrt{P+2Qv\,'+Rv\,'^2}}\right)=0 \end{equation}

$P, Q, R$ are the coefficients of the first fundamental form; I managed to verify that the solution indeed matches equation $(1)$ given in the literature, see here.

Rearrange $(1)$ so we have $v(u)$, and use that inside $(2)$ to describe geodesics that travel across the paraboloid surface.

I was able to come up with a Notebook which computes the integration constants $c,k$ to yield the specific geodesic passing through two points $(u_1,v_1),(u_2,v_2)$.

However, if these points have the same "height" on the paraboloid, that is $u_1=u_2$, Mathematica won't find a solution. I assume knowing the inverse function $u(v)$ would be helpful here.

  • $\begingroup$ At best you can find an inverse series InverseSeries[ Series[c^2 + (1 + 4 c^2) u Sin[v - 2 c Log[k (2 Sqrt[-c^2 + u] + Sqrt[1 + 4 u])]]^2, {u, 0, 4}]] but it's extremely unlikely you'll ever find a closed form inverse for a transcendental problem like this. Only numerical solutions are possible, and that might include fixed point iteration too. $\endgroup$
    – flinty
    Sep 5, 2020 at 22:16
  • $\begingroup$ This could be a good question if you'd provide appropriate meaning of constants and variables with more or less detailed information how the equation can be derived from description of geodesics. I guess that the parametrisation in terms of u and v is not optimal, nevertheless providing appropriate restriction on the variables and parameteres one would get much more. If one can use $v(u)$ it is also possible to have $u(v)$ using InverseFunction with appropriate restrictions although I cannot promise that analytical formula can be obtained. $\endgroup$
    – Artes
    Sep 5, 2020 at 23:52
  • $\begingroup$ In any case it would be constructive to play with e.g. Manipulate[ContourPlot[u-c^2==u(1+4 c^2) Sin[v-2c Log[k (2 Sqrt[u-c^2]+Sqrt[4u+1])]]^2,{v,-4,4},{u,0,8},AspectRatio->Automatic,ContourStyle->Thick],{c,-3,3},{k,0.1,3}] to get an idea what one could expect. $\endgroup$
    – Artes
    Sep 5, 2020 at 23:55
  • $\begingroup$ @Artes: added some info to my post above. $\endgroup$ Sep 6, 2020 at 12:08
  • $\begingroup$ I have never seen ContourPlot used in this way - how would I find an exact solution, if there is any? $\endgroup$ Sep 9, 2020 at 16:14

1 Answer 1


In situations like this I use InverseFunction. Although it does not generate an analytical expression, you still end up with something which returns an exact result rather than an approximate one:

lhsMinusRhs[c_, k_][u_, v_] := u-c^2 - u(1+4 c^2) Sin[v-2c Log[k (2 Sqrt[u-c^2]+Sqrt[4u+1])]]^2
assumptions[c_, k_][u_, v_] := u >= 0;
uFunction[c_, k_][v_] :=
        lhsMinusRhs[c, k][u, v],
        assumptions[c, k][u, v]
      ] // Evaluate
  ][0] // Evaluate;

For example, uFunction[3, 4][5] will return an exact Root object corresponding to $(c, k) = (3, 4)$ and $v = 5$.

uFunction[3, 4][5]
(* Root[{..., 16.33...}] *)
lhsMinusRhs[3, 4][%, 5] // FullSimplify
(* 0 *)

Note that InverseFunction makes no guarantees on which branch of the inverse will be chosen. If I am after a specific branch, the approach I take is to make assumptions specific enough to pin down the unique value corresponding to that branch.

  • $\begingroup$ It seems that InverseFunction might have a bug: (219309) $\endgroup$
    – yawnoc
    Sep 9, 2020 at 6:38
  • $\begingroup$ Your code for uFunction[3, 4][5] // N returns approximately 16.33 on my machine as well, so I tried to plot uFunction to see how it behaves for different values of $c,k$: Manipulate[Plot[uFunction[a, b][val] // N, {val, 0, 2 \[Pi]}], {{a, 3}, -5, 5, Appearance -> "Labeled"}, {{b, 4}, -5, 5, Appearance -> "Labeled"}], but I get an empty plot, no matter what... $\endgroup$ Sep 17, 2020 at 12:53
  • $\begingroup$ (1/2) @user2286339 I'm not sure why this happens, but InverseFunction seems reluctant to evaluate when supplied with inexact input; compare the output of uFunction[3, 4][5] // N and uFunction[3, 4][5.] // N. An empty plot results because Plot numericises the sampling values of val. $\endgroup$
    – yawnoc
    Sep 17, 2020 at 17:45
  • $\begingroup$ (2/2) If the goal is to make a plot, I would not go down the analytical route. Instead I'd make a numerical function, e.g. uNumerical[u0_][c_, k_][v_] := FindRoot[lhsMinusRhs[c, k][#, v] &, {u0}] (where u0 is the initial guess), which is much faster to plot: Manipulate[Plot[uNumerical[15][a, b][val] // N, {val, 0, 2 \[Pi]}], {{a, 3}, -5, 5, Appearance -> "Labeled"}, {{b, 4}, -5, 5, Appearance -> "Labeled"}] $\endgroup$
    – yawnoc
    Sep 17, 2020 at 17:45
  • $\begingroup$ Originally, I wanted to rearrange eq. (1) in terms of $u$ which seems to have no analytical form, when @Artes hinted at using ContourPlot to find it, if there is one. How would I do that? His code snippet above (ContourPlot) suggests a 2\Pi periodicity, but that is all that I was able to gather from the plot. $\endgroup$ Sep 17, 2020 at 20:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.