# How to solve $\int \frac{\,dx}{(x^3 + x + 1)^3}$?

How to solve $$\int \frac{\,dx}{(x^3 + x + 1)^3}$$ ?

Wolfram Alpha gives me something I am not familiar with. I thought that the idea was using partial fractions because $x^3$ and $x$ are bijections, there must be a real root but it seems that Wolfram Alpha is using numerical methods to approximate the root so it's not a "nice" number. I can't thing of any substitution which could help me nor any formula to transform this denominator. The formula $\int u\,dv = uv - \int v\,du$ also yields a more complicated integral:

$$\,dv = \,dx \implies v = x \\ u = \frac{1}{(x^3 + x + 1)^3} \implies du = -3\frac{3x^2 + 1}{(x^3 + x + 1)^4} \,dx \\ \int \frac{\,dx}{(x^3 + x + 1)^3} = \frac{x}{(x^3 + x + 1)^3} + 3\int \frac{3x^3 + x}{(x^3 + x + 1)^4} \,dx \\ = \frac{x}{(x^3 + x + 1)^3} + 3\int \frac{3x^3 + x \pm 2x \pm 3}{(x^3 + x + 1)^4}\,dx \\ = \frac{x}{(x^3 + x + 1)^3} + 3\int \frac{3x^3 + 3x + 3}{(x^3 + x + 1)^4}\,dx + 3\int \frac{- 2x - 3}{(x^3 + x + 1)^4}\,dx \\ = \frac{x}{(x^3 + x + 1)^3} + 9\int \frac{\,dx}{(x^3 + x + 1)^3} - 3\int \frac{2x + 3}{(x^3 + x + 1)^4} \,dx \\ I = \int \frac{\,dx}{(x^3 + x + 1)^3} \implies \\ -8I = \frac{x}{(x^3 + x + 1)^3} - 3\int \frac{2x + 3}{(x^3 + x + 1)^4} \,dx$$

Is this one really as complicated as Wolfram Alpha "tells" me or is there some sort of "trick" which can be applied?

-
It's going to be as complicated as WolframAlpha tells you I'm sure - it doesn't seem to be approximating the root, it has written it as $\omega$ –  John Fernley May 31 at 21:02
You are right, I didn't notice the "Exact form" button, this doesn't look like it could help me ... wolframalpha.com/share/… –  Shirohige May 31 at 21:23
Your edit is wrong. You forget that the denominator is raised by power of $3$. –  Tunk-Fey Jun 1 at 2:52
Argh, I completely missed the cube so I have 6 fractions on the left side, not just 2 ... Thanks. –  Shirohige Jun 1 at 10:31

Hint: the polynomial $x^3+x+1$ has one real root, say $\alpha$. Then $x^3+x+1=(x-\alpha)(x^2+\alpha x+\alpha^2+1)$ and then apply integration techniques of rational expressions of polynomials with repeated factors, see for example https://math.la.asu.edu/~surgent/mat271/parfrac.pdf

-

The integral is a rational function so one ought to be able to apply the method of partial fractions, however, the real root of $x^3+x+1$ is irrational without a nice expression, this makes it difficult to apply partial fractions, however some progress can be made.

Consider first what kinds of functions we get from integrating partial fractions.

1) Logarithms. These come from linear factors of the denominator. 2) Inverse tangent functions. These come from quadratic factors of the denominator. 3) Rational functions. These come form the occurrence of repeated factors in the denominator, as is the case with this integral.

Now to find the expressions for terms of the first two types we need the factorization of the denominator. However the term of the third type can be calculated arithmetically without factoring the denominator.

Thus we want to find an expression of the form $$\int \frac{P}{Q}=\frac{P_1}{Q_2}-\int \frac{P_2}{Q_2}$$

Where $Q_2$ contains has the same factors as $Q$ only with out repetition. And where we have $Q=Q_1Q_2$, Now $Q_1=(Q,Q^{\prime})$ is calculated arithmetically $Q_2$ is then found by division. In our case $Q=(x^3+x+1)^3$ and $Q_2= x^3+x+1$ and $Q_1=(x^3+x+1)^2$. It remains to find $P_1$ and $P_2$. By differentiating the above expression we get the formula, $$P=P_1^{\prime}Q_2-P_1H+P_2Q_1$$ where $$H=\frac{Q_1^{\prime}Q_2}{Q_1}$$ which is easily seen to be a polynomial. In our case $$H=\frac{Q_1^{\prime}Q_2}{Q_1}=\frac{2(x^3+x+1) (3x^2+1)(x^3+x+1)}{(x^3+x+1)^2}=6x^2+2$$

Now we set $$P_1=Ax^5+Bx^4+Cx^3+Dx^2+Ex+F$$ and $$P_2=Gx^2+Hx+K$$ Thus we set this in our formula and obtain a system of equations. The first few equations give, This gives $G=0$ and $H=A$ and $K=2B$ we can simplify a little writing, \begin{equation*} \begin{split} 1=&(5Ax^4+4Bx^3+3Cx^2+2Dx+E)(x^3+x+1)\\ &-(Ax^5+Bx^4+Cx^3+Dx^2+Ex+F)(6x^2+2)\\ &+(Ax+2B)(x^6+2x^4+2x^3+x^2+2x+1)\\ \end{split} \end{equation*}

After successive elimination we reduce to $$119A+162B=0$$ $$13A+50B=6$$ which finally gives us the solution, so we have ultimately,

$$\int \frac{dx}{(x^3+x+1)^3}=\frac{-486x^5+ 357x^4-810 x^3-315x^2+312x-448}{1922(x^3+x+1)^2}+ \int \frac{-486x+714}{1922(x^3+x+1)}dx.$$

Now to go further we need a root for the equation. There is only one real root so we would expect a logarithmic and an arctan term.

-
Thank you for your detailed answer! This is the Ostrogradsky method I believe? –  Shirohige Jun 1 at 11:23
Yeah, thats what the Russians call it, but I think there are other names. –  Rene Schipperus Jun 1 at 12:56