View previous topic :: View next topic |
Author |
Message |
scap1784 Apprentice
Joined: 25 Dec 2002 Posts: 225
|
Posted: Wed Jul 23, 2003 6:47 pm Post subject: math program???? |
|
|
My evil math professor decided to give us a problem that comes down to solveing a system of equations in which the system is 5 equations for 5 variables. I know how to do this on my claculator however my calculator is 35 min in to the problem and I am tired of looking at the little "busy" in the coner. Anyways I know linux is good for doing math computations and i was wondering if anyone knows of a program to get the answer to my problem. I have tired working it by hand and even my prof said good luck so i am just waiting now i guess. |
|
Back to top |
|
|
Skip.za Tux's lil' helper
Joined: 19 May 2003 Posts: 110 Location: Cape Town, South Africa
|
Posted: Wed Jul 23, 2003 7:14 pm Post subject: |
|
|
I would suggest using Octave. It's a Matlab compatible language and will have all matrix operations needed to solve linear equations. |
|
Back to top |
|
|
odegard Guru
Joined: 08 Mar 2003 Posts: 324 Location: Trondheim, NO
|
Posted: Wed Jul 23, 2003 9:09 pm Post subject: |
|
|
How far are you in math? 5 equations with 5 variables are childplay. 10 equations with 10 variables too. Do you know how to use a matrix? I don't remember exactly how atm but I could dig it up for you. Do it by hand, it will be faster.
Odegard
EDIT: Oh yeah, it has something to do with reducing the matrix. Hm...there was a method for this...arg, I don't remember the name, but it's simple! |
|
Back to top |
|
|
Vanquirius Retired Dev
Joined: 14 Jun 2002 Posts: 1297 Location: Ethereal plains
|
Posted: Wed Jul 23, 2003 9:19 pm Post subject: |
|
|
odegard wrote: | Oh yeah, it has something to do with reducing the matrix. Hm...there was a method for this...arg, I don't remember the name, but it's simple! |
row reduced echelon form? _________________ Hello. |
|
Back to top |
|
|
SIR n00b
Joined: 12 Jun 2003 Posts: 71 Location: DMCA and RIAA Land
|
Posted: Wed Jul 23, 2003 9:21 pm Post subject: |
|
|
odegard wrote: | How far are you in math? 5 equations with 5 variables are childplay. 10 equations with 10 variables too. Do you know how to use a matrix? I don't remember exactly how atm but I could dig it up for you. Do it by hand, it will be faster.
|
Indeed, use a matrix. I'd use my HP instead of by hand, tho! |
|
Back to top |
|
|
odegard Guru
Joined: 08 Mar 2003 Posts: 324 Location: Trondheim, NO
|
Posted: Wed Jul 23, 2003 9:49 pm Post subject: |
|
|
ManuChao wrote: | odegard wrote: | Oh yeah, it has something to do with reducing the matrix. Hm...there was a method for this...arg, I don't remember the name, but it's simple! |
row reduced echelon form? |
No, actually I was thinking of the Gauss-Jordan method. Maybe you'll *end up with* what is called a row reduced echelon form, but I don't remember and names aren't important. Check this url for an introduction.
http://home.xnet.com/~fidler/triton/math/review/mat124/sys/gj/gj1.htm
google is your friend
Odegard |
|
Back to top |
|
|
daen1543 Tux's lil' helper
Joined: 15 Feb 2003 Posts: 85 Location: Berkeley, CA, USA
|
Posted: Wed Jul 23, 2003 10:01 pm Post subject: |
|
|
I don't think his calculator would take this long for a system of linear equations. Now, if those are 5 nonlinear equations, then yes, the system's a bitch to solve, unless you see a very clever solution. |
|
Back to top |
|
|
Xargon Tux's lil' helper
Joined: 02 Apr 2003 Posts: 89 Location: State College, PA, USA
|
Posted: Thu Jul 24, 2003 2:12 am Post subject: |
|
|
Are these algebraic or differential equations? _________________ Shhh. Gravity at work. |
|
Back to top |
|
|
Qubax Guru
Joined: 19 Jul 2002 Posts: 451 Location: Tirol, Austria
|
Posted: Thu Jul 24, 2003 2:21 pm Post subject: |
|
|
partial differntial equations in 5 varialbes would be more interesting |
|
Back to top |
|
|
pizen Apprentice
Joined: 23 Jun 2002 Posts: 213 Location: Atlanta, GA, USA
|
Posted: Thu Jul 24, 2003 2:33 pm Post subject: |
|
|
odegard wrote: | No, actually I was thinking of the Gauss-Jordan method. Maybe you'll *end up with* what is called a row reduced echelon form, but I don't remember and names aren't important. |
Yeah, Gaussian elimination results in row reduced echelon form...I think...it's been awhile. |
|
Back to top |
|
|
carambola5 Apprentice
Joined: 10 Jul 2002 Posts: 214
|
Posted: Thu Jul 24, 2003 5:41 pm Post subject: |
|
|
You guys are assuming that the system is a linear system. Maybe that's not the case. If it isn't a linear system, then your techniques will not work.
However, if it is a linear system, an easier way is to plug the matrix of coefficients into your calculator and take the inverse of the matrix. For example, with a 2-variable system:
Code: | |a b| |x| = |m|
|c d| |y| = |n|
|x| = |a b|-1 |m|
|y| = |c d| |n| |
|
|
Back to top |
|
|
ruronikenshin83 n00b
Joined: 25 Mar 2003 Posts: 42
|
Posted: Fri Jul 25, 2003 1:16 am Post subject: |
|
|
Yea, if it's linear, definitely plug it into a matrix and do Gauss-Jordan, but do it by hand... it's the only way to learn. ^_^
I agree though, if it were five partial differential equations, it would be a lot more interesting. Although, you can still solve PDE's (as well as ODE's -- ordinary differential equations) using a matrix and doing Gauss-Jordan. Once again, assuming that the equations are linear. |
|
Back to top |
|
|
asimon l33t
Joined: 27 Jun 2002 Posts: 979 Location: Germany, Old Europe
|
Posted: Fri Jul 25, 2003 8:57 am Post subject: |
|
|
I like MuPAD and used it during my Analysis classes. If you register you can get a free lisence for personal use. The program is like Maple or Mathematica. |
|
Back to top |
|
|
dvink n00b
Joined: 12 Apr 2003 Posts: 55
|
Posted: Fri Jul 25, 2003 1:26 pm Post subject: |
|
|
Solutions to a set of linear equations Ax=y is very simple. First check whether the map x->Ax is "bijective", that is, "one-to-one and onto" , if so, then you can use elimination techniques to find the inverse A^-1. Do not use Cramers rule since it is highly inefficient! |
|
Back to top |
|
|
spectatorion n00b
Joined: 12 Jul 2003 Posts: 35
|
Posted: Sat Jul 26, 2003 12:24 am Post subject: I Second GNU Octave |
|
|
GNU Octave is exactly what you're looking for (for Free). It issomething like a 90% clone of matlab, and it definitely has the capability for matrix computations, solving linear equations, and other linear algebra stuff.
references:
http://www.octave.org/doc/octave_2.html#SEC8 for entering a matrix (A is a 5x5 matrix, b is a 5x1 matrix)
http://www.octave.org/doc/octave_2.html#SEC10 for solving the system.
once you have the data entered, it should take less than a second to compute the result. |
|
Back to top |
|
|
nngs n00b
Joined: 01 Oct 2002 Posts: 48
|
|
Back to top |
|
|
Duck-Billed Platypus Guru
Joined: 30 Jun 2003 Posts: 576 Location: Los Angeles, California, United States of America
|
Posted: Sun Jul 27, 2003 9:47 pm Post subject: |
|
|
I'd just do it by hand, even if it takes a long time. I don't like to use calculators, unless they're not electronic, like abacuses and slide rules . There's also the satisfaction of knowing that you actually did something.
I have a thing against electronic calculators, so I try not to use them, unless it's for the nice little graphics on my big fat graphing calculator my dad bought me about a year ago... _________________ Dentists are evil. |
|
Back to top |
|
|
odegard Guru
Joined: 08 Mar 2003 Posts: 324 Location: Trondheim, NO
|
Posted: Sun Jul 27, 2003 9:51 pm Post subject: |
|
|
I have nothing against using my calculator which I bought for my own hard-earned cash through blood and tears.
It's a TI89 which I bought 6 years ago I think. Great! |
|
Back to top |
|
|
scap1784 Apprentice
Joined: 25 Dec 2002 Posts: 225
|
Posted: Sun Jul 27, 2003 10:32 pm Post subject: |
|
|
First of all these aren't simple linear eq. They are all partial derivatives of V=BWH+y(BW+BH+WH-750)+u(B+W+H-50) I am trying to solve for the maxes and mins to find the maximum and minimum volume with the given constraints. Can that Octave prog do this?? |
|
Back to top |
|
|
shimage n00b
Joined: 18 Jul 2003 Posts: 48
|
Posted: Mon Jul 28, 2003 12:20 am Post subject: |
|
|
scap1784 wrote: | First of all these aren't simple linear eq. They are all partial derivatives of V=BWH+y(BW+BH+WH-750)+u(B+W+H-50) I am trying to solve for the maxes and mins to find the maximum and minimum volume with the given constraints. Can that Octave prog do this?? |
Your notation has me thoroughly confused, but keep in mind that octave is good for 1) things that need matrices (i.e. anything linear), and 2) numerical methods. I take it you've never used Matlab before? Octave is basically the same thing, except graphing is a bit more confusing (since to do anything useful, you really should know how to use gnuplot...).
If you need a CAS (Computer Algebra System), try Maxima or MuPAD. |
|
Back to top |
|
|
scap1784 Apprentice
Joined: 25 Dec 2002 Posts: 225
|
Posted: Mon Jul 28, 2003 1:20 am Post subject: |
|
|
V is a function for volume. There are two constraints on the volume so by useing Lagrange multipliers i came up with the above equation which my prof has said was right. The i come up with five equations by taking the partial derivitive of each of the variables. Then i set each of the equations equal to zero and try to solve for the variables to find the critical values. |
|
Back to top |
|
|
Duck-Billed Platypus Guru
Joined: 30 Jun 2003 Posts: 576 Location: Los Angeles, California, United States of America
|
Posted: Mon Jul 28, 2003 2:27 am Post subject: |
|
|
I have no idea what you are talking about, but I'm sure that there is a way to do this by hand. I'd prefer doing it by hand, unless humungous calculations are involved, and then I'd use a calculator for that... _________________ Dentists are evil. |
|
Back to top |
|
|
odegard Guru
Joined: 08 Mar 2003 Posts: 324 Location: Trondheim, NO
|
Posted: Mon Jul 28, 2003 2:50 am Post subject: |
|
|
What are the constraints? Too me it lookes like V=volum, B=breadth, H=height and L=length. |
|
Back to top |
|
|
scap1784 Apprentice
Joined: 25 Dec 2002 Posts: 225
|
Posted: Mon Jul 28, 2003 3:13 am Post subject: |
|
|
yea there is a way to do this by hand just bust out a multivarible calculus book and check out Lagrange multipliers and it will tell you how. I have tried it by hand but when it comes to trying to solve the system of equations i just can't do it. Now the constraints are that the rectangluar box has a surface area that is 1500 cm^2 and total edge length is 200 cm. |
|
Back to top |
|
|
Qubax Guru
Joined: 19 Jul 2002 Posts: 451 Location: Tirol, Austria
|
Posted: Mon Jul 28, 2003 7:54 am Post subject: |
|
|
can you post the indication of the problem?
i still don't understand the given problem really. maybe with some background ...
cause there is always more than one way to calculate something, maybe we can find a easier solution |
|
Back to top |
|
|
|