Re: Related quastions. Question 2
- To: mathgroup at smc.vnet.net
- Subject: [mg57586] Re: [mg57499] Related quastions. Question 2
- From: DrBob <drbob at bigfoot.com>
- Date: Wed, 1 Jun 2005 06:04:06 -0400 (EDT)
- References: <200505300100.VAA26812@smc.vnet.net>
- Reply-to: drbob at bigfoot.com
- Sender: owner-wri-mathgroup at wolfram.com
Who's Bob? Bobby On Sun, 29 May 2005 21:00:18 -0400 (EDT), Kazimir <kazimir04 at yahoo.co.uk> wrote: > Dear Bob, > > you gave the example > > Print["Equation to solve for x"] > a x + b == c > Print["Subtract b from each side"] > # - b & /@ %% > Print["Divide each side by a"] > #/a & /@ %% > > It works but i do not like very much expressions with %%, as I should > not insert more lines before it or I have to modify this symbol. I > would like to start with > > expr= (a x + b == c) > > and then make a transform like expr1 = expr - b. It clearly does not > work. Could you advise me a mathematical operartion over expression > which would return a x == c - b . > > The best thing I found was > expr = (a x + b == c) > Distribute[#1 - b &@expr, Equal] > however, it does not work in all cases that I need. > > Vlad > > > > -- DrBob at bigfoot.com