# Trouble plotting particle geodesic trajectory on wormhole embedding

I'm having tremendous trouble plotting geodesic trajectories on wormhole embedding. I'm attaching the article from which I am trying to re-create the trajectories (https://arxiv.org/pdf/1404.7210.pdf). I've already achieved the wormhole embedding shape, but couldn't plot the geodesic trajectories. The author described the technique (pdf page 7), described that they numerically inverted the solution to obtain $$r(\phi)$$, so they could use it in ParametricPlot3D as $$r(\phi) cos(\phi),r(\phi) sin(\phi),z(r(\phi))$$. Please do help to plot the trajectories. Please make some coding recommendations. Here is a code I used that doesn't plot.

In:= DSolve[r'[h] == (1 - 2/r[h])^(-(1/2)), r[h], h]

In:= s1 = NDSolve[{h'[x] == \[Sqrt](0.95^2/
4 (InverseFunction[(-((2 Log[Sqrt[-2 + #1] + Sqrt[#1]])/
Sqrt[-2 + #1]) + Sqrt[#1]) Sqrt[(-2 + #1)/#1]
Sqrt[#1] &][
h[x]])^4 - (InverseFunction[(-((
2 Log[Sqrt[-2 + #1] + Sqrt[#1]])/Sqrt[-2 + #1]) +
Sqrt[#1]) Sqrt[(-2 + #1)/#1] Sqrt[#1] &][h[x]])^2),
h == 5}, h, {x, 0, 10}]
In:= ParametricPlot3D[
Evaluate[{Cos[x] h[x], Sin[x] h[x], 4 Sqrt[-1 + h[x] /2]} /.
s1], {x, 0, 25}, PlotRange -> All]


Thank you.

• Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! Jul 15, 2022 at 18:16
• Use ParametricPlot3D[ Evaluate[{Cos[x] h[x], Sin[x] h[x], 4 Sqrt[-1 + h[x]/2]} /. s1[]], {x, 0, 25}, PlotRange -> All] Jul 16, 2022 at 5:35
• Thanks Alex Trounev. But it doesn't provide any 3D result, as I encountered. Jul 16, 2022 at 6:01
• Where is parameter q in your code? Jul 16, 2022 at 13:02
• Actually I'm having trouble with the codes for quite a few days. So to make the code simpler, I took $q=0$ prior to the coding. Jul 16, 2022 at 13:57

Using equation (2.11) from the paper in the form

z[r_, q_, b0_] :=
I r Hypergeometric2F1[1/2, 1/(1 - q),
1 + 1/(1 - q), (r/b0)^(1 - q)] -
I b0 Sqrt[Pi] Gamma[1 + 1/(1 - q)]/Gamma[1/2 + 1/(1 - q)];


we can plot wormhole embedding function for b0=2 and q=0,-1,-3 as follows

Table[RevolutionPlot3D[{{r, z[r, q, 2]}, {r, -z[r, q, 2]}}, {r, 0, 7},
PlotStyle ->
Directive[Magenta, Opacity[0.4], Specularity[White, 10]],
MeshStyle -> Blue, PlotPoints -> 30, Boxed -> False,
PlotRange -> All, Axes -> False], {q, {0, -1, -3}}] Now we can use your code and visualize trajectory in a case q=0, we have

s1 = NDSolve[{h'[
x] == \[Sqrt](0.95^2/
4 (InverseFunction[(-((2 Log[Sqrt[-2 + #1] + Sqrt[#1]])/
Sqrt[-2 + #1]) +
Sqrt[#1]) Sqrt[(-2 + #1)/#1] Sqrt[#1] &][
h[x]])^4 - (InverseFunction[(-((2 Log[
Sqrt[-2 + #1] + Sqrt[#1]])/Sqrt[-2 + #1]) +
Sqrt[#1]) Sqrt[(-2 + #1)/#1] Sqrt[#1] &][h[x]])^2),
h == .95}, h, {x, 0, .25}]

Show[RevolutionPlot3D[{{r, z[r, 0, 2]}, {r, -z[r, 0, 2]}}, {r, 0, 7},
PlotStyle ->
Directive[Magenta, Opacity[0.4], Specularity[White, 10]],
MeshStyle -> Blue, PlotPoints -> 30, Boxed -> False,
PlotRange -> All, Axes -> False],
ParametricPlot3D[
Evaluate[{Cos[x] h[x], Sin[x] h[x], 4 Sqrt[-1 + h[x]/2]} /.
s1[]], {x, 0, .21}, PlotRange -> All, PlotStyle -> Red],
ParametricPlot3D[
Evaluate[{Cos[x] h[x], Sin[x] h[x], -4 Sqrt[-1 + h[x]/2]} /.
s1[]], {x, 0, .21}, PlotRange -> All, PlotStyle -> Red]] • A lot lot of thanks Alex Trounev. You are really awesome. Really helped me a lot. Thank you once again. Jul 17, 2022 at 8:12
• @AyanenduDutta You are welcome! Jul 17, 2022 at 10:03