29

Evaluate the integral $$\int\frac{5x^3+3x-1}{(x^3+3x+1)^3}\,dx$$

My Attempt:

Let $f(x) = \frac{ax+b}{(x^3+3x+1)^2}.$ Now differentiate both side with respect to $x$, and we get

$$ \begin{align} f'(x) &= \frac{(x^3+3x+1)^2\cdot a-2\cdot (x^3+3x+1)\cdot (3x^2+3)\cdot (ax+b)}{(x^3+3x+1)^4}\\ &= \frac{5x^3+3x-1}{(x^3+3x+1)^3}\cdot\frac{(x^3+3x+1)\cdot a-6\cdot (x^2+1)\cdot (ax+b)}{(x^3+3x+1)^3}\\ &= \frac{5x^3+3x-1}{(x^3+3x+1)^3} \frac{-5ax^3+6bx^2-3ax+(a-6b)}{(x^3+3x+1)^3}\\ &= \frac{5x^3+3x-1}{(x^3+3x+1)^3} \end{align} $$

for $a = -1$ and $b = 0$. Thus, by the Fundamental Theorem of Calculus,

$$ \begin{align} \int\frac{5x^3+3x-1}{(x^3+3x+1)^3}\,dx &= \int f'(x)\,dx\\ &= f(x)\\ &= -\frac{x}{(x^3+3x+1)^2}+\mathcal{C} \end{align} $$

How we can solve the above integral directly (maybe by using the substitution method)?

Fabrosi
  • 683
juantheron
  • 56,203

5 Answers5

22

Ostrogradsky-Hermite method.

To integrate a rational function $P(x)/Q(x)$ without decomposing it into partial fractions and without finding the roots of the denominator, we can use the Ostrogradski-Hermite method, which generalizes your ansatz

$$ \int\frac{5x^3+3x-1}{(x^3+3x+1)^3}dx= \frac{ax+b}{(x^3+3x+1)^2}+C.$$

You can find a description of this method in section 2.1 of Gradshteyn and Ryzhik's Table of Integrals, Series, and Products, where the identity $(2)$ below is given. The formula $(1)$ appears also on the Ostrogradsky's Wikipedia page.

Assume that $\deg P(x)<\deg $ $Q(x)$. There exist polynomials $P_{1}(x)$, $P_{2}(x)$, $Q_{1}(x)$ and $Q_{2}(x)$, with $Q_{1}(x)=\gcd \left\{ Q(x), Q^{\prime }(x)\right\}$ and $Q_{2}(x)=Q(x)/Q_{1}(x)$, $\deg P_{1}(x)<\deg Q_{1}(x)$, $\deg P_{2}(x)<\deg Q_{2}(x)$, such that

\begin{equation} \int \frac{P(x)}{Q(x)}dx=\frac{P_{1}(x)}{Q_{1}(x)}+\int \frac{P_{2}(x)}{ Q_{2}(x)}dx.\tag{1} \end{equation}

Then

\begin{eqnarray*} P(x) &=&\frac{P_{1}^{\prime }(x)Q_{1}(x)-P_{1}(x)Q_{1}^{\prime }(x)}{\left\{ Q_{1}(x)\right\} ^{2}}Q(x)+\frac{P_{2}(x)}{Q_{2}(x)}Q(x) \\ &=&P_{1}^{\prime }(x)\frac{Q(x)}{Q_{1}(x)}-P_{1}(x)\frac{Q_{1}^{\prime }(x)}{Q_{1}(x)}\frac{Q(x)}{Q_{1}(x)}+P_{2}(x)\frac{Q(x)}{Q_{2}(x)} \\ &=&P_{1}^{\prime }(x)Q_{2}(x)-P_{1}(x)\left\{ \frac{Q_{1}^{\prime }(x)}{Q_{1}(x)}Q_{2}(x)\right\} +P_{2}(x)Q_{1}(x) \end{eqnarray*}

or

