Author |
Message |
|
MeBeatYou
Member
Joined: 29 Sep 2005 Posts: 178
|
Posted: 28 Oct 2005 12:02:36 pm Post subject: |
|
|
Sorry lol this is my second topic in one day but it came to me. I need a program that can solve 4 x 4 systems of equations. Does anyone know if there is a Cramer's Rule program or anything that can help me solve these? Thanks a lot |
|
Back to top |
|
|
Weregoose Authentic INTJ
Super Elite (Last Title)
Joined: 25 Nov 2004 Posts: 3976
|
Posted: 28 Oct 2005 12:28:01 pm Post subject: |
|
|
Two excellent sources: MathWorld and Wikipedia
For solving a system of linear equations, look up the command [font="courier new"]rref(). [font="courier new"][2nd][x‾¹][►][ALPHA][APPS]
This stands for reduced row echelon form, and is the same idea as the Gauss–Jordan elimination method.
[font="courier new"]2x+y-z=8
ֿ3x-y+2z=ֿ11
ֿ2x+y+2z=ֿ3
This set of equations would appear in the matrix like so...
[font="courier new"][[2,1,ֿ1,8][ֿ3,ֿ1,2,ֿ11][ֿ2,1,2,ֿ3]]
...and when solved, you get:
[font="courier new"][[1 0 0 2 ]
[0 1 0 3 ]
[0 0 1 ֿ1]]
We expect you to post as often as you need help or have something to contribute. |
|
Back to top |
|
|
Jeremiah Walgren General Operations Director
Know-It-All
Joined: 24 May 2003 Posts: 1937
|
Posted: 28 Oct 2005 01:48:33 pm Post subject: |
|
|
TI has also created applications (which are rather pointless in my opinion) that will allow you to enter systems of equations and solve them (plus a couple other things, I think). You can find this app by starting here, clicking on your calculator model in the list to the right and then finding the "Polynomial Root Finder and Simultaneous Equation Solver" app.
Personally, I prefer rref( on the calculator. |
|
Back to top |
|
|
Brazucs I have no idea what my avatar is.
Super Elite (Last Title)
Joined: 31 Mar 2004 Posts: 3349
|
Posted: 28 Oct 2005 04:04:57 pm Post subject: |
|
|
Quote: Sorry lol this is my second topic in one day but it came to me. There isn't a limit on how many topics you can make per day, though people would find it weird if you made 30 new ones all of a sudden . |
|
Back to top |
|
|
Jeremiah Walgren General Operations Director
Know-It-All
Joined: 24 May 2003 Posts: 1937
|
Posted: 28 Oct 2005 05:20:45 pm Post subject: |
|
|
What if each one of those topics contains a totally different subject? (I could do that if I had enough time, you know. But I don't, so I won't.) |
|
Back to top |
|
|
MeBeatYou
Member
Joined: 29 Sep 2005 Posts: 178
|
Posted: 28 Oct 2005 05:44:29 pm Post subject: |
|
|
well i made my own program today to solve 3 x 3 systems by
A.) Elimination
B.) Substitution
C.) Cramer's Rule
D.) Matrices
Now, i need the same thing on 4 x 4 systems only. I want to input all the vars and then just have it tell me the w, x, y, z points. |
|
Back to top |
|
|
aforsy the leaping penguin
Active Member
Joined: 13 Jul 2004 Posts: 653
|
Posted: 28 Oct 2005 06:14:28 pm Post subject: |
|
|
someone should move this to the spiffy new math help forum. |
|
Back to top |
|
|
Fr0sty
Member
Joined: 27 Nov 2003 Posts: 202
|
Posted: 28 Oct 2005 09:57:44 pm Post subject: |
|
|
Isn't this just the make a matrix and [Matrix]^-1? It's been such a long time since I've solved system of equations though, but isn't that what it is? |
|
Back to top |
|
|
thornahawk μολών λαβέ
Active Member
Joined: 27 Mar 2005 Posts: 569
|
Posted: 28 Oct 2005 10:40:07 pm Post subject: |
|
|
If anyone's interested in my take on methods to solve linear equations:
Cramer's Rule: Useful for hand calculation with small systems (<4), but otherwise a profligate waste of computing time. Let me put it this way: the effort in solving an n variable equation in this manner would take ~ n! operations. Baaaad.
Compute matrix inverse before multiplying: About ~n^3 operations are needed for this. I'd use it were it not for the fact that there are (slightly) faster ways, and that this is prone to roundoff error.
rref() (a.k.a. Gaussian elimination). The standard method in all high-end linear equation solvers. Also ~n^3 operations, but this is slightly faster than multiplying the inverse, and less prone to roundoff besides.
I deliberately made my explanations sketchy, because this post would be insanely long if I put in all the details. But if you ask for 'em... I could recommend a few nice books. :)
thornahawk
P.S. Although, if you're not going beyond 10 variables, I suppose the distinctions I gave earlier wouldn't really matter much. |
|
Back to top |
|
|
Darth Android DragonOS Dev Team
Bandwidth Hog
Joined: 31 May 2003 Posts: 2104
|
Posted: 31 Oct 2005 07:25:03 pm Post subject: |
|
|
I use the computed inverse method and can't see how a round off error would occur unless you rounded your multiplication (TI handles 14 digits of precision) |
|
Back to top |
|
|
chipmaster
Active Member
Joined: 21 Sep 2005 Posts: 601
|
Posted: 31 Oct 2005 07:38:53 pm Post subject: |
|
|
Darth Android wrote: I use the computed inverse method and can't see how a round off error would occur unless you rounded your multiplication (TI handles 14 digits of precision)
[post="60138"]<{POST_SNAPBACK}>[/post]
Plus those 2 extra bytes (10 and 11) for further math precision |
|
Back to top |
|
|
Darth Android DragonOS Dev Team
Bandwidth Hog
Joined: 31 May 2003 Posts: 2104
|
Posted: 31 Oct 2005 08:41:50 pm Post subject: |
|
|
Yup. And because the calc uses the same number format for rref(), those limitations will affect it as well. |
|
Back to top |
|
|
thornahawk μολών λαβέ
Active Member
Joined: 27 Mar 2005 Posts: 569
|
Posted: 02 Nov 2005 03:53:04 am Post subject: |
|
|
I was expecting just that kind of question. :)
The effect of roundoff is actually more of a problem-by-problem basis. Simply put, some problems are well-conditioned: small changes in the input correspond to small changes in the output; others are ill-conditioned. You get my drift. ;)
In the theory of solving linear equations, there is such a quantity called the "condition number" that is a measure of just how much of a badass problem were you asking the algorithm to solve. Larger values mean your problem is ill conditioned. There's a facility for computing it in Matlab and Mathematica, and I have written a TI-BASIC program that will estimate it. I will post upon request. :)
ANYWAY, here's the meat: TI calculators, to my knowledge, use Gaussian elimination both for rref() and matrix inversion. Matrix inversion of, say matrix [A], would then be equivalent to rref(augment([A], identity(N))) where N is the dimension of the square matrix [A], and extracting the submatrix to the right. Now, when you're computing the inverse for solving equations, you have two possible sources of roundoff: computing the inverse and multiplying with the appropriate vector. On the other hand, with rref(), you're directly working with the vector, so there's only one way that roundoff can foul up your computation.
Now, what does this have to do with my rambling above regarding the condition number? Simply put, if your matrix is "well-conditioned", there shouldn't be much problem with both methods. But, if you're unlucky enough to be faced with stuff like Hilbert matrices, it's slightly better to use rref() than computing the inverse.
My discussion above would be too short to fully explain the theory of Gaussian elimination, but I hope the gist is there. I must mention that most books on numerical linear algebra devote at least one whole chapter to Gaussian elimination, and why it works well for some matrices and fouls up on others.
thornahawk
P.S. Besides, computing the inverse before multiplying needs more operations than doing rref() on the augmented matrix. |
|
Back to top |
|
|
MeBeatYou
Member
Joined: 29 Sep 2005 Posts: 178
|
Posted: 02 Nov 2005 12:37:52 pm Post subject: |
|
|
Incase anyone was in the same boat as me, I figured out how to do this. Im not going to go through my code just give a basic run down.
First, go to Matrix and edit matrix [A] (or any other you wish). If you have a 4 x 4 system you would make it a 4 x 4 box and enter the numbers as they go. If you have a 3 x 3 system, you would make [A] a 3 x 3 matrix... well you get the point.
Then you make a second matrix for everything that comes after the equals sign. In a 4 x 4 system, the second matrix would be a (in terms of [B]) 4 x 1 matrix. In this, you would then enter the numbers as they go.
Once you have finished your two matrices, you go to Matrix, Names, and select your first matrix ([A] in my tutorial). Then you hit the (x-1) button on your calculator. Next, go into the matrix again and select your second matrix ([B] in my tutorial). Press enter and you now have your values for all variables in order.
I also have a program on my calculator to solve a X by X system of equations by either matrices or cramers rule if anybody interested?
Thanks for the help |
|
Back to top |
|
|
elfprince13 Retired
Super Elite (Last Title)
Joined: 11 Apr 2005 Posts: 3500
|
Posted: 02 Nov 2005 01:28:07 pm Post subject: |
|
|
MeBeatYou wrote: Incase anyone was in the same boat as me, I figured out how to do this. Im not going to go through my code just give a basic run down.
First, go to Matrix and edit matrix [A] (or any other you wish). If you have a 4 x 4 system you would make it a 4 x 4 box and enter the numbers as they go. If you have a 3 x 3 system, you would make [A] a 3 x 3 matrix... well you get the point.
Then you make a second matrix for everything that comes after the equals sign. In a 4 x 4 system, the second matrix would be a (in terms of [B]) 4 x 1 matrix. In this, you would then enter the numbers as they go.
Once you have finished your two matrices, you go to Matrix, Names, and select your first matrix ([A] in my tutorial). Then you hit the (x-1) button on your calculator. Next, go into the matrix again and select your second matrix ([B] in my tutorial). Press enter and you now have your values for all variables in order.
I also have a program on my calculator to solve a X by X system of equations by either matrices or cramers rule if anybody interested?
Thanks for the help
[post="60272"]<{POST_SNAPBACK}>[/post]
I should have read this earlier.....I knew that. We learned how to do that in 7th grade. |
|
Back to top |
|
|
MeBeatYou
Member
Joined: 29 Sep 2005 Posts: 178
|
Posted: 02 Nov 2005 06:13:17 pm Post subject: |
|
|
Wow... thanks :hmpf:
I've been trying to do that forever and we haven't learned about matrices until this year and I didn't make the connection between 2 x 2 systems and ? x ? systems heh |
|
Back to top |
|
|
|