HP Forums
HP-35s solution to A^2=4 - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: HP-35s solution to A^2=4 (/thread-10294.html)



HP-35s solution to A^2=4 - Cliff Stamp - 03-08-2018 02:18 PM

How do I get the calculator to get the negative root?

Even if I put negatives into both the variable and the X register to bound initial guesses, it will still return the positive solution only.


RE: HP-35s solution to A^2=4 - Jlouis - 03-08-2018 05:38 PM

(03-08-2018 02:18 PM)Cliff Stamp Wrote:  How do I get the calculator to get the negative root?

Even if I put negatives into both the variable and the X register to bound initial guesses, it will still return the positive solution only.

I don't have the answer right now, but I just guess, have you had a look in the manual?


RE: HP-35s solution to A^2=4 - rprosperi - 03-08-2018 06:08 PM

(03-08-2018 05:38 PM)Jlouis Wrote:  I don't have the answer right now, but I just guess, have you had a look in the manual?

Indeed, Appendix D discusses this exact topic.


RE: HP-35s solution to A^2=4 - Dieter - 03-08-2018 06:55 PM

(03-08-2018 02:18 PM)Cliff Stamp Wrote:  Even if I put negatives into both the variable and the X register to bound initial guesses, it will still return the positive solution only.

Yes, this is because of a special feature of the 35s solver: if the respective variable appears only once the 35s does not start the usual iteration to find the solution. Instead it solves the equation directly (!).

In your example A^2=4 the 35s rearranges the equation to get A=SQRT(4). And since the sqrt-function always returns a positive result (or zero) this is what you get.

In other words: the 35s does not even look at the initial guesses. There is no need to do so because it "knows" the direct solution. It does what you would also do if you solve the equation manually. So in a way the 35s is able to do symbolic math. ;-)

(03-08-2018 02:18 PM)Cliff Stamp Wrote:  How do I get the calculator to get the negative root?

Simple: just write the equation with the variable appearing more than once. You can always do so by adding 0×A, or here you can simply write it as A×A=4. Since A appears twice the 35s has to resort to the iterative approach and so you can direct it to negative results, e.g. by  0 STO A –5  SOLVE A.

Dieter


RE: HP-35s solution to A^2=4 - Voldemar - 03-08-2018 07:03 PM

Tried. I could not get a negative root for equation X^2=4. But got a negative root for equation X^2+0*X=4. Strange. Maybe it is a bug.


RE: HP-35s solution to A^2=4 - Voldemar - 03-08-2018 07:06 PM

Thank you for the explanation, Dieter.


RE: HP-35s solution to A^2=4 - Dieter - 03-08-2018 07:36 PM

(03-08-2018 07:03 PM)Voldemar Wrote:  Tried. I could not get a negative root for equation X^2=4. But got a negative root for equation X^2+0*X=4. Strange. Maybe it is a bug.

No, it's a feature. ;-)

Dieter


RE: HP-35s solution to A^2=4 - Voldemar - 03-08-2018 08:00 PM

HP 50g does not have this feature, there is negative root for X^2=4. Big Grin


RE: HP-35s solution to A^2=4 - Cliff Stamp - 03-10-2018 08:47 PM

(03-08-2018 06:55 PM)Dieter Wrote:  if the respective variable appears only once the 35s does not start the usual iteration to find the solution. Instead it solves the equation directly (!).

Much appreciated, I guess that is what this refers to (from the User Guide) :

"SOLVE first attempts to solve the equation directly for the unknown variable. If the
attempt fails, SOLVE changes to an iterative(repetitive) procedure."