The Museum of HP Calculators

HP Forum Archive 13

 Can 49G do cramer's ruleMessage #1 Posted by Fred Miller on 6 Nov 2003, 6:47 p.m. I was wondering if the 49g has a function for solveing cramer's rule. Meaning you could enter in the system of equations and pick the one you want to solve for and it performs cramer's rule on the manipulated matrix. I know you can use det() but then you have to take the determinate twice and divid blaa blaa blaa. If it is possible or if there is a program that will do it and anyone knows it would be greatly appreciated

 Re: Can 49G do cramer's ruleMessage #2 Posted by Namir Shammas on 6 Nov 2003, 7:01 p.m.,in response to message #1 by Fred Miller Cramer's rule is SOOOO inefficient that it is taught for historical purposes and is practical ONLY for solving two (and maybe three) equations. The HP49G can do LU decomposition, QR decomposition, and SVD. These methods rule over Cramer's rule (no pun intended)!! Namir

 Re: Can 49G do cramer's ruleMessage #3 Posted by Ed on 6 Nov 2003, 8:05 p.m.,in response to message #2 by Namir Shammas Just use SOLVE command. 3: [x+y=5 x-y=1] 2: [x y] 1: SOLVE Can handle as many equations as you need. After gettign the array of equations, you can just use LNAME command to get all variables (2:..)

 Re: Can 49G do cramer's ruleMessage #4 Posted by Karl Schneider on 7 Nov 2003, 1:57 a.m.,in response to message #2 by Namir Shammas Namir stated: Quote: Cramer's rule is SOOOO inefficient that it is taught for historical purposes and is practical ONLY for solving two (and maybe three) equations. The 20S has Cramer's Rule built in for solving a system of 3 linear equations (called "3 bY 3") -- use "LOAD" to copy it from the calc's ROM into user program memory. However, I'm not sure how the function can be easily used to solve a system of 2 equations, because some determinants would be zero.

 If you are interested...Message #5 Posted by Raul L (Espaņa) on 7 Nov 2003, 2:40 a.m.,in response to message #4 by Karl Schneider ... I could mail you a little RPL program that given the system matrix, it gives you the Cramer's determinants.

 Re: Can 49G do cramer's ruleMessage #6 Posted by Namir Shammas on 7 Nov 2003, 7:04 p.m.,in response to message #4 by Karl Schneider Most Numerical Analysis books will not even mention Cramer's rule anymore! The method is so wastefull of CPU effort (for 4 equations and more) that people who crunch numbers will frown upon using it. The LU decomp is the current method of preference.

Go back to the main exhibit hall