# Faster way to get a rational integral $\int_2^3 \frac{x^{100}+1}{x^3+1} \, dx$

So my problem is calculating this integral: $$\int_{2}^{3} \frac{x^{100}+1}{x^3+1} \, dx$$ I know it can be done by polynomial division but that is really tedious I would have to divide $\approx 30$ times.

And i know that Mathematica would give me the answer in the blink of an eye.

Is there a clever way to do it pen&paper?

• I would try to use the fact that $x^{100}+x$ is a multiple of $x^3+1$. $$\frac{x^{99}+1}{x^3+1}=x^{96}-x^{93}+\cdots-\cdots-x^3+1.$$ So you need to integrate a polynomial, and the rational function $(-x+1)/(x^3+1)$. That polynomial quotient has over 30 terms, but their regular structure may help. Aug 26, 2016 at 10:22

Well...maybe the division isn't that bad. Do you know about geometric series? What's

$$1 + r + r^2 + \ldots + r^{32}?$$ It's $$\frac{r^{33} - 1}{r-1}$$ If you apply this to $r = -x^3$, you get $$\frac{-x^{99} - 1}{-(x^3)-1} = \frac{x^{99} + 1}{x^3 + 1}$$ I know that's not what you wanted, but if you do a little algebra, you can do this: \begin{align} \frac{x^{100} + 1}{x^3 + 1} &= \frac{x^{100} + x - x + 1}{x^3 + 1}\\ &= \frac{x^{100} + x}{x^3 + 1} + \frac{-x + 1}{x^3 + 1}\\ &= x\frac{x^{99} + 1}{x^3 + 1} + \frac{-x + 1}{x^3 + 1}. \end{align} Now integrating the first fraction is easy because of the geometric series, and all you have to deal with is the last one.

• I added a comment to my answer. Your solution is the best. Cheers. Aug 26, 2016 at 10:41
• Wow...I'm honored. :) Aug 26, 2016 at 11:46

We have $$J=\int_{2}^{3}\frac{x-1}{x^3+1}\,dx = \frac{1}{3}\log\left(\frac{21}{16}\right)\tag{1}$$ by partial fraction decomposition, and that is the only annoying part, since $$I = \int_{2}^{3}\frac{x^{100}+1}{x^3+1}\,dx = -J+\int_{2}^{3}x\cdot\frac{x^{99}+1}{x^3+1}\,dx \tag{2}$$ and $$\frac{x^{99}+1}{x^3+1} = 1-x^3+x^6-\ldots+x^{96} \tag{3}$$ so: $$\boxed{\int_{2}^{3}\frac{x^{100}+1}{x^3+1}\,dx} =-J+ \int_{2}^{3}\sum_{k=0}^{32}(-1)^k x^{3k+1}dx=\boxed{-\frac{1}{3}\log\left(\frac{21}{16}\right)+\sum_{k=0}^{32}(-1)^k\frac{3^{3k+2}-2^{3k+2}}{3k+2}}\tag{4}$$

It is not so bad with long division since $$\frac{x^{100}+1}{x^3+1}=\sum_{n=0}^{32}(-1)^nx^{3n+1}+\frac{1-x}{x^3+1}$$ and $$\frac{1-x}{x^3+1}=\frac{1-2 x}{3 \left(x^2-x+1\right)}+\frac{2}{3 (x+1)}$$ So, the antiderivative is quite simple but, for the definite integral, I hope and wish that you are very patient !

• John Hughes gave the nicest solution, be sure ! Please, accept his anwer instead of mine. Aug 26, 2016 at 10:40

Given what the indefinite integral is, I don't think you want to do this by hand.

Some math problems are simply not reasonable to do by hand. If you can do it with Mathematica or another digital tool, then that's a far better approach. Not only because it saves time, but because that's how we solve most mathematical calculations.