Re: 5 variables Guass isnt working, matrix solution
- To: mathgroup at smc.vnet.net
- Subject: [mg50470] Re: [mg50456] 5 variables Guass isnt working, matrix solution
- From: DrBob <drbob at bigfoot.com>
- Date: Sun, 5 Sep 2004 03:53:45 -0400 (EDT)
- References: <159.3e690509.2e6b3260@aol.com>
- Reply-to: drbob at bigfoot.com
- Sender: owner-wri-mathgroup at wolfram.com
Here's another solution:
Clear[a, b, c, d, e]
m = {5a - c - d - e == 1/2,
4b - c - e == 1, 6c - a - b - d - e == 1, 4d - a - c == 1,
5e - a - b - c == 3/2};
variables = Variables /@ m[[All, 1]] // Flatten // Union
{a, b, c, d, e}
MatrixForm[matrix = Outer[Coefficient, m[[All, 1]], variables]]
MatrixForm[{{5, 0, -1, -1,
-1}, {0, 4, -1, 0, -1},
{-1, -1, 6, -1, -1},
{-1, 0, -1, 4, 0},
{-1, -1, -1, 0, 5}}]
MatrixForm[inverse = Inverse@matrix]
MatrixForm[{{393/1610, 57/1610, 1/14, 127/1610, 113/1610},
{57/1610, 463/1610, 1/14, 43/1610, 127/1610},
{1/14, 1/14, 3/14, 1/14, 1/14},
{127/1610, 43/1610, 1/14, 463/1610, 57/1610},
{113/1610, 127/1610, 1/14, 57/1610, 393/1610}}]
rhs = m[[All, -1]]
{1/2, 1, 1, 1, 3/2}
inverse.rhs
{19/46, 12/23, 1/2, 11/23, 27/46}
Bobby
On Sat, 4 Sep 2004 10:59:44 EDT, <Rvald at aol.com> wrote:
> Dear Dr. Bob,
>
> How did you get 46 in the denominator?
>
> Roger V.
>
>
> In a message dated 9/4/2004 3:53:47 AM Central Standard Time,
> drbob at bigfoot.com writes:
> 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
>
> {{a -> 0.413043, c -> 0.5, d -> 0.478261, b -> 0.521739, e -> 0.586957}}
>
> or
>
> {5a - c - d - e == 1/2,
> 4b - c - e == 1,
> 6c - a - b - d - e == 1,
> 4d - a - c == 1,
> 5e - a - b - c == 3/2} // Solve
>
> {{a -> 19/46, c -> 1/2,
> d -> 11/23, e -> 27/46,
> b -> 12/23}}
>
> Bobby
>
> On Sat, 4 Sep 2004 01:43:44 -0400 (EDT), roger <roger at banditorange.com> 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.
>>
>>
>>
>
>
>
--
DrBob at bigfoot.com
www.eclecticdreams.net