HP Forums
No minimum or maximum found - 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: No minimum or maximum found (/thread-2651.html)



No minimum or maximum found - mbeddo - 12-18-2014 06:21 AM

I was experimenting with an LCR circuit. If you follow the steps given below, the virtual calculator crashes but the physical calculator reports "No minimum or maximum found" but is otherwise happy.

1. open the Function app
2. enter "R:=1000", "L:=0.01", "C:=120E-12" in calculator mode.
3. go to Symb view
4. set F1 to "R+(X*L*i)+1/(X*C*i)", where "i" is Shift+2. Uncheck F1 - we won't plot it.
5. set F2 to "(1/(F1(X)*CONJ(F1(X))))^0.5" and make sure it is checked - we will plot it.
6. Shift+Plot to set Xmin=0, Xmax=3E6, Ymin=0, Ymax=0.002, Xtick=1E5, Ytick=0.0001
7. go to Plot view. You should see the resonance curve.
8. On the plot screen, press "Menu", then "Fcn", then "Extremum"

There is definitely a peak, but the calculator reports no extremum found (see screenshot attached). The virtual calculator program crashes.

Software version 2014.12.3 (6975)


RE: No minimum or maximum found - Snorre - 12-18-2014 08:23 AM

Uh! My device first showed me an extremum at the wrong place. After moving the cursor a bit nearer to the peak asking for the extremum made it crash and restart.

[EDIT] It seems CONJ is causing my trouble. If replacing CONJ(F1(X))*F1(X) by |F1(X)|² everything is fine: extremum at (912870.929, 0.001).


RE: No minimum or maximum found - cyrille de brébisson - 12-18-2014 01:16 PM

Hello,

I was not able to replicate the crash, BUT I know why it is not working...

To find the extremum, the calculator attempts to find the Zero of the derivative of the function, and it does that in a numerical way...

Well, the derivative of your function is a nice long expression, which has a fair bit of complex calculations in it... When this derivative is calculated in numerical way, you get a number of the form a+ib with b very small compared with a, BUT NOT 0! As a result, when the zero finder evaluates your derivative, it finds complex numbers everywhere and can not find the zero...

taking the absolute value of the function might work...

cyrille