The ladder is represented as a uniform rod of mass

and length

. Friction is ignored. Let

be the reaction at the top of the ladder and let

be the reaction at the bottom of the ladder. Let

denote the angle of the ladder with the vertical and

the initial value of

. The position of the center of mass

is given by

,

.
Motion I: The ladder is simply leaning against the wall, so that the top of ladder can move away from the wall, giving

.

.
Thus the ladder leaves the wall when

, that is, when

.
This result shows that the ladder leaves the wall as the top end falls one third of its original height.
After the ladder leaves the wall, it falls only under the action of gravity and the reaction force

. For this second part of the motion, the position of

is given by

and

and the time

is measured from zero at the moment the ladder leaves the wall.
When the ladder hits the floor, the top end has a finite velocity

.
Motion II: The ladder is constrained, for example by means of a frictionless ring, so that the top of the ladder is not allowed to leave the wall. Here
In this case, the reaction

at the top end of the ladder originally points in the direction away from the wall. As the ladder falls,

decreases to zero when the top has fallen one third of the original height. Then it reverses direction, increasing continuously.
The reaction

at the bottom end first decreases then increases and, when the ladder hits the floor, it takes the nonzero value

. Furthermore, the final velocity of the bottom end of the ladder is zero. More details can be found in the [1].
[1] S. Kapranidis and R. Koo, "Variations of the Sliding Ladder Problem,"
The College Mathematics Journal, 39(5), 2008 pp. 374–379.