MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Adding equations

  • To: mathgroup at
  • Subject: [mg14406] Re: Adding equations
  • From: graciark at (Adam Ciarkowski)
  • Date: Sun, 18 Oct 1998 15:10:10 -0400
  • Organization: IPPT PAN
  • References: <703u1n$>
  • Sender: owner-wri-mathgroup at

In article <703u1n$hup at>, lwalker701 at says...
>Is there a way to elegantly add (sub, mult, div) two equations?  Also is
>there an elegant way to add (sub, mult, div) an expression to both
>sides of an equation?
>Lawrence Walker
One possible approach:
1. Adding (subtracting, multiplying, dividing) of two equations:
In[1]:= Inner[Plus, {a,b}, {c,d}, Equal]
Out[1]= a+c==b+d.
Replace Plus by Subtract, Times or Divide to obtain the three remaining  
operations, respectively.
2. Adding the quantity c  (subtracting, multiplying, dividing)  to each side of the 
equation a==b:
In[2]:= Inner[Plus, {a,b}, {c,c}, Equal]
Out[2]= a+c==b+c
with the same remark as above, or
In[3]:= h[y_][eq_]:=eq+y     (* or  h[y_][eq_]:=eq*y  or  h[y_][eq_]:=eq/y   *)
In[4]:= Map[ h[c], Equal[a,b]] 
Out[4]= a+c==b+c
But is it more elegant than the "natural" approach???...
(remove gr from my e-mail address)

  • Prev by Date: RE: Mesh on graphics3D objects
  • Next by Date: Re: Routines inside Epilog
  • Previous by thread: RE: Adding equations
  • Next by thread: Re: Adding equations