Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

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

Search the Archive

Re: Adding equations


Someone asked why Thread did not work with eq1 - eq2 of eq1 / eq2.  
FullForm is useful here:

In[46]:=
e1 = a == b;
e2 = c == d;
e3 = Thread[e1-e2,Equal]

Out[46]=
a-(c==d)==b-(c==d)

In[47]:=
FullForm[%]

Out[47]//FullForm=
Equal[Plus[a,Times[-1,Equal[c,d]]],Plus[b,Times[-1,Equal[c,d]]]]

In[48]:=
e1 = a == b;
e2 = c == d;
e3 = Thread[e1 + Thread[-e2,Equal],Equal]

Out[48]=
a-c==b-d

In[49]:=
e1 = a == b;
e2 = c == d;
e3 = Thread[e1 /e2,Equal]

Out[49]=
a/(c == d) == b/(c == d)

In[50]:=
FullForm[%]

Out[50]//FullForm=
Equal[Times[a,Power[Equal[c,d],-1]],Times[b,Power[Equal[c,d],-1]]]

In[51]:=
e1 = a == b;
e2 = c == d;
e3 = Thread[e1 * Thread[1/e2,Equal],Equal]

Out[51:=
a/c == b/d


  • Prev by Date: Re: FactorInteger
  • Next by Date: Re: Two programming challenges
  • Previous by thread: Re: Adding equations
  • Next by thread: Re: Adding equations