<s>[INST] Calculate Indefinite Integral $\int \frac{x^5(1-x^6)}{(1+x)^{18}}dx$ The following integration is given by Wolfram Alpha
$$\int \frac{x^5(1-x^6)}{(1+x)^{18}}dx=\frac{x^6(28x^4+16x^3+39x^2+16x+28)}{168(1+x)^{16}}.$$
My question is: what is the best (meaning least work), method to achieve this result by hand ? There are two approaches I see, partial fractions, maybe setting $y=1+x$, but this is still alot of work. Or perform successive integration by parts. Both still involve a lot of calculation. The compact form of the answer makes me hope there is a nice way to achieve it. Guessing the ultimate form and then calculating the derivative is, to me, a less desirable method.
 [/INST] We have the following : \begin{aligned}\frac{x^{5}\left(1-x^{6}\right)}{\left(1+x\right)^{18}}&=\frac{\left(1+x-1\right)^{5}}{\left(1+x\right)^{18}}-\frac{\left(1+x-1\right)^{11}}{\left(1+x\right)^{18}}\\ &=\frac{\sum\limits_{k=0}^{5}{\left(-1\right)^{k}\binom{5}{k}\left(1+x\right)^{5-k}}}{\left(1+x\right)^{18}}-\frac{\sum\limits_{k=0}^{11}{\left(-1\right)^{k}\binom{11}{k}\left(1+x\right)^{11-k}}}{\left(1+x\right)^{18}}\\ \frac{x^{5}\left(1-x^{6}\right)}{\left(1+x\right)^{18}}&=\sum_{k=0}^{5}{\binom{5}{k}\frac{\left(-1\right)^{k}}{\left(1+x\right)^{13+k}}}-\sum_{k=0}^{11}{\binom{11}{k}\frac{\left(-1\right)^{k}}{\left(1+x\right)^{7+k}}}\end{aligned}
Thus : $$ \int{\frac{x^{5}\left(1-x^{6}\right)}{\left(1+x\right)^{18}}\,\mathrm{d}x}=\sum_{k=0}^{5}{\binom{5}{k}\frac{\left(-1\right)^{k+1}}{\left(12+k\right)\left(1+x\right)^{12+k}}}-\sum_{k=0}^{11}{\binom{11}{k}\frac{\left(-1\right)^{k+1}}{\left(6+k\right)\left(1+x\right)^{6+k}}}+C $$
The common denominator is clearly $ \left(1+x\right)^{17} $, so I guess, we could explicit the sums above, simplify and factor, then we'll get the result.
</s>