\begin{equation} P(x)=P_{1}^{\prime }(x)Q_{2}(x)-P_{1}(x)\left\{ T(x)-Q_{2}^{\prime }(x)\right\}+P_{2}(x)Q_{1}(x),\tag{2} \end{equation}

with $T(x)=Q^{\prime }(x)/Q_{1}(x)$, because from

\begin{equation*} Q^{\prime }(x)=\left\{ Q_{1}(x)Q_{2}(x)\right\} ^{\prime }=Q_{1}^{\prime }(x)Q_{2}(x)+Q_{1}(x)Q_{2}^{\prime }(x)=T(x)Q_{1}(x) \end{equation*}

we obtain

\begin{equation*} \frac{Q_{1}^{\prime }(x)}{Q_{1}(x)}Q_{2}(x)+Q_{2}^{\prime }(x)=T(x). \end{equation*}

To find the coefficients of the polynomials $P_{1}(x)$ and $P_{2}(x)$ equate the coefficients of like powers of $x$.

Application to

\begin{equation*} \frac{P(x)}{Q(x)}=\frac{5x^{3}+3x-1}{\left( x^{3}+3x+1\right) ^{3}}. \end{equation*}

Since

\begin{eqnarray*} Q(x) &=&\left( x^{3}+3x+1\right) ^{3} \\ Q^{\prime }(x) &=&9\left( x^{3}+3x+1\right) ^{2}\left( x^{2}+1\right) \\ Q_{1}(x) &=&\gcd \left\{ Q(x),Q^{\prime }(x)\right\} =\left( x^{3}+3x+1\right) ^{2} \end{eqnarray*}

and \begin{equation*} Q_{2}(x)=\frac{Q(x)}{Q_{1}(x)}=\frac{\left( x^{3}+3x+1\right) ^{3}}{\left( x^{3}+3x+1\right) ^{2}}=x^{3}+3x+1, \end{equation*}

we write

\begin{equation} \int \frac{5x^{3}+3x-1}{\left( x^{3}+3x+1\right) ^{3}}dx=\frac{P_{1}(x)}{ \left( x^{3}+3x+1\right) ^{2}}+\int \frac{P_{2}(x)}{x^{3}+3x+1}dx,\tag{3} \end{equation}

where

\begin{eqnarray*} P_{1}(x) &=&Ax^{5}+Bx^{4}+Cx^{3}+Dx^{2}+Ex+F \\ P_{2}(x) &=&Fx^{2}+Gx+H. \end{eqnarray*}

The identity $(2)$, with

\begin{equation*} T(x)=\frac{Q^{\prime }(x)}{Q_{1}(x)}=9\left( x^{2}+1\right), \end{equation*}

yields

\begin{eqnarray*} 5x^{3}+3x-1 &=&\left( 5Ax^{4}+4Bx^{3}+3Cx^{2}+2Dx+E\right) \left( x^{3}+3x+1\right) \\ &&-\left( Ax^{5}+Bx^{4}+Cx^{3}+Dx^{2}+Ex+F\right) \left\{ 9\left( x^{2}+1\right) -\left( 3x^{2}+3\right) \right\} \\ &&+\left( Gx^{2}+Hx+I\right) \left( x^{3}+3x+1\right) ^{2} \\ &=&Gx^{8}+\left( -A+H\right) x^{7}+\left( -2B+6G+I\right) x^{6} \\ &&+\left( 6H-3C+2G+9A\right) x^{5} \\ &&+\left( -4D+6B+9G+6I+2H+5A\right) x^{4} \\ &&+\left( 3C-5E+4B+6G+9H+2I\right) x^{3} \\ &&+\left( 3C-6F+G+6H+9I\right) x^{2} \\ &&+\left( 6I+H+2D-3E\right) x+\left( E+I-6F\right). \end{eqnarray*}

By equating coefficients we find

\begin{equation*} A=B=C=D=F=G=H=I=0,E=-1.\tag{4} \end{equation*}

Consequently,

\begin{eqnarray*} P_1(x) &=&-x \\ P_2(x) &=&0 \end{eqnarray*} and finally,

\begin{equation*} \int \frac{5x^{3}+3x-1}{\left( x^{3}+3x+1\right) ^{3}}dx=-\frac{x}{\left( x^{3}+3x+1\right) ^{2}}+C,\tag{5} \end{equation*}

as evaluated by you.

Daniel Fischer
  • 211,575
15

$$ \begin{aligned}\int\frac{5x^3 + 3x - 1}{\left(x^3 + 3x + 1\right)^3}\,\mathrm{d}x &=\int\frac{5x^3 + 3x-1}{\left(\sqrt{x}\left(x^{5/2}+3\sqrt{x}+x^{-1/2}\right)\right)^3}\,\mathrm{d}x\\&=\int\frac{5x^3 + 3x-1}{x^{3/2}\left(x^{5/2}+3\sqrt{x}+x^{-1/2}\right)^3}\,\mathrm{d}x\\&=\int\frac{5x^{3/2}+3x^{-1/2}-x^{-3/2}}{\left(x^{5/2}+3\sqrt{x}+x^{-1/2}\right)^3}\,\mathrm{d}x\\&=\int\frac{2\,\mathrm{d}(x^{5/2}+3\sqrt{x}+x^{-1/2})}{\left(x^{5/2}+3\sqrt{x}+x^{-1/2}\right)^3}\\&=2\int\frac{\mathrm{d}\tau}{\tau^3}\\&=-\frac{1}{\tau^2}+C\\&=-\frac{1}{\left(x^{5/2}+3\sqrt{x}+x^{-1/2}\right)^2}+C\\&=\cdots\end{aligned} $$

user149844
  • 1,335
11

Here is another solution... I also happen to think that it cannot be done with substitution.

$$\begin{aligned} \int \frac{5x^3+3x-1}{\left ( x^3+3x+1 \right )^3}\,dx &=\int \frac{-x^3-3x-1+6x^3+6x}{\left ( x^3+3x+1 \right )^3}\,dx \\ &= \int \frac{-x^3-3x-1+2x\left ( 3x^2+3 \right )}{\left ( x^3+x+1 \right )^3}\,dx\\ &= \int \frac{-\left ( x^3+3x+1 \right )^2+2x\left ( x^3+3x+1 \right )\left ( 3x^2+3x \right )}{\left ( x^3+3x+1 \right )^4}\,dx\\ &= \int \frac{-(x)'\left ( x^3+3x+1 \right )^2+x\left[ \left ( x^3+3x+1 \right )^2 \right]'}{\left ( x^3+3x+1 \right )^4}\,dx\\ &= \int \left [ -\frac{x}{\left ( x^3+3x+1 \right )^2} \right ]' \,dx = -\frac{x}{\left ( x^3+3x+1 \right )^2}+c, \; \; c \in \mathbb{R} \end{aligned}$$

Tolaso
  • 6,886
  • +1 I would not discover your direct algebraic transformation of the integrand. Only if I worked backwards, from the solution to the original integral. – Américo Tavares May 06 '15 at 11:40
  • 1
    This is what I like doing when I work with integrals of this kind. I also liked your solution. I think I have seen the method before but I did not remember it.

    I guess it was just "luck" that I noticed it. If I do not , then I give up. :)

    – Tolaso May 06 '15 at 11:45
  • It can be done with substitution, see other answers. – Integreek Nov 28 '24 at 08:51
3

A strategy(that works in most cases) to evaluate such integrals of rational functions where the denominator is a polynomial(here, $x^3+3x+1$) raised to some power is to make the derivative of this polynomial appear in the numerator, by multiplying and dividing by a suitable power of $x$. That is, after multiplying and dividing by a suitable power of $x$, the numerator should differ from the derivative of the aforesaid polynomial by only a constant in multiplication.

For the given integral, we desire

$$\frac{\mathrm d}{\mathrm dx}\left((x^3+3x+1)x^p)=(5x^3+3x-1\right)kx^{3p}$$ $$\implies 5kx^{3p+3}+3kx^{3p+1}-kx^{3p}=(p+3)x^{p+2}+3(p+1)x^p+px^{p-1}$$

