HP 35s - Choosing Initial Guesses for SOLVE problem


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?



%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.


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.

Possibly Related Threads...
Thread Author Replies Views Last Post
  HP Prime - local variables retain their initial type BruceH 4 634 11-10-2013, 12:42 PM
Last Post: Michael de Estrada
  XCas / Prime "solve" question Nigel J Dowrick 4 701 11-08-2013, 04:01 AM
Last Post: Nigel J Dowrick
  Using the Prime to solve for eigenvalues Michael de Estrada 28 2,854 10-27-2013, 07:21 AM
Last Post: Tarcisi C
  HP Prime Define: Use with solve, etc. Helge Gabert 0 319 10-23-2013, 06:24 PM
Last Post: Helge Gabert
  HP 34s solve f'(x)=0 Richard Berler 8 755 10-07-2013, 03:03 PM
Last Post: Dieter
  Good puzzle for kids to solve on 35s? snaggs 11 1,094 09-18-2013, 10:40 PM
Last Post: David Hayden
  September SOLVE Newsletter Robert Prosperi 4 566 09-07-2013, 01:12 AM
Last Post: Mic
  [HP Prime CAS] Solve Commands (Bugs and Request) CompSystems 10 1,153 08-08-2013, 12:34 PM
Last Post: Gilles Carpentier
  41 SOLVE & INTEG Bank-switched Implementation. Ángel Martin 0 281 06-21-2013, 11:31 AM
Last Post: Ángel Martin
  HP-17bII+ Solve Compatibility Issues Robert Prosperi 7 838 04-22-2013, 10:11 PM
Last Post: Gerson W. Barbosa

Forum Jump: