Re: solve and simplify. force left hand side to be 0==
- To: mathgroup at smc.vnet.net
- Subject: [mg51171] Re: solve and simplify. force left hand side to be 0==
- From: Paul Abbott <paul at physics.uwa.edu.au>
- Date: Thu, 7 Oct 2004 05:25:51 -0400 (EDT)
- Organization: The University of Western Australia
- References: <ck0bv6$nuk$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In article <ck0bv6$nuk$1 at smc.vnet.net>, sean kim <sean_incali at yahoo.com> wrote: > consider a system such as, > > sde = { > 0==v1-d1 e[0]+k2 es[0]-k1 e[0] s[0], > 0==-k2 es[0]-k3 es[0]+k1 e[0] s[0], > 0==k3 es[0]-d3 p[0], > 0==v2+k2 es[0]-d2 s[0]-k1 e[0] s[0]}; > > sv = {e[0],es[0],p[0],s[0]}; > > Solve[sde[[1]], e[0]] > > sde1= sde/.% > > %//Simplify > > shows once I simplify the solution, the structure of > 0== stuff... is lost. > > is there anyway to force Simplify to keep the > structure so that left hand side is always 0== stuff? For this particular problem, one way is to apply Simplify (or FullSimplify) at the appropriate level. Instead of sde1 // Simplify try Map[FullSimplify, sde1, {3}] Level {3} is required because sde1 is a list of lists (2 levels), each element of the list is an equation, and you want to apply simplification to each part of the equation. If you want to always get an expression of the form 0 == expression, then the following will work: Map[0 == FullSimplify[Subtract @@ ##] &, sde1, {2}] The idea is to turn each equation into something that must be identically zero, simplify, and re-construct an equation. Cheers, Paul -- Paul Abbott Phone: +61 8 6488 2734 School of Physics, M013 Fax: +61 8 6488 1014 The University of Western Australia (CRICOS Provider No 00126G) 35 Stirling Highway Crawley WA 6009 mailto:paul at physics.uwa.edu.au AUSTRALIA http://physics.uwa.edu.au/~paul