Since the polynomials on the LHS and the RHS of the above equation have been written in descending orders of degree, we may directly compare their corresponding terms:

$$3p+3=p+2, 3p+1=p, 3p=p-1(\text{these }3\text{ equations are the same thing})$$ $$k=\frac{p+3}5=p+1=-p$$

Solving this system of equations, we get

$$p=-\frac12, k=\frac12$$

Hence, the integral becomes

$$\begin{align}\int\frac{5x^3+3x-1}{(x^3+3x+1)^3}\mathrm dx&=2\int\frac{\mathrm d\left(x^\frac52+3x^\frac12+x^\frac{-1}2\right)}{\left(x^\frac52+3x^\frac12+x^\frac{-1}2\right)^3}\\&=\frac{-x}{(x^3+3x+1)^2}+C\end{align}$$

Integreek
  • 8,530
0

$$\int \frac{5x^3+3x-1}{\left(x^3+3x+1\right)^3},dx$$

$x^3+3x+1$ Isn't going to factor cleanly, so we can use the cubic formula:

$$x = \sqrt[3]{\left(\frac{-b^3}{27a^3}+\frac{bc}{6a^2}-\frac{d}{2a}\right)+\sqrt{\left(\frac{-b^3}{27a^3}+\frac{bc}{6a^2}-\frac{d}{2a}\right)^2+\left(\frac{c}{3a}-\frac{b^2}{9a^2}\right)^3}}+\sqrt[3]{\left(\frac{-b^3}{27a^3}+\frac{bc}{6a^2}-\frac{d}{2a}\right)-\sqrt{\left(\frac{-b^3}{27a^3}+\frac{bc}{6a^2}-\frac{d}{2a}\right)^2+\left(\frac{c}{3a}-\frac{b^2}{9a^2}\right)^3}}-\frac{b}{3a}$$

$a=1,b=0,c=3,d=1$ $$\sqrt[3]{\left(-\frac{1}{2}\right)\pm\sqrt{\frac{1}{4}+1}}$$ $x = \pm\sqrt[3]{\frac{\sqrt{5}\pm1}{2}}$

This is the combination of third roots of the golden ratio $\varphi$: $$x=-\sqrt[3]{\varphi}+\sqrt[3]{\varphi^{-1}}$$ $x_0 =-\sqrt[3]{\varphi}+\sqrt[3]{\varphi^{-1}}$ $$x^3+3x+1=\left(x-x_0\right)\left(x-x_1\right)\left(x-x_2\right)$$

$$x_{1,2} = \frac{-x_0\pm \sqrt{x_0^2+\frac{4}{x_0}}}{2}$$

$$x_1 = \frac{\sqrt[3]{\frac{\sqrt{5}+1}{2}}-\sqrt[3]{\frac{\sqrt{5}-1}{2}}}{2}+\frac{\sqrt{3}}{2}\left(\sqrt[3]{\frac{\sqrt{5}+1}{2}}+\sqrt[3]{\frac{\sqrt{5}-1}{2}}\right) i, \quad x_2 = \frac{\sqrt[3]{\frac{\sqrt{5}+1}{2}}-\sqrt[3]{\frac{\sqrt{5}-1}{2}}}{2}-\frac{\sqrt{3}}{2}\left(\sqrt[3]{\frac{\sqrt{5}+1}{2}}+\sqrt[3]{\frac{\sqrt{5}-1}{2}}\right) i$$

$$x_1 = \frac{\sqrt[3]{\varphi}-\sqrt[3]{\varphi^{-1}}}{2}+\frac{\sqrt{3}}{2}\left(\sqrt[3]{\varphi}+\sqrt[3]{\varphi^{-1}}\right) i, \quad x_2 = \frac{\sqrt[3]{\varphi}-\sqrt[3]{\varphi^{-1}}}{2}-\frac{\sqrt{3}}{2}\left(\sqrt[3]{\varphi}+\sqrt[3]{\varphi^{-1}}\right) i$$

