HP Forums
Graph oddity - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Graph oddity (/thread-5798.html)



Graph oddity - lrdheat - 03-02-2016 06:59 PM

When plotting 1/sqrt(9*x^2 + 4), Prime will not find extremum of (0,.5) unless |x|<~.47
Further from X=0, Prime comes up with NaN.


RE: Graph oddity - Brad Barton - 03-02-2016 07:16 PM

I suspect that's because the algorithm for finding the extremum uses the 2nd derivative of the function to select intervals for search.

Using the Prime, I found the 2nd derivative of the function you mentioned, and found it's roots at -sqrt(2)/3 and sqrt(2)/3, which are roughly equal to -0.47 and 0.47. These are the places where the function's curvature goes from positive to negative (inflection points).

The extremum function probably searches the intervals (-inf, -0.47), (-0.47, 0.47) and (0.47, +inf) for places where the first derivative is equal to 0. Since the first and last intervals listed never reach a place where their slope is zero, the extremum function's search fails if you start in those intervals. Starting somewhere between -0.47 and 0.47 allows the function to search that interval, where it does find a solution.

Truthfully I have no clue how the extremum function works, but that's how I'd program it if given the task.