Trigonometric equation (Lagrange) for the double pendulum [closed]

I want to model a fishing rod and received a suggestion. I therefore try to follow the mathematics (Lagrange) of the double pendulum. I do not understand how to proceed in the step that Wikipedia calls "Substituting the coordinates above and rearranging the equation gives ...". What I get is totally wrong. Thanks

17/6 EDIT: This question has been marked as "on hold". I therefore rephrase it like this:

In the computations of the Lagrange for the double pendulum, I do not understand how to obtain this equation from the preceeding equations.

(The question has been solved by the answer below.)

• I just edited and rephrased the question. While I did that, it got closed! Well, anyway it is solved.
– cvr
Jun 17 '14 at 15:39

• I think in your first attempted you have not been using the chain rule of differentiation, i.e. $\mathrm{d}/\mathrm{d}t\, \sin(\theta(t)) = \dot{\theta}\cos(\theta(t))$, not $\cos(\theta(t))$. Jun 11 '14 at 11:15