HP Forums

Full Version: HP 35s - Choosing Initial Guesses for SOLVE problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Hi all! I have a problem when I use SOLVE with some equations that have two roots.

For example, consider the equation X^2 = 1. As you know, it has two solutions (x1 = 1, x2 = -1). HP 35s always shows me 1. Even when I choose the initial guesses for the negative root as described in the manual (section 7-8).

The same problem with the equation 0.5 = (1 + (%pi / LN(X))^2)^-0.5. It has two solutions (x1 = 0.16303353482158, x2 = 6.133707406236229) and I always get x2.

On the contrary, there are other equations that work well. For example: X^2+X-6=0. With that one, I can get the two solutions (x1 = 2, x2 = -3).

I do not know if I am doing something bad. Any idea?

_________________

Notes:

%pi = Number PI


Edited: 24 Sept 2010, 7:22 p.m.

Pablo --

You've discovered for yourself a somewhat-dubious "feature" of the HP-33s and HP-35s. Please see this thread from about a month ago; my post at the bottom of it provides a link to a thread from 2004.

http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv019.cgi?read=171095#171095

In the equations X^2 = 1 and (1 + (pi / LN(X))^2)^(-0.5) = 0.5, the variable X appears only once. The calculator's equation parser enables direct solution of X, executing inverse operations in reverse order. Using principal roots of all math functions, the same answer is returned every time, no matter what the starting points were.

Calculated answers for the second equation:

X = exp(pi/sqrt(3))  = 6.1337074062362276
X = exp(-pi/sqrt(3)) = 0.1630335348215805
In the equation X^2+X-6=0, the variable X appears more than once, so the 'algebraic' techniques are forgone and numerical iteration is used instead.

-- KS


Edited: 3 Oct 2010, 8:37 p.m. after one or more responses were posted

Thanks Karl, I did not read the thread from about a month ago because I was on holidays. The solution you pointed there works perfectly. And yes, it is a (very) dubious "feature"... :)

There is value to the direct-solution method, as it should always return a solution if one exists, even if either initial guess value will produce a math error upon evaluation, or if a subsequent evaluation point does the same. I learned a few years ago that the celebrated HP-17B/HP-27S solver includes a similar direct-solution method.

Still, a well-designed solver should return a valid solution that lies within the range of two user-specified initial guesses, instead of a directly-calculated solution outside that range. The calculator cannot know what root(s) is/are of interest in the user's equation.

-- KS


Edited: 3 Oct 2010, 8:40 p.m.