0
$\begingroup$

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?

$\endgroup$
  • 1
    $\begingroup$ Can you write out the equations instead of putting them in Maple format? $\endgroup$ – Moo Apr 2 '16 at 19:46
  • $\begingroup$ @Moo ok, I edit my question $\endgroup$ – vito Apr 2 '16 at 20:11
  • $\begingroup$ One of the terms in your Maple code for sys has sin(phi(t)) in the denominator, but your corresponding inlined formula has it as sin(theta(t)) instead (as pointed out by Preben Alsholm on www.mapleprimes.com). $\endgroup$ – acer Apr 5 '16 at 17:58
0
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ can you write down maple code. (maple format)? $\endgroup$ – vito Apr 3 '16 at 13:29
  • $\begingroup$ I see no error, Why not ask on Maple site ? $\endgroup$ – Narasimham Apr 3 '16 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.