# Question:Mechanics. Trajectory Plot

## Question:Mechanics. Trajectory Plot

Maple
`I am fairly new to Maple and trying to understand the dsolve command for numerical solutions and plotting graphs of radial distances and trajectory plots.`
`This is my code below. All of it successfully brings up a solution apart from the very last command and I don't understand why it is not working. `
`I believe the last plot is plotting a trajectory plot but I am not sure. I am meant to use the solution to plot the trajectory plot (X(t),Y9t))=(r(t)cos(theta(t)),r(t)sin(theta(t))) in the (XY) plane and plot the function H(t)=1/2 (dr/dt)^2+1/2 r(t)^2 (dtheta/dt)^2-k/r(t) against t. :S`
`with(plots):DifferentialSystem := {r(t)*(diff(theta(t), `\$`(t, 2)))+2*(diff(r(t), t))*(diff(theta(t), t)) = 0, diff(r(t), `\$`(t, 2))-r(t)*(diff(theta(t), t))^2 = -1000/r(t)^2, r(0) = sqrt(65), theta(0) = arccos(1/(sqrt(65))), (D(r))(0) = 4*sqrt(65)*(1/13), (D(theta))(0) = -6/13};`
`soln:=dsolve(DifferentialSystem,numeric):soln(0);`
`nops(soln(0)); op(2,soln(0)); nops(op(2,soln(0))); op(2,op(2,soln(0))); op(2,op(3,soln(0))); op(2,op(4,soln(0))); op(2, op(5,soln(0)));`
`for k from 0 to 1000 do X[k]:=op(2,op(2,soln(k*0.01))) od:pointplot({seq([k*0.01,X[k]],k=0..1000)},symbol=POINT);pointplot({seq([evalf(op(2,op(2,soln(k*0.01)))),evalf(op(2,op(3,soln(k*0.01)))),evalf(op(2,op(4,soln(k*0.01)))),evalf(op(2,op(5,soln(k*0.01))))],k=0..1000)},symbol=POINT);`
﻿