I am trying to solve a geodesic equation on Mathematica and would like to get a precise result, using DSolve would be a good start for me. My problem is the following: I have a squared expression for my DE and manage to get a solution with NDSolve for my equation using the Method -> {"EquationSimplification" -> "Residual"} option but cannot find anything similar using DSolve. Is there a way to ask Mathematica to find an analytical solution for this? I think the problem comes from the fact that two solutions are possible with this equation: the one with r[x] increasing or the one with r[x] decreasing and then increasing again, I have solved this with the "r'[0] == -10" term with NDSolve.
Thanks in advance!
Here is the code:
eqr = 0 == -(r'[x])^2 + En^2 - L^2*(1 - 2 mass/r[x])/r[x]^2
Rxn = NDSolve[{eqr, r[0] == 10000, r'[0] == -10, r'[0] == -10} /. {En -> 10, L -> 100,
mass -> 1}, r, {x, 0, 10000},
Method -> {"EquationSimplification" -> "Residual"}][[1, 1, 2]]
Rxa = DSolve[{eqr, r[0] == 10000} /. {En -> 10, L -> 100, mass -> 1}, r,
x]
The DSolve returns the error "DSolve::bvimp: General solution contains implicit solutions. In the boundary value problem, these solutions will be ignored, so some of the solutions will be lost"
eqr[x] = 0 ==....
supposed to be? Did you mean to define a function here? any way, V 12.1 gives errors running yourNDSolve
. Did not try the rest. Please make sure your code at least runs before posting it. $\endgroup$