WOLFRAM LANGUAGE FEATURED EXAMPLE

Double Pendulum

Model the motion of a double pendulum in Cartesian coordinates.

    
In[1]:=
Click for copyable input
Derive the governing equations using Newton's second law of motion, and :
In[2]:=
Click for copyable input
The lengths of the pendulum rods are fixed. These are expressed as algebraic constraints:
In[3]:=
Click for copyable input
Specify the initial state of the system as initial conditions:
In[4]:=
Click for copyable input
Specify the physical parameters for the pendulum system:
In[5]:=
Click for copyable input
Solve and visualize the system:
In[6]:=
Click for copyable input
In[7]:=
Click for copyable input
Out[7]=