Re: Solving an equation
- To: mathgroup at smc.vnet.net
- Subject: [mg34527] Re: Solving an equation
- From: wempenj at asme.org (JDW)
- Date: Mon, 27 May 2002 01:15:56 -0400 (EDT)
- References: <aci5vg$3c7$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
"PSi" <psino at tee.gr> wrote in message news:<aci5vg$3c7$1 at smc.vnet.net>...
> I want to solve the following equation with Mathematica 4.1:
> a*x+b*y=c
> where x, y are the unknown scalars,
> a={{1,0},{0,1}},
> b={{b1,b2},{b3,b4}},
> c={{c1,c2},{c3,c4}},
> the matrices b, c commute, and the matrix b is not a scalar multiple of the unit
> matrix a.
> Could anybody help?
The problem you are trying to solve is overdetermined you have 4
equations and only 2 varibles. To solve the problme you must determine
some constraint equations.
a = {{1, 0}, {0, 1}};
b = {{b1, b2}, {b3, b4}};
c = {{c1, c2}, {c3, c4}};
eqn = x*a + y*b == c
{{x + b1 y, b2 y}, {b3 y, x + b4 y}} == {{c1, c2}, {c3, c4}}
sol1 = Solve[eqn]
{{c1 -> x + b1 y, c2 -> b2 y, c3 -> b3 y, c4 -> x + b4 y}}
eq1 = c1 == Evaluate[c1 /. sol1[[1, 1]]]
eq2 = c2 == Evaluate[c2 /. sol1[[1, 2]]]
eq3 = c3 == Evaluate[c3 /. sol1[[1, 3]]]
eq4 = c4 == Evaluate[c4 /. sol1[[1, 4]]]
c1 == x + b1 y
c2 == b2 y
c3 == b3 y
c4 == x + b4 y
(*eq1 and eq4 can be sovled for x and y*)
Solve[{eq1, eq4}, {x, y}]
{{x -> (-(b4*c1) + b1*c4)/(b1 - b4),
y -> (c1 - c4)/(b1 - b4)}}
(* eq2 and eq3 can be solved for y)
Solve[{eq2}, y]
(y -> c2/b2)
Solve[{eq3}, y]
(y -> c3/b3)
(* a set of constrain equations can be developed*)
y=c3/b3; y=c2/b2; y= (c1-c4)/(b1-b4)
therfore
c3=c2=(c1-c4)
b3=b2=(b1-b4)
and the follwoing equations can be applied to the inital problem
eq1 = b3 == b1 - b4;
eq2 = c3 == c1 - c4;
eq3 = b2 == b1 - b4;
eq4 = c2 == c1 - c4;
Solve[{eqn, eq1, eq2, eq3, eq4}, {x, y}]
{{x->(-(b4*c1) + b1*c4)/(b1 - b4),y->(c1 - c4)/(b1 - b4)}}
Hope this helps
JDW