HP Forums
Problem Solver has with simple equation - 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: Problem Solver has with simple equation (/thread-19155.html)



Problem Solver has with simple equation - Nick1941 - 11-16-2022 06:09 PM

There is an equation in chemistry that relates the energy of an electron in an orbital with quantum number n in a hydrogen atom. The equation is E_n = E_n1/(n^2) with E_n1 = -2.18E-18. When I compute this on the Home screen with, say, n=4, it immediately displays the result: -1.3625E-19. However, when I enter that equation in the solver, and in the numbers screen have -2.18E-18 in the En1 field and 4 in the n field, and move to the En field and select Solve, the calculator battery symbol changes to an hourglass like it's crunching through a very complex calculation. After a few minutes, I just aborted the calculation. Why does the Solver app have such a problem with such a simple equation?

Additional information: The Solver seems to have problems with negative exponents greater than or equal 10. If I set X = 2.2E-9 and n = 4 and set up the equation Y = X/(n^2), when I click Solve, it immediately solves the problem. However, if I set X = 2.2E-10 and run the same equation, the Solver gets locked up in an hourglass situation and can't solve the problem in a reasonable amount of time. BTW, I have found the same problem using the Virtual Calculator.


RE: Problem Solver has with simple equation - Arno K - 11-18-2022 03:08 PM

I can't reproduce your problem, my both Primes solve your 2nd task in no time, Y=1.375E-11, both use newest firmware (2021 11 25) and so it must have to do with your settings. I even tried n and N in the solver-app.
Arno


RE: Problem Solver has with simple equation - Nick1941 - 11-18-2022 04:47 PM

Very strange! BTW, my version number is 2.1.14603 (2021 12 02) which seems to be a later version that (2021 11 25). Maybe they broke something in the newer version. For number format, I have tried Standard, Fixed, Scientific, Engineering, and Floating. For entry, I have tried Textbook, Algebraic, and RPN. The problem always remains.


RE: Problem Solver has with simple equation - roadrunner - 11-18-2022 05:42 PM

I can reproduce the error with the emulator version 2021 06 09 and on the handheld version 2021 12 02.


RE: Problem Solver has with simple equation - Nick1941 - 11-18-2022 06:13 PM

Thank you, Roadrunner.
Those are the versions I have of both items.
Glad to see someone else could reproduce the problem.


RE: Problem Solver has with simple equation - Nick1941 - 11-23-2022 07:16 PM

One way around this problem is to define a function to perform the operation instead of using the Solver. For example, I created the function ElectronEnergy as -2.18E-18/n^2 with n as the input variable. Running ElectronEnergy(4) correctly and immediately produces the answer:
-1.3625E-19. Of course, to replace the Solver equation En = -2.18E-18/n^2, one would have to create two functions: one that computes En with n as the input (shown above) and the other that computes n with En as the input, such as a function called QuantumLevel as SQRT(-2.1E-18/En) with En as the input variable.