DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Java (http://www.daniweb.com/forums/forum9.html)
-   -   help i need to make a program that has a three equation and three unknown (http://www.daniweb.com/forums/thread141408.html)

jOhN_pRattZ Aug 20th, 2008 10:39 pm
help i need to make a program that has a three equation and three unknown
 
hello im john rico a com sci student could anyone help me to make a program that has three equation and three unknown pls.

sciwizeh Aug 21st, 2008 12:28 am
Re: help i need to make a program that has a three equation and three unknown
 
you mean like this:
x+y+z=18
2x+y+3z=20
5x-y+2z=15

1.
[
 [ 1  1  1 18  ]
 [ 2  1  3 20  ]
 [ 5 -1  2 15  ]
]
2.
[
 [ 1  1  1 18  ]
 [ 0 -1  1 -16 ]
 [ 5 -1  2 15  ]
]
3.
[
 [ 1  1  1 18  ]
 [ 0  1 -1 16  ]
 [ 5 -1  2 15  ]
]
4.
[
 [ 1  1  1 18  ]
 [ 0  1 -1 16  ]
 [ 0 -6 -3 -75 ]
]
5.
[
 [ 1  1  1 18  ]
 [ 0  1 -1 16  ]
 [ 0  0 -9 -171]
]
6.
[
 [ 1  1  1 18  ]
 [ 0  1 -1 16  ]
 [ 0  0  1  19 ]
]
7.
z=19
y=35
x=-36
if so, that would require a massive amount of programming. i intended to do this at one time, but decided against it when i had nearly 200 lines of code that still didn't do anything productive. (that and my precal teacher didn't know how to do certain other things, like determinate of a matrix above 3X3)

EDIT: NOTE: i may have made an error in the previous math, as i cannot prove that those numbers are in fact the right ones, oops :)

jOhN_pRattZ Aug 21st, 2008 3:18 am
Re: help i need to make a program that has a three equation and three unknown
 
hehehe why i know you can do this one hope you can help me as soon as possible and besides your a professor prove it pls i really need your help

VernonDozier Aug 21st, 2008 3:49 am
Re: help i need to make a program that has a three equation and three unknown
 
Quote:

Originally Posted by jOhN_pRattZ (Post 674451)
hehehe why i know you can do this one hope you can help me as soon as possible and besides your a professor prove it pls i really need your help

This post makes no sense. What exactly do you want other than someone to do the entire thing for you and deliver you a finished project?

javaAddict Aug 21st, 2008 4:00 am
Re: help i need to make a program that has a three equation and three unknown
 
Quote:

Originally Posted by jOhN_pRattZ (Post 674319)
hello im john rico a com sci student could anyone help me to make a program that has three equation and three unknown pls.

You can either use Gauss as sciwizeh has suggested,
but if don't know the algorithm you can do it the old fashion way, by solving this equation on paper and programming the results:

a1*x+b1*y+c1*z=q1
a2*x+b2*y+c2*z=q2
a3*x+b3*y+c3*z=q3

By the way you have to show some effort before getting help.
I would suggest to create a method that take as argument the array with the values and return the new modified array

jOhN_pRattZ Aug 21st, 2008 9:50 pm
mark your word you dont know who are you talking to!
 
did i call your name mark my word cause you dont know who are you talking to dont under estimate my knowledge you might see your mistakes soon i suggest you to keep your mouth shot if you dont want to help!!!!

jOhN_pRattZ Aug 21st, 2008 10:47 pm
hey could you give me a formula
 
hello by da way i believe you could give me a formula i know how to do it but unfortunately i dont know the formula could you help pls just a formula

javaAddict Aug 22nd, 2008 3:48 am
Re: mark your word you dont know who are you talking to!
 
Quote:

Originally Posted by jOhN_pRattZ (Post 675205)
did i call your name mark my word cause you dont know who are you talking to dont under estimate my knowledge you might see your mistakes soon i suggest you to keep your mouth shot if you dont want to help!!!!

What do you mean, and to who are you referring to?

As for the formula, describing the Gauss algorithm is very long for this post. But, since I learned it in high school, you should be able to find it in most Math books, or the internet.

Phaelax Aug 22nd, 2008 4:26 am
Re: help i need to make a program that has a three equation and three unknown
 
These might help you solve your equations:

http://www.mathreference.com/la-det,simeq.html

http://www.themathpage.com/alg/simul...quations-3.htm

They explain the method, or "formula" for what you want. All you have to do is implement it.


All times are GMT -4. The time now is 11:17 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC