Post Reply 
(35S) Short Pythagorean Triangle Solver Formula
12-08-2014, 01:44 PM (This post was last modified: 12-08-2014 02:22 PM by Gerald H.)
Post: #3
RE: HP 35S: Short Pythagorean Triangle Solver Formula
(12-08-2014 12:45 PM)Dieter Wrote:  
(12-07-2014 09:43 AM)Gerald H Wrote:  Short Pythagorean triangle solver.

C is the hypotenuse of a right-angled triangle.

ABS( [ A , B ] ) = C

Indeed ABS is quite handy for calculating hypotenuses or diagonals of rectangles – I often use it with the [i] key: 3 [i] 4 [ABS] directly returns 5.

But in this case ABS is not the best solution since it has no direct inverse function. Therefore the 35s cannot use one of its most powerful features: solving equations symbolically. The solution and the solving time also depend on the initial guesses provided in X and registers A, B and C.

All this is avoided if the equation is implemented the classic way:

SQ(C) = SQ(A) + SQ(B)

In this case the 35s returns the solution immediately, regardless of the contents of the stack and the data registers. Try it – it's much faster because now the 35s "knows" that in your example B equals √(C² – A²). And it will not return negative results either. ;-)

Dieter

Thanks for you comments.

The formula I give is surely not the best solution, is however nicely short.

Using ABS( AiB ) = C is orthographically shorter, sadly doesn't function in Solver.

Most students will, I trust, know the classical equation but might find some insight, or indeed a tingle of maths, by discovering an alternative method.

I agree with your critique of the classical way ignoring negative solutions. The occasional occurence (possibly unexpected) just may stir the learners interest to reasoning how that could happen, & I'm sure you wouldn't want to discount half of the available solutions.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP 35S: Short Pythagorean Triangle Solver Formula - Gerald H - 12-08-2014 01:44 PM



User(s) browsing this thread: 1 Guest(s)