Post Reply 
HP 50g / HP Prime: Solve equation with 3 variables
11-29-2022, 05:37 AM (This post was last modified: 11-29-2022 05:55 AM by kostrse.)
Post: #1
HP 50g / HP Prime: Solve equation with 3 variables
Here is an equation:

\((a+b-5)^2 + (b+2*c+3)^2+(c+3*a-10)^2=0\)
where \(a, b, c \in \mathbb{R}\).

While I could solve it myself on paper, I'm trying to understand capabilities of symbolic solvers in HP 50g and HP Prime calculators.
How would you try to solve this equation by utilizing these calculators to their maximum?

If I simply try to use the solve function in both calculators with the original equation, I get nothing:


HP 50g:
'(a+b-5)^2 + (b+2*c+3)^2+(c+3*a-10)^2=0'
[a b c]
solve

HP Prime:
solve((a+b-5)^2 + (b+2*c+3)^2+(c+3*a-10)^2=0, [a b c])


If I split the equation myself into a system of simpler equations, then HP Prime is able to solve it but HP 50g still not:


HP 50g:
['a+b-5=0', 'b+2*c+3=0', 'c+3*a-10=0']
[a b c]
solve

HP Prime:
solve([a+b-5=0, b+2*c+3=0, c+3*a-10=0], [a b c])


HP 50g can brute force the answer with numeric solver though:


HP 50g:
['a+b-5=0', 'b+2*c+3=0', 'c+3*a-10=0']
[a b c]
[1 1 1]
MSLV


What algebraic functions would you use to minimize manual manipulations with the equation and utilize the calculators at their maximum?
My goal is to better understand what these calculators can do and what they cannot.
Sometimes the optimization isn't obvious, so if calculator cannot come up to a solution by itself, you are out of options.
Find all posts by this user
Quote this message in a reply
11-29-2022, 06:56 AM
Post: #2
RE: HP 50g / HP Prime: Solve equation with 3 variables
There are two ways:
1st: In essence you have a system of linear equations that can be written as follows:
1*A+1*B+0*C=5; 0*A+1*B+2*C=-3; 3*A+0*B+1*C = 10.
This can be solved by
Press Shift NUM.SLV, press 4 for Solve linear equation, press enter.
You get a mask. Put in A by [[1,1,0],[0,1,2],[3,0,1]] presse Enter
Put in B by [5,-3,10] press enter
Press Solve (right softkey)
You get the answer in the line with x: [4,1,2]
2nd: The more general ways for all kinds of systems of equations, not just linear:
Set to ALG mode (perhaps works as well in RPN mode)
Press shift NUM.SLV, press 6 for MSLV
MSLV() is shown
Put in the brackets three vectors: One with in equations, one with paramters for which to solve, one with initial guesses.
Here it looks like this:
MSLV([A+B-5=0, B+2*C+3=0,C+3*A-10=0],[A,B,C],[0,0,0])
Then an iterative process starts. After a few seconds you get the same result.
Hope this helps a bit.
Find all posts by this user
Quote this message in a reply
11-29-2022, 08:26 AM
Post: #3
RE: HP 50g / HP Prime: Solve equation with 3 variables
Or then just enter:

[5 -3 10] ENTER
[[1 1 0]0 1 2 3 0 1] รท

[ 4 1 -2 ]
Find all posts by this user
Quote this message in a reply
Post Reply 




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