Post Reply 
Some issues solving linear equation
06-23-2018, 09:05 AM (This post was last modified: 06-23-2018 09:10 AM by ijabbott.)
Post: #6
RE: Some issues solving linear equation
(06-22-2018 01:06 PM)sasa Wrote:  Solving linear equation on 48GX (I'm unaware of ROM version, it is found at hpcalc.org) shows following:

x + y + 2z = -2
3x - y + 14z = 6
x + 2y = -5

x = -.904761904762
y = -2.04761904762
z = .47619047619

This is only one of solution, as this system have infinite number of solutions, however there is no further notice from the calculator about. The solution actually is in form:
x = -4n + 1
y = 2n - 3
z = n

The "Solve lin sys..." app on the HP 50g produces the same solution.

However:
Code:
['X+Y+2*Z=-2','3*X-Y+14*Z=6','X+2*Y=-5']
['X','Y','Z']
LINSOLVE
produces:
Code:
{ [ 'X+Y+2*Z=-2' '3*X-Y+14·Z=6' 'X+2*Y=-5' ] [ 'X' 'Y' 'Z' ] }
:Specific: { 4 -4 0 4 2. }
[ 'X=1-4*Z' 'Y=-3--2*Z' ]

I don't know what the ":Specific:" line means. And that's a strange use of double negative in the solution!

Quote:The following synthetic example is much more obvious, the system have no solution:
x - 5y + 3z = -8
0x + 2y + 1z = 3
0x + 0y + 0z = 7

However, emulator returns:
x = -.150793650794
y = 1.5374603175
z = -6.34920634921E-2

Again, the "Solve lin sys..." app on the HP 50g produces the same result, but the LINSOLVE function produces:
Code:
{ [ 'X-5*Y+3*Z=-8' '0*X+2*Y+1*Z=3' '0*X+0*Y+0*Z=7' ] [ 'X' 'Y' 'Z' ] }
:Specific: { 14 14 0 7 2. 2 1. }
[ 'X=-(11*Z)/2' 'Y=-Z/2' '1=0' ]

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


Messages In This Thread
Some issues solving linear equation - sasa - 06-22-2018, 01:06 PM
RE: Some issues solving linear equation - ijabbott - 06-23-2018 09:05 AM



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