- #1
MonkOfPhysics
- 1
- 0
I'm trying to create a java application that models the path of a double pendulum. To do so I have been attempting to use Lagrangian Mechanics to find the equation's of motion for the system. The problem is that I have never seen a set of equations like the one yielded by this method and need help choosing a numerical method to use to solve it. I do not have much experience with numerical methods so please be descriptive in your response. Thank you very much to anyone who reads this and or replies. The equations are
(m1 + m2) * l1 * (second derivative of θ1) + m2 * l2 * (second derivative of θ2) * cos(θ1-θ2) + m2 * l2 * (derivative of θ2)^2 * sin(θ1 - θ2) + g * (m1 + m2) * sin(θ1) = 0
m2 * l2 * (second derivative of θ1) + m2 * l1 * (second derivative of θ1) * cos(θ1 - θ2) - m2 * l1 * (derivative of θ1)^2 * sin(θ1 - θ2) + m2 * g * sin(θ2) = 0
(m1 + m2) * l1 * (second derivative of θ1) + m2 * l2 * (second derivative of θ2) * cos(θ1-θ2) + m2 * l2 * (derivative of θ2)^2 * sin(θ1 - θ2) + g * (m1 + m2) * sin(θ1) = 0
m2 * l2 * (second derivative of θ1) + m2 * l1 * (second derivative of θ1) * cos(θ1 - θ2) - m2 * l1 * (derivative of θ1)^2 * sin(θ1 - θ2) + m2 * g * sin(θ2) = 0