I’m simulating a satellite around the earth, and got error:
Symbolic calculations could not initiate. Likely there's a function which is not differentiable by SymEngine.
I think it’s because it cannot differentiate the -\frac 3 2 power. But how could it fail to differentiate something that simple?
using DifferentialEquations, ParameterizedFunctions
satellite! = @ode_def Satellite begin
dx = vx
dy = vy
dvx = -GM*(x^2+y^2)^(-3//2) * x
dvy = -GM*(x^2+y^2)^(-3//2) * y
end GM
G = 6.67e-11
M = 5.97e24
elasticity = 1
u0 = [0, 1e7, 5e3, 0]
tspan = (0.0,15.0)
p = [G*M]
prob = ODEProblem(satellite!, u0, tspan, p)
sol = solve(prob,Tsit5())