Re: multiple of sum of fraction by common denominator keeps fractions in result
- To: mathgroup at smc.vnet.net
- Subject: [mg41631] Re: [mg41585] multiple of sum of fraction by common denominator keeps fractions in result
- From: Daniel Lichtblau <danl at wolfram.com>
- Date: Thu, 29 May 2003 08:13:58 -0400 (EDT)
- References: <200305280857.EAA09452@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Friedrich Laher wrote: > > In[8]:= > \!\(\(1 - x\)\/\(5*\((1 - 2*x)\)\) - \(2 + x\)\/8 - 4 + \(2*x - > 19\)\/80\ x\) > > Out[8]= > \!\(\(-4\) + 1\/8\ \((\(-2\) - x)\) + \(1 - x\)\/\(5\ \((1 - 2\ x)\)\) + > 1\/80\ x\ \((\(-19\) + 2\ x)\)\) > > In[17]:= > Together[In[8]] > > Out[17]= > \!\(\(324 - 635\ x - 60\ x\^2 + 4\ x\^3\)\/\(80\ \((\(-1\) + 2\ x)\)\)\) > > In[18]:= > %*80*(-1+2x) > > Out[18]= > \!\(324 - 635\ x - 60\ x\^2 + 4\ x\^3\) > > In[19]:= > \!\(Expand[\((\(1 - x\)\/\(5*\((1 - 2*x)\)\) - \(2 + x\)\/8 - > 4 + \(2*x - 19\)\/80\ x)\)*80*\((1 - 2*x)\)]\) > > Out[19]= > \!\(\(-340\) + 16\/\(1 - 2\ x\) + 651\ x - \(48\ x\)\/\(1 - 2\ x\) + > 60\ x\^2 + \(32\ x\^2\)\/\(1 - 2\ x\) - 4\ x\^3\) > > In[20]:= > FullSimplify[Out[19]] > > Out[20]= > -324+x (635-4 (-15+x) x) > > In[21]:= > Expand[%] > > Out[21]= > \!\(\(-324\) + 635\ x + 60\ x\^2 - 4\ x\^3\) > > of what use could Out[1] be, why not directly Out[21] ? The input is a bit hard to parse by eye. Also you refer to Out[1] but your first output shown is Out[8]. In any case I'm guessing you meant Out[19]. It appears that you start with: expr = -4 + (-2 - x)/8 + (1 - x)/(5*(1 - 2*x)) + (x*(-19 + 2*x))/80; You do Expand[expr*80*(-1+2*x)] and want to know why the result is not the same as, say, Expand[Together[expr*80*(-1+2*x)]] If this is indeed your question, the answer is that Expand for rational function input does just multiplication, addition, and expansion of powers. It does not extract gcds or in other respects look for at denominators of subexpressions (as Together would do). So in particular it does it try to recombine subexpressions over common denominators. Keeping in mind that (1-2*x) is a binomial rather than an "atomic" entity, it then becomes clear why those factors of 1-2*x in some denominators do not get cleared. Note that if the multiplier is made atomic as below, they do in fact get cleared. Expand[Expand[expr*a] /. a->80*(1-2*x)] Daniel Lichtblau Wolfram Research
- References:
- multiple of sum of fraction by common denominator keeps fractions in result
- From: Friedrich Laher <mathefritz@schmieder-laher.de>
- multiple of sum of fraction by common denominator keeps fractions in result