Re: Modifying equations
- To: mathgroup at smc.vnet.net
- Subject: [mg59167] Re: [mg59135] Modifying equations
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Sun, 31 Jul 2005 01:30:41 -0400 (EDT)
- Reply-to: hanlonr at cox.net
- Sender: owner-wri-mathgroup at wolfram.com
eqn1=a==b; eqn2=c==d; Thread[eqn1+eqn2, Equal] a + c == b + d Off[Sum::itform]; combSum=Sum[x_,iter_]+Sum[y_,iter_]:>Sum[x+y,iter]; On[Sum::itform]; Sum[a[i],{i,0,n}]+Sum[b[i],{i,0,n}]/.combSum Sum[a[i] + b[i], {i, 0, n}] Bob Hanlon > > From: "Kalle Rutanen" <kalle_rutanen at nospam.hotmail.com> To: mathgroup at smc.vnet.net > Date: 2005/07/30 Sat AM 01:25:07 EDT > Subject: [mg59167] [mg59135] Modifying equations > > Hello > > My intention is to write a mathematical paper which derives results step by > step. So here is my first question: > > Given the equations > eqn1 = a == b > eqn2 = c == d > > How can I combine these to form (for example) > a + c == b + d ? > > I tried the obvious eqn1 + eqn2, but that does not seem to work... > > Second question: > > Given this: > Sum[a_i, {i, 0, n}] + Sum[b_i, {i, 0, n}] > How can I make Mathematica combine the sums giving: > Sum[a_i + b_i, {i, 0, n}] ? > > Thanks. > > >