[Date Index]
[Thread Index]
[Author Index]
Re: 5 variables Guass isnt working, matrix solution
*To*: mathgroup at smc.vnet.net
*Subject*: [mg50465] Re: 5 variables Guass isnt working, matrix solution
*From*: "Dr. Wolfgang Hintze" <weh at snafu.de>
*Date*: Sun, 5 Sep 2004 03:53:41 -0400 (EDT)
*References*: <chbm20$rnt$1@smc.vnet.net>
*Sender*: owner-wri-mathgroup at wolfram.com
Roger,
things normally don't work if you're not using correct Mathematica
syntax. Using it there's no problem solving your set of equations with
standard methods.
Here we go
1) Your equations (notice: the * can be replaced by a space)
In[10]:=
eq1 = 5*a - c - d - e == 0.5;
eq2 = 4*b - c - e == 1;
eq3 = 6*c - a - b - d - e == 1;
eq4 = 4*d - a - c == 1;
eq5 = 5*e - a - b - c == 1.5;
2) more conveniently written as a list
In[15]:=
eq = {eq1, eq2, eq3, eq4, eq5}
Out[15]=
{5*a - c - d - e == 0.5, 4*b - c - e == 1,
-a - b + 6*c - d - e == 1, -a - c + 4*d == 1,
-a - b - c + 5*e == 1.5}
3) Now solving (and taking the first solution, btw. there is only one)
In[16]:=
s = First[Solve[eq]]
Out[16]=
{a -> 0.41304347826086957, c -> 0.5,
d -> 0.47826086956521746, b -> 0.5217391304347826,
e -> 0.5869565217391304}
4) Test if solution is correct
eq /. s
{True, True, True, True, True}
ok.
5) The solution must also be rational. Here we go to get this representation
In[21]:=
Rationalize[s]
Out[21]=
{a -> 19/46, c -> 1/2, d -> 297089030890994/
621186155499351, b -> 12/23, e -> 27/46}
Regards,
Wolfgang
roger wrote:
> 5a-c-d-e =0.5
> 4b-c-e =1
> 6c-a-b-d-e=1
> 4d-a-c =1
> 5e-a-b-c =1.5
>
> Solve for a,b,c,d, and e. Guass inversion isnt working.
>
> Maybe a matrix solution.
>
>
Prev by Date:
**Install Fix for Mathematica 5.0.1 Font on Linux Xorg/Fedora Core2**
Next by Date:
**Re: 5 variables Guass isnt working, matrix solution**
Previous by thread:
**Re: 5 variables Guass isnt working, matrix solution**
Next by thread:
**Re: 5 variables Guass isnt working, matrix solution**
| |