Re: Combining Fractions with Identical Denominator?

*To*: mathgroup at smc.vnet.net*Subject*: [mg81043] Re: Combining Fractions with Identical Denominator?*From*: Valeri Astanoff <astanoff at gmail.com>*Date*: Sat, 8 Sep 2007 04:01:53 -0400 (EDT)*References*: <fbqq2m$6p4$1@smc.vnet.net>

On 7 sep, 08:11, "Jung-Tsung Shen" <jus... at gmail.com> wrote: > I have a sum of a series of fractions (symbolic) of about 50 terms. > How can I have Mathematica to sum up those with the same denominator? > By inspection, there are about 5 different denominators. I have wrote > a simple rule to compare the denominator term by term, but it's rather > slow. Moreover, sometimes the denominators differ only with a +/- > sign, a numerical factor (say, 1/2), or a complex i. > > In mathematical terms, I have a series in the following form (the > number of terms can vary): > > N1/D1 + N2/D2 + ... + N50/D50 > > These Di's form 5 different groups. Within each group, there are > proportional to each other. How could I sum up this series such that > those terms with Di in the same group is summed? > > Thanks for any input. > > JT Good day, I would use "Collect" this way (example): In[1]:=ff = n1/(d1 + d2) + n2/d3 + n3/(2*d3) + (n4 + n5)/(I*(d1 + d2)); In[2]:=dd = List @@ Denominator[Together[ff]] Out[2]={2, d1 + d2, d3} In[3]:=Collect[ff, dd] Out[3]=(n2 + n3/2)/d3 + (n1 - I*(n4 + n5))/(d1 + d2) V.Astanoff