RE: Re: Solving an equation
- To: mathgroup at smc.vnet.net
- Subject: [mg34516] RE: [mg34476] Re: Solving an equation
- From: "DrBob" <majort at cox-internet.com>
- Date: Fri, 24 May 2002 02:42:30 -0400 (EDT)
- Reply-to: <drbob at bigfoot.com>
- Sender: owner-wri-mathgroup at wolfram.com
PSi, You've changed the problem by making b diagonal. The same solution technique works even if you hadn't done that... but gives a solution that involves division by b3 (which you've now made 0). Hence the solution for non-diagonal b doesn't include the other solution as a special case. Also, with diagonal b, notice that unless c is diagonal as well, the condition c.b==b.c implies b1==b4. (Evaluate c.b-b.c to see what I mean.) Yet the solution involves division by b1-b4. Hence this solution is valid only if c is also diagonal. You can verify this as follows: a = {{1, 0}, {0, 1}}; b = {{b1, 0}, {0, b4}}; c = {{c1, c2}, {c3, c4}}; Solve[{a x + b y == c, c.b == b.c}, {x, y, c2, c3}] {{c2 -> 0, c3 -> 0, x -> -((b4*c1 - b1*c4)/ (b1 - b4)), y -> -((-c1 + c4)/ (b1 - b4))}} By the way, b.c - c.b {{0, b1 c2 - b4 c2}, {-b1 c3 + b4 c3, 0}} Rather than making b or c diagonal, you might solve for b2 and b3 this way: b = {{b1, b2}, {b3, b4}}; c = {{c1, c2}, {c3, c4}}; Solve[{c.b == b.c}, {b2, b3}] {{b2 -> ((b1 - b4)*c2)/ (c1 - c4), b3 -> ((b1 - b4)*c3)/(c1 - c4)}} In general... I think there's more going on here than you've realized. Bobby Treat -----Original Message----- From: PSi [mailto:psino at tee.gr] To: mathgroup at smc.vnet.net Subject: [mg34516] [mg34476] Re: Solving an equation Nevermind, it's simple! a = {{1, 0}, {0, 1}} b = {{b1, 0}, {0, b4}} c = {{c1, c2}, {c3, c4}} Solve[{a x + b y == c, c.b == b.c}, {x, y}] "PSi" <psino at tee.gr> wrote in message news:... > > 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? > > > > > > >