I want to plot the position of Spherical pendulum. there are differential equation for spherical pendulum in Spherical Coordinates.
sys := {((D@@2)(phi))(t) = -2*(D(phi))(t)*(D(theta))(t)*cos(theta(t))/sin(phi(t)),
((D@@2)(theta))(t) = (D(phi))(t)^2*cos(theta(t))*sin(theta(t))-9.8*sin(theta(t))}
$$\theta ''(t)=\sin (\theta (t))\cos (\theta (t)) \phi '(t)^2- 9.8\sin (\theta (t)) $$
$$\phi''(t)=\frac{-2 \phi'(t)\theta'(t)\cos(\theta(t))}{\sin(\theta(t))}$$
with initial conditions
theta(0) = (1/2)*Pi, (D(theta))(0) = 0, phi(0) = (1/2)*Pi, (D(phi))(0) = 1
I tried:
eq := dsolve([((D@@2)(theta))(t) = (D(phi))(t)^2*cos(theta(t))-9.8*sin(theta(t)),
((D@@2)(phi))(t) = -2*(D(phi))(t)*(D(theta))(t)*cos(theta(t))/sin(phi(t)),
theta(0) = (1/2)*Pi, (D(theta))(0) = 0, phi(0) = (1/2)*Pi, (D(phi))(0) = 1],numeric)
how to change coordinates
x(t) = sin(theta(t))*cos(phi(t))
y(t) = sin(theta(t))*sin(phi(t))
z(t) = cos(theta(t))
and how to plot it from t=0 to 10?
Whether using spherical or cylindrical, plotting of results are in Cartesian system of co-ordinates.
After solving and finding spherical $ (\theta , \phi) $ just plug in, find out $ (x,y,z)$ and plot the locus points.