I want to plot the parametrization of the curve with respect to arc length. It is all known that we have to find the inverse of the arc length of the original function i.e. $F(t)$, and S(t) =ArcLength[F[t],{t, 0, s }], while in my case the $F(t)$ is pretty complicated and hard to find the inverse $t = S^{-1}(s)$. $F(t)$ here is:

S[t_] := t(17Sqrt[17]+8Sqrt[15]t+10Sqrt[17]t^2)Sqrt[4913+544Sqrt[255]t+21180t^2+960Sqrt[255]t^3+15300t^4]/(289+16Sqrt[255]t+510t^2)

And when I put this inverse expression into the $F(s)$, the InverseFunction[] returns me nothing

In[]: InverseFunction[S[t]]

Out[]: InverseFunction[S[t]]

And this is the reason why my plot is also empty, I guess. Is there anybody can give me a help to solve the InverseFunction[] ?

enter image description here

  • 1
    $\begingroup$ Welcome to MSE. Please post code, not an image. $\endgroup$ – Rohit Namjoshi Feb 12 at 4:37
  • $\begingroup$ I'm sorry, I'll modify my question $\endgroup$ – Gilbert Feb 12 at 17:18

We can test InverseFunction for some values of $t$ by defining u = InverseFunction[S]. If $u$ is a valid inverse, then u[ S[t] ] will give us $t$ back. Consider this:

S[t_] := t (17 Sqrt[17] + 8 Sqrt[15] t + 10 Sqrt[17] t^2) Sqrt[
    4913 + 544 Sqrt[255] t + 21180 t^2 + 960 Sqrt[255] t^3 + 
     15300 t^4]/(289 + 16 Sqrt[255] t + 510 t^2)

u = InverseFunction[S];
With[{t = 1},
 {S[t], u[S[t]], S[u[S[t]]], t == u[S[t]]} // N]

(*  {34.5147, -1.36267, -34.5147, False}  *)

Here we have chosen $t=1$, calculated $S(1) = 34.5...$, but we got back $-1.36...$ for $t$ instead of 1. We also consider $S(-1.36...)$ and that is not the same a $S(1)$. So, InverseFunction cannot be used with our $S(t)$.

To obtain a numerical inverse of $S(t)$ we can use the following:

Clear[s, t, w]
soln = Solve[{S[t] == s, t > 0}, t, Reals] // Flatten;
w[s1_] := t /. soln /. s -> s1
With[{t = 1},
 {S[t], w[S[t]], t == w[S[t]]} // N]

{34.5147, 1., True}

In this case the function w[s] has returned the desired inverse. We can also check the accuracy of this inverse with a quick plot of the difference between the input $t$ and the calculated inverse of $S(t)$:

Plot[Evaluate[t - w[S[t]]], {t, 0, 3},
 PlotPoints -> 541,
 PlotRange -> {All, 10^-15 {-3, 2}}]

enter image description here

| improve this answer | |
  • $\begingroup$ Thanks for your explanation! $\endgroup$ – Gilbert Feb 14 at 21:30

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.