Step 1: Identify forces acting on the ladder.
Weight \(mg\) acting downward at the centre of the ladder.
Normal reaction \(N_1\) from the ground (vertical).
Friction \(f\) at the ground (horizontal).
Normal reaction \(N_2\) from the smooth wall (horizontal).
Step 2: Apply equilibrium of forces.
Vertical equilibrium:
\[
N_1 = mg
\]
Horizontal equilibrium:
\[
f = N_2
\]
Since the ladder is on the verge of slipping,
\[
f = \mu N_1 = \mu mg
\]
Hence,
\[
N_2 = \mu mg
\]
Step 3: Take moments about the point of contact with the ground.
Moment of weight about ground:
\[
mg \left(\frac{l}{2}\right)\cos\theta
\]
Moment of wall reaction about ground:
\[
N_2 \cdot l \sin\theta
\]
For rotational equilibrium:
\[
mg\left(\frac{l}{2}\right)\cos\theta = N_2 l \sin\theta
\]
Substitute \(N_2 = \mu mg\):
\[
\frac{1}{2}\cos\theta = \mu \sin\theta
\]
Step 4: Solve for \(\theta\).
\[
\tan\theta = \frac{1}{2\mu}
\]
\[
\theta = \tan^{-1}\!\left(\frac{\mu}{2}\right)
\]
Final Answer:
\[
\boxed{\theta = \tan^{-1}\!\left(\dfrac{\mu}{2}\right)}
\]