Given that $f$ has a root $p$ in some interval, successively
halve the interval and choose as your new interval the half
containing $p$.
Enclosure methods
The bisection method is a basic example of an enclosure method:
we produce successively better root approximations by enclosing or “trapping” a root
in smaller and smaller intervals at each step.
Implementation
Given a function $f$ and an interval $[a, b]$, how can I decide if $f$ has a root in $[a, b]$?