a309@mindlink.UUCP (George Lin) (09/29/90)
This seems like a very simple question, but I have tried for the last 2 days to get my 48SX w/ Equation Card (& Multiple Equation Solver) to solve a simultaneous equation. I can't get the thing to work. simple example: 'A': '1*X+2*Y=3' 'B': '4*X-5*Y=6' 'EQ' { A B } Ok, the correct solution is X=27/13, Y=6/13. Now, the multiple equation solver will not solve for either X or Y (unless one of the two variables is know). Sure, it's easy to solve it by hand. Maybe even rearrange equation 'A' to be Y=f(X). But it gets harder to do when the 2 eqation with 2 unknows are like this: 'A': '1*SIN(X)+2*COS(Y)=3' 'B': '4*SIN(Y)-5*COS(X)=6' 'EQ': { A B } (well, Ok, it's still not too hard to rearrange, but you know what I mean) So, any HP gods out there know how to solve simultaneous equations (on the HP that is)? -------------------------------- George Lin a309@mindlink uunet!van-bc!rsoft!mindlink!George_Lin
frechett@boulder.Colorado.EDU (-=Runaway Daemon=-) (09/30/90)
In article <3343@mindlink.UUCP> a309@mindlink.UUCP (George Lin) writes: >This seems like a very simple question, but I have tried for the last 2 days to >get my 48SX w/ Equation Card (& Multiple Equation Solver) to solve a >simultaneous equation. I can't get the thing to work. >simple example: > > 'A': '1*X+2*Y=3' > 'B': '4*X-5*Y=6' > 'EQ' { A B } > Simple solution for this problem. I have been doing these for the last week with great success. Use the matrix writer. Make these two matrixes. [3 6] [[1 2] [4 -5]] And then simple hit / and boom it gives you [2.07692307692 .461538461538] Do a 2D to dump to stack... (OBJ-> works too ;) then ->Q SWAP ->Q SWAP and I now have '27/13' '6/13' Slick as sh*t. I have been hashing through matrixes in circuits and have managed to do a few good 6 X 6. > Ok, the correct solution is X=27/13, Y=6/13. yep > >But it gets harder to do when the 2 eqation with 2 unknows are like this: Yes and I Don't know what to do with this one because you can only input numeric values into the matrix writer. > > 'A': '1*SIN(X)+2*COS(Y)=3' > 'B': '4*SIN(Y)-5*COS(X)=6' > 'EQ': { A B } > >(well, Ok, it's still not too hard to rearrange, but you know what I mean) > >So, any HP gods out there know how to solve simultaneous equations (on the HP >that is)? I have not run into this type of problem but I would still be interested in the solution. Fun fun fun... > >-------------------------------- >George Lin >a309@mindlink >uunet!van-bc!rsoft!mindlink!George_Lin ian -- -=Runaway Daemon=-
bob@dolores.Stanford.EDU (Bob Lodenkamper) (10/01/90)
A question was asked about solving simultaneous equations with the multiple equation solver. The answer - you can't. The multiple equation solver solves a set of related equations one at a time, for one variable at a time. This is why there is considerable redundancy in the equation library. - Bob
akcs.wiser1@hpcvbbs.UUCP (steven lee wiser) (10/05/90)
Yes you can solve these things if you write the correct program for it. The Newton-Raphson technique is a well known solution to multi-nonlinear simu equations. I have written one and it was written up in the "Fourty Eight Forum". I've tried to upload it here but without success, so I am sorry about that. Steve Wiser Richmond, Va