Solution (source code)

= Solution

Use the angle $\theta$ from the vertical as the <generalized coordinate>. For a uniform ladder, its <centre of mass> is $(l\sin\theta,l\cos\theta)$, so $v_G^2=l^2\dot\theta^2$. Its central <moment of inertia> is $I_G=m(2l)^2/12=ml^2/3$. With ideal contact constraints that do no <work>, the <Lagrangian>, <conjugate momentum>, and <Euler-Lagrange equation> are
$$
T=\tfrac12ml^2\dot\theta^2+\tfrac12I_G\dot\theta^2=\tfrac23ml^2\dot\theta^2,\quad U=mgl\cos\theta,
$$
$$
\boxed{L=\tfrac23ml^2\dot\theta^2-mgl\cos\theta,\qquad p_\theta=\frac{\partial L}{\partial\dot\theta}=\tfrac43ml^2\dot\theta,}
$$
$$
\boxed{\ddot\theta=\frac{3g}{4l}\sin\theta.}
$$
Release from rest at $\theta_0$ also gives $\dot\theta^2=3g(\cos\theta_0-\cos\theta)/(2l)$ by <conservation of energy>. These results hold while both contacts persist. The ideal wall reaction is normal to the wall; an unspecified tangential wall friction would require an additional generalized <force> and would prevent determination from the supplied data alone.