system of equations question  Printable Version + HP Forums (https://archived.hpcalc.org/museumforum) + Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum1.html) + Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum2.html) + Thread: system of equations question (/thread224651.html) 
system of equations question  Don Shepherd  06102012 I was always taught that you can solve a system of equations as long as you have as many equations as variables. A friend asked how this system can be solved. There are three equations, but four variables:
x + y/4 = 11 I entered the three equations on my TINSpire CAS and it gave me the following solution:
x = 5 * c2 So I'm assuming you enter whatever value you want for variable c2, and the corresponding values for x, y, z, and h are derived, so there are an infinite number of solutions. My question is, how do you solve such a system using pencil and paper, without a CAS?
Re: system of equations question  Luiz C. Vieira (Brazil)  06102012 Hi, Don. You OK?
I am not quite sure if this is what you want, but I'd use a variable replacement, which leads to: x + 1/4·y = 11Then I'd rearrange teh last expression: x=5·hSo, replacing xvalue in first expression: 5·h + 1/4·y = 11Then: 1/4·y = 11  5·hThen: y = 4·(11  5·h) > y = 44  20·hAfter that we already have x and y written as functions of h, so we replace these functions in the remaining expression, the one containing the three variables  x, y and z  and z will also be written as a function of h. Is this what you want? Cheers. Luiz (Brazil)
Edited: 10 June 2012, 9:56 p.m.
Re: system of equations question  Namir  06112012 What is h? Is it a typo? I am asking because you have listed FOUR variables in THREE equations.
Namir Edited: 11 June 2012, 12:01 a.m.
Re: system of equations question  Don Shepherd  06112012 No, h is not a typo. I do have four variables in three equations.
Re: system of equations question  Don Shepherd  06112012 Thanks Luiz.
I see where you can solve the first equation for Y and the last equation for X, but I'm having trouble solving the middle equation for Z after substituting for X and Y. But it's late and my brain is not cooperating.
Re: system of equations question  C.Ret  06112012 That the good question to post ! Effectively, the approach to solve such a system is greatly dependant about what is h standing for.
As a general convention in mathematics and scientific notations, the range of the letters in the alphabet generally indicate what the objects are :
h is parameterIf h is a parameter, the system have to be consider has three equations of three unknow variables. It can be solve with the classic methods and the solution will be expressed as a function of the h parameter.
{ x + y/4 = 11 <=> { x + y/4 = 11 <=> { x = 5.h <=> { x = 5.h For each value of parameter h the system admit an unique solution that coordinates (x,y,z) = ( 5.h , 4420.h , 5.(4435.h)/3 ) are affine functions of h.
h is an unkonwn
If h is a unknown, then the system is an underdimensioned system of linear equations . In this case, there is only thre possible ways:
{ x + y/4 = 11 <=> { x + y/4 = 11The corresponding augmented matrix of such a linear system is: ( 1 1/4 0 0 11 )Which lead to the echelon form: ( 1 0 0 5 0 )
This indicate that the system admit an infinity number of solution: { x = 5.t
ConclusionAs can be observe, in the both case, the resolution follow the same ways and leads to the same coefficients. That why very few documentation explain how to handle under/over dimensioned systems. The mechanical of the resolution is similar to good dimensioned or square system.
Only the meaning of the solution is different, the same figure may be interpreted as an unique solution of parameter h or an infinite set of solution due to unknown h variable ! { x = 5.t versus { x = 5.h
EDIT : Have corrected one HUDGE ERROR concerning the infinite set of solution. Only parameter t is need !
Edited: 13 June 2012, 6:06 a.m. after one or more responses were posted
Re: system of equations question  Luiz C. Vieira (Brazil)  06112012 Hmm! That's the final painting, I thank you for that! Complete! And beautifully written! I have saved the page for future references, if I may... The way you exposed it makes it fairly easy to understand. A good way to start explaining what is the SIMPLEX method of solving for a system of nonequations. Cheers.
Luiz (Brazil)
Re: system of equations question  Gilles Carpentier  06112012 Parfait et trés clair, comme toujours C.ret ;) Re: system of equations question  David Hayden  06112012 I'm working from 25 year old memories here, but as I recall, if a system of equations is linear then if you have N equations in M variables, the solution is a flat MN dimensional space. More specifically, 3 questions in 4 variables results in a onedimensional solution  a line. If you had 5 variables, the solution would be a plane. Hopefully someone who knows their linear algebra will respond to clean up my mistakes here, but I'm nearly certain that this is nearly right. :)
Dave
Re: system of equations question  Valentin Albillo  06112012 Quote: It all depends on the rank of the NxM coefficient matrix when augmented with the Nx1 (column) independent terms, i.e., an Nx(M+1) matrix in all.
Depending on its rank you may have one solution, infinite solutions, or none at all.
Re: system of equations question  Don Shepherd  06112012 Thanks Luiz. Now I see how to solve the second equation for Z, so you end up with X, Y, and Z all expressed as functions of H, with an infinite number of solutions. Thanks for pointing this out. Now I understand how to get the TINSpire derived solution using pencil and paper and the standard rules of algebra.
This is enlightening, because I always thought you would need four equations to solve for four variables.
Re: system of equations question  Don Shepherd  06112012 Thanks C.Ret, I'm going to study your post. This is fascinating stuff.
Re: system of equations question  Namir  06112012 SOLUTION #2 You CAN create a table for x, y, and z vs h, then assign 2 values for h, solve the equations each time, and then calculate the coefficients for the linear relationship between x, y, and z as a function of h.
Namir Edited: 11 June 2012, 9:49 a.m.
Re: system of equations question  Namir  06112012 Don, It's kind interesting that you present a linear system of 4 variables, at a time when I have been reading about the various iterative algorithms that solves hundreds if not thousands of linear equations. I have handled problems up to 5000 equations so far!! Of course my goal (or hope) is to design a new algorithm that can handle cases where the prominent algorithms (most of them based on the method of conjugate gradients) fall short. This is by no means an easy task. :) Namir
Edited: 11 June 2012, 9:54 a.m.
Re: system of equations question  Don Shepherd  06112012 Thanks Namir. I have to admit that this is a fascinating field of study, certainly more fascinating than my hobby of using the 17b solver as a programming language.
Re: system of equations question  Namir  06112012 I agree. I use mainly Matlab and secondarily Excel VBA code to implement these iterative methods.
Re: system of equations question  Les Wright  06112012 This is the way I think about it.
In pencil and paper approaches I would just put the original system in standard form, create the 5x3 augmented matrix, and do a classical Gaussian elimination to get rowechlelon form. If there are solutions in the general problem this gives the third row as a linear equation in two of the unknowns. Solve this for one unknown with respect to the other, and backsubstitute. How the final solution vector looks depends on which variable is set as the parameter. Looks like TINSpire was thinking along the lines of C.Ret and chose h, setting it to an arbitrary symbolic constant.
Re: system of equations question  Gilles Carpentier  06112012 I remember the same things ;) We can solve this in (almost) 2 ways on the 50G, and get the parametric equation of a line in a 3D space :
['x + y/4 = 11' or with matrix (RPN mode):
Both return :
[ 'x=5*h' 'y=(20*h44)' 'z=(175*h220)/3' ]
Re: system of equations question  Les Wright  06122012 I think your s parameter is bound to unity, not any value. Substitute the results for x and y into the first equation of the original system. LHS = 11s, but RHS = 11. Ergo, s =1. The original system in four variables is underdetermined by one equation. As I understand it, if those three equations are linearly independent, so that that the system does not actually reduce to two or even one equation, we need only one arbitrary parameter.
Les
Re: system of equations question  C.Ret  06132012 You are perfectly right, I have to correct my post. I have missed one least step when interpreting the reduce low form matri. As you explain I miss checking dimension (or degre of freedom) there. Thank you a lot.
