I've been writing this code to simulate the orbit of Venus in a simple 2D polar plot, but it keeps telling me that I have insufficient initial conditions, here is the code:
restart:with(Physics):with(VariationalCalculus):with(plots):with(plottools):
R[V] := 0.72*AU: #`starting radius for venus`
AU := 1: #`astronomical unit`
G := 6.674*10^(-11): #`gravitational constant`
m[S] := (333*10^3)*m[E]: #`mass of the sun`
m[V] := 0.815*m[E]: #`mass of venus`
m[E] := 1: #`mass of the earth`
x[V] := t -> r[V](t)*cos(theta[V](t)): #`x-coordinate`
y[V] := t -> r[V](t)*sin(theta[V](t)): #` y-coordinate`
x[VP] := t -> diff(x[V](t), t): #` x-velocity`
y[VP] := t -> diff(y[V](t), t): #`y-velocity`
T[V] := m[V]*simplify(x[VP](t)^2 + y[VP](t)^2)/2: #`kinetic energy of the system`
V[V] := (-G)*m[V]*m[S]*1/r[V](t): #`potential energy of the system`
L[V] := T[V] - V[V]; #`lagrangian of the system`
EL[Vr] := diff(L[V], r[V](t)) - diff(diff(L[V], diff(r[V](t), t)), t) = 0: #` e-l for the r-coordinate`
EL[`Vtheta;`] := diff(L[V], theta[V](t)) - diff(diff(L[V], diff(theta[V](t), t)), t) = 0: #`e-l for the theta-coordinate`
EL[V] := [EL[Vr], EL[`Vtheta;`]]; #` system of equations`
F[V] := G*m[V]*m[S]*1/R[V]^2: #`gravitational force for venus starting position`
omega[V] := sqrt(F[V]*R[V]*1/m[V])*1/R[V]: #`angular velocity for venus starting position`
IC[V] := [r[V](0) = R[V], D(r[V])(0) = 0, theta[V](0) = 0, D(theta[V])(0) = omega[V]]; #`initial conditions, r-position, r-velocity, theta-position, theta-velocity`
SOL := dsolve(EL[V], IC[V], [r[V](t), theta[V](t)], numeric, output = listprocedure); #`numerical solution`
Error, (in dsolve/numeric/type_check) insufficient initial/boundary value information for procedure defined problem
I have included both the initial values for r,dr/dt, theta and dtheta/dt.
I'm not sure what other initial conditions I could be missing?