Post Reply 
[hp50g] is it possible to solve linear systems with unknown variables in it?
10-17-2022, 05:32 PM (This post was last modified: 10-17-2022 05:59 PM by ijabbott.)
Post: #8
RE: [hp50g] is it possible to solve linear systems with unknown variables in it?
In RPN, you can set stack level 2 to a vector containing the equations, and stack level 1 to a vector containing the variables to solve for, then use LINSOLVE (on the S.SLV menu):

Code:
['7*X+2*K*Y=0' '3*K*X-8*Y=2']
['X' 'Y']
LINSOLVE

You should end up with 3 items on the stack:

Code:
{ [ '7×X+2×K×Y=0' '3×K×X-8×Y=2' ] [ 'X' 'Y' ] }
:Specific: { '21×K^2+196' '-(6×X^2+56)' '3×K^2+28' 1. 7 1. }
[ 'X=2×K/(3×K^2+28)' 'Y=-7/(3×K^2+28)' ]

The bottom line is the answer for 'X' and 'Y' in terms of 'K'. (I'm not sure what the 'Specific' line means.) This is equivalent to Gjermund Skailand's answer. The only difference is that the unknown 'K' has opposite sign.

[EDIT: Actually that means that they are not equivalent. Substituting Gjermund's result into '3kx-8y=2' results in '-2=2'. What's going on?]

— Ian Abbott
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [hp50g] is it possible to solve linear systems with unknown variables in it? - ijabbott - 10-17-2022 05:32 PM



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