New answers tagged

2

I'm going to restrict to the case of rational coefficients. There are ways to extend to complex rational coefficients but that's more than I have time or desire to consider right now. I'll illustrate an efficient methodology with this example. Along the way I will say a bit about modest improvements that can be made. We'll start with the polynomial and the ...


4

I am not sure that this is better, but just as a version: expr1 = (a + m a + b + n b + c + k c + d + e); expr2 = Collect[expr1, {a, b}]; expr3 = Take[expr2, 4]; Map[ReleaseHold, MapAt[Hold, Take[expr2, {5, 6}]/(a*b), {{3, 1}, {3, 2}}] // Apart] + expr3/(a*b) (* (c + d + e + c k)/(a b) + (1 + m)/b + (1 + n)/a *) Have fun!


9

Consider your expression, expr = (a + m a + b + n b + c + k c + d + e)/(a b); This gets us almost where we want to go, Expand@expr (* 1/a + 1/b + c/(a b) + d/(a b) + e/(a b) + (c k)/( a b) + m/b + n/a *) But we have too many terms with the same denominator, so we can use GatherBy to group them, then simplify the sums of terms with the same ...



Top 50 recent answers are included