Solution (source code)

= Solution

The horizon is the largest positive root of $f(r_H)=0$. With $x=r_H^2$,
$$
0=1+\frac{x}{L^2}-\frac\mu x
\quad\Longleftrightarrow\quad
x^2+L^2x-\mu L^2=0.
$$
Choosing the positive root gives
$$
\boxed{r_H^2=\frac{L^2}{2}
\left(\sqrt{1+\frac{4\mu}{L^2}}-1\right).}
$$