HP Prime Forum
solving for a real root using Brent's method - Printable Version

+- HP Prime Forum (http://forum.hp-prime.de)
+-- Forum: HP Prime (/forumdisplay.php?fid=1)
+--- Forum: Software (/forumdisplay.php?fid=4)
+--- Thread: solving for a real root using Brent's method (/showthread.php?tid=81)



solving for a real root using Brent's method - cdeaglejr - 12-03-2016 03:19 PM

This HP Prime program demonstrates how to interact with a routine named brent which solves for a single real root of a user-defined, one-dimensional nonlinear function coded as y = fx(x) using Brent's numerical method.

Here's the output for an example that solves for the root of cosine(x) between 0 and pi. The displayed error is the difference between pi/2 and the value computed by the brent software.

brent's root-finding method

root = 1.57079632679

error = 0.00000000001

The attached zip file includes a PDF document with additional information about this algorithm.