$$x^3+3x+1=\prod_{k=0}^{2} \left(x-x_k\right)$$

$$\left(x-x_1\right)\left(x-x_2\right)= x^2 - \frac{2^{2/3}x\sqrt[3]{2\varphi}}{2}+\frac{2^{2/3}x \sqrt[3]{2\varphi^{-1}}}{2}+\frac{\sqrt[3]{2}\left(2\varphi^{-1}\right)^{2/3}}{2}+1+\frac{\sqrt[3]{2}\left(2\varphi\right)^{2/3}}{2}$$

So, we know that $\left(\left(x-x_0\right)\left(x-x_1\right)\left(x-x_2\right)\right)^3$ has three roots (one real, two complex) each with multiplicity three.

We'll apply the cubic formula to the numerator as well, which yields: $$n_0 = \sqrt[3]{\frac{3\sqrt{5}+5}{50}}-\sqrt[3]{\frac{3\sqrt{5}-5}{50}}$$

$\Delta_{+} = \frac{3\sqrt{5}+5}{50}, \quad \Delta_{-} = \frac{3\sqrt{5}-5}{50}$

$$n_{1,2} = -\frac{n_0}{2} \pm \frac{\sqrt{3}}{2} \sqrt{\frac{3\left(1+n_0\right)}{5 n_0}} i$$

$$n_1 = -\frac{\sqrt[3]{\Delta_+}-\sqrt[3]{\Delta_-}}{2}+\frac{\sqrt{3}}{2} \sqrt{\frac{3\left(1+\sqrt[3]{\Delta_+}-\sqrt[3]{\Delta_-}\right)}{5\left(\sqrt[3]{\Delta_+}-\sqrt[3]{\Delta_-}\right)}} i, \quad n_2 = -\frac{\sqrt[3]{\Delta_+}-\sqrt[3]{\Delta_-}}{2}-\frac{\sqrt{3}}{2} \sqrt{\frac{3\left(1+\sqrt[3]{\Delta_+}-\sqrt[3]{\Delta_-}\right)}{5\left(\sqrt[3]{\Delta_+}-\sqrt[3]{\Delta_-}\right)}} i$$

$$\int\frac{5x^3+3x-1}{\left(x^3+3x+1\right)^3}\,dx = \int \frac{\left(x-n_0\right)\left(x-n_1\right)\left(x-n_2\right)}{\left[\left(x-x_0\right)\left(x-x_1\right)\left(x-x_2\right)\right]^3}\,dx\quad \left[\bigcup_{k\geqslant1} \lbrace x_k;n_k\rbrace \in \mathbb{C}\right] \wedge \left[\bigcap_{k\geqslant0} \lbrace x_k;n_k\rbrace =0\right]$$

Let $P\left(x\right)$ represent the numerator, and $Q\left(x\right)$ represent the denominator; then let $\mathbb{C}\left[x\right]$ be the polynomial ring over $\mathbb{C}$, with the ideal $I_k = \left<\left(x-x_k\right)^3\right>$; therefore $Q^3\left(x\right)$ is defined as the intersection of the ideals $I_k$ such that $\prod_{k\geqslant 0}\left(x-x_k\right)^3=\bigcap_{k\geqslant 0} I_k = I$. From here, we can utilize the Chinese remainder theorem, which states that every equivalence class (ie. two polynomials are congruent if their difference $\lambda \in I$) modulo $I$ decomposes (due to the inequivalence of roots) into unique components modulo $I_k$, such that:$$\mathbb{C}\left[x\right]/ I \cong \bigoplus_{k\geqslant0}\mathbb{C}\left[x\right]/I_k$$ Which allows for the decomposition of the polynomials via partial fractions.

From here, let us define a function $D_k\left(x\right)$ which outputs the product of all poles for which $x_k\neq x_j$ such that $D_k\left(x\right) = \prod_{\substack{j\geqslant 0 \\ j\neq k}}\left(x-x_j\right)^3$. For every pole $x_k$, partial fraction coefficients $A_k,B_k,C_k$ are derived from their congruence to the taylor expansion of $P\left(x\right)/D_k\left(x\right)$ centered at $x=x_k$, modulo $\left(x-x_k\right)^3$ up and equal to degree 2:

