Doubt from mechanics

hard
mechanics
pendulum
find-equation-of-motion
unsolved
pp
#1

#2

Write equation of motion

#3

Lagrangian Hamilton metthod...

#4