Root-finding with newton and brentq


Solution P8.4.2