Brent's method for computing extrema

14032016, 08:12 PM
Post: #1




Brent's method for computing extrema
This HP Prime program demonstrates how to interact with a function called minima which computes a single minimum of a userdefined function. The user provides an initial and final value for a search interval along with a convergence criterion.
Here is the output for this program. For this example the userdefined function is simply y = cos(x) and the search interval was 0 to 2 pi. To find the maximum value of a function, remember that a maximum is simply a minimum with a negative attitude! So for this example, changing the userdefined function to y = cos(x) will find a maximum if one exists in the search interval. brent's minima method y = cos(x) minima = 3.14159265359 error = 0 The error displayed here is pi minus the value computed by the minima function. 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)