Let's suppose we would find the roots of a non linear function like:
$$f(x) = \sin(x^2)$$
We can do it simply, with python and scipy, using, for example, the brentq function, that solve such problem with the Brent method, wich is considered the best of rootingfinding routines of scipy.
This method finds the first zero of the given function, in an interval $[a,b]$, where the function has different sign at the bounds.