$$\frac{P\left(x\right)}{D_k\left(x\right)}\equiv C_k + B_k \left(x-x_k\right)+ A_k\left(x-x_k\right)^2 \pmod{\left[x-x_k\right]^3}$$

Now, we will develop indexing system, which we will define over a set of cyclic indices taken modulo three:

$$k+1 \to k+1 \pmod{3} \\\\k+2 \to k+2 \pmod{3}$$

Now, we can determine coefficients: Residue $C_k$ is the constant term of the Laurent expansion $\left[x-x_k\right]^3 f\left(x\right) = C_K + B_k\left(x-x_k\right)+A_k\left(x-x_k\right)^2$, which is isolated via truncating modulo $\left[x-x_k\right]^3$. $$\left[x-x_k\right]^3 f\left(x\right) \equiv C_k \pmod{\left[x-x_k\right]^3}$$ $$C_k = \lim_{x\to x_k} \left[x-x_k\right]f\left(x\right)$$ $$C_k = \frac{P\left(x_k\right)}{D_k\left(x_k\right)}$$ $$C_k = \frac{\left(x_k-n_0\right)\left(x_k-n_1\right)\left(x_k-n_2\right)}{\left(x_k-x_{k+1}\right)^3 \left(x_k - x_{k+2}\right)^3}$$ Coefficients residue $B_k$ and $A_k$ will be far easier to obtain:

$$\frac{d}{dx}\left[\left(x-x_k\right)^3 f\left(x\right)\right] \equiv B_k + 2 A_k\left(x-x_k\right) \pmod{\left[x-x_k\right]^3}$$

$$B_k = \lim_{x\to x_k} \frac{d}{dx}\left[\left(x-x_k\right)^3 f\left(x\right)\right]$$

$$B_k = \frac{P'\left(x_k\right)-3 P\left(x_k\right)\left(\frac{1}{x_k - x_{k+1}}+\frac{1}{x_k - x_{k+2}}\right)}{\left(x_k-x_{k+1}\right)^3\left(x_k-x_{k+2}\right)^3}$$

$$\frac{d^2}{dx^2}\left[\left(x-x_k\right)^3 f\left(x\right)\right] \equiv 2 A_k \pmod{\left[x-x_k\right]^3}$$

$$A_k = \lim_{x\to x_k} \frac{1}{2} \frac{d^2}{dx^2}\left[\left(x-x_k\right)^3 f\left(x\right)\right] $$ $$A_k = \frac{1}{2}\frac{P''\left(x_k\right)-6 P'\left(x_k\right) \left(\frac{1}{x_k - x_{k+1}}+\frac{1}{x_k - x_{k+2}}\right) + 9 P\left(x_k\right)\left(\frac{1}{\left(x_k - x_{k+1}\right)^2}+\frac{1}{\left(x_k - x_{k+2}\right)^2}\right)}{\left(x_k-x_{k+1}\right)^3\left(x_k-x_{k+2}\right)^3}$$

Now that we have the partial fraction coefficients, we can say: $$\int \frac{P\left(x\right)}{Q^3\left(x\right)}\,dx= \sum_{k\geqslant 0}\int \frac{A_k}{x-x_k} + \frac{B_k}{\left(x-x_k\right)^2} + \frac{C_k}{\left(x-x_k\right)^3}\,dx$$ Which can easily be evaluated to: $$\sum_{k\geqslant 0} A_k \log\left(x-x_k\right) - \frac{B_k}{x-x_k} - \frac{C_k}{2\left(x-x_k\right)^2}$$

$$\boxed{\int \frac{5x^3+3x-1}{\left(x^3+3x+1\right)^3}\,dx=\sum_{0 \leqslant k \leqslant 2} A_k \log\left(x-x_k\right) - \frac{B_k}{x-x_k} - \frac{C_k}{2\left(x-x_k\right)^2}}$$

Daniel K
  • 320