HP Prime Forum

Full Version: solving for a real root using Brent's method
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
Reference URL's