Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2013

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

Search the Archive

Re: Differencing two equations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg129755] Re: Differencing two equations
  • From: Ray Koopman <koopman at sfu.ca>
  • Date: Mon, 11 Feb 2013 04:35:52 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <kf7m3q$fgi$1@smc.vnet.net>

On Feb 10, 12:35 am, g.c.b.at.h... at gmail.com wrote:
> I'm brand new to Mathematica, so I apologize for the naive questions...
>
> I'm trying to figure out how to difference two equations.  Basically if I have:
> a==r
> b==s
>
> I'd like to get:
> a-b == r-s
>
> What I'm getting is more like (a==r) - (b==s).  I'm not sure how that's a useful result, but is there a function to do what I'm looking for?
>
> A quick search of the archives seem to bring up ways of doing this from using transformation rules to swap heads to unlocking the Equals operator and hacking its behavior.  I'd like to avoid doing that kind of rewiring for a simple operation, and I'd like to keep the syntax clean.
>
> The Core Language documentation makes a big point of how everything is basically a list with different heads.  In this case, what I'm trying to do would work if it were treated as a list ({a,b}-{r,s} returns {a-b,r-s}) but doesn't work under Equal.
>
> Thanks for any suggestions.

Inner[Subtract, a == r, b == s, Equal]

a - b == r - s



  • Prev by Date: Re: Using a notebook - how to add a caption and ...
  • Next by Date: Re: Differencing two equations
  • Previous by thread: Re: Differencing two equations
  • Next by thread: Re: Differencing two equations