Integrand size = 33, antiderivative size = 72 \[ \int \frac {x \left (5+x+3 x^2+2 x^3\right )}{2+x+3 x^2+x^3+2 x^4} \, dx=x-\frac {1}{3} \sqrt {\frac {5}{3}} \arctan \left (\frac {1-4 x}{\sqrt {15}}\right )-\frac {10 \arctan \left (\frac {1+2 x}{\sqrt {3}}\right )}{3 \sqrt {3}}+\frac {1}{3} \log \left (1+x+x^2\right )+\frac {1}{6} \log \left (2-x+2 x^2\right ) \] Output:
x-1/9*15^(1/2)*arctan(1/15*(1-4*x)*15^(1/2))-10/9*arctan(1/3*(1+2*x)*3^(1/ 2))*3^(1/2)+1/3*ln(x^2+x+1)+1/6*ln(2*x^2-x+2)
Time = 0.03 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.96 \[ \int \frac {x \left (5+x+3 x^2+2 x^3\right )}{2+x+3 x^2+x^3+2 x^4} \, dx=\frac {1}{18} \left (-20 \sqrt {3} \arctan \left (\frac {1+2 x}{\sqrt {3}}\right )+2 \sqrt {15} \arctan \left (\frac {-1+4 x}{\sqrt {15}}\right )+3 \left (6 x+2 \log \left (1+x+x^2\right )+\log \left (2-x+2 x^2\right )\right )\right ) \] Input:
Integrate[(x*(5 + x + 3*x^2 + 2*x^3))/(2 + x + 3*x^2 + x^3 + 2*x^4),x]
Output:
(-20*Sqrt[3]*ArcTan[(1 + 2*x)/Sqrt[3]] + 2*Sqrt[15]*ArcTan[(-1 + 4*x)/Sqrt [15]] + 3*(6*x + 2*Log[1 + x + x^2] + Log[2 - x + 2*x^2]))/18
Time = 0.44 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.061, Rules used = {2462, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {x \left (2 x^3+3 x^2+x+5\right )}{2 x^4+x^3+3 x^2+x+2} \, dx\) |
\(\Big \downarrow \) 2462 |
\(\displaystyle \int \left (\frac {2 (x-2)}{3 \left (x^2+x+1\right )}+\frac {2 (x+1)}{3 \left (2 x^2-x+2\right )}+1\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {1}{3} \sqrt {\frac {5}{3}} \arctan \left (\frac {1-4 x}{\sqrt {15}}\right )-\frac {10 \arctan \left (\frac {2 x+1}{\sqrt {3}}\right )}{3 \sqrt {3}}+\frac {1}{3} \log \left (x^2+x+1\right )+\frac {1}{6} \log \left (2 x^2-x+2\right )+x\) |
Input:
Int[(x*(5 + x + 3*x^2 + 2*x^3))/(2 + x + 3*x^2 + x^3 + 2*x^4),x]
Output:
x - (Sqrt[5/3]*ArcTan[(1 - 4*x)/Sqrt[15]])/3 - (10*ArcTan[(1 + 2*x)/Sqrt[3 ]])/(3*Sqrt[3]) + Log[1 + x + x^2]/3 + Log[2 - x + 2*x^2]/6
Int[(u_.)*(Px_)^(p_), x_Symbol] :> With[{Qx = Factor[Px]}, Int[ExpandIntegr and[u*Qx^p, x], x] /; !SumQ[NonfreeFactors[Qx, x]]] /; PolyQ[Px, x] && GtQ [Expon[Px, x], 2] && !BinomialQ[Px, x] && !TrinomialQ[Px, x] && ILtQ[p, 0 ] && RationalFunctionQ[u, x]
Time = 0.05 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.79
method | result | size |
default | \(x +\frac {\ln \left (x^{2}+x +1\right )}{3}-\frac {10 \arctan \left (\frac {\left (2 x +1\right ) \sqrt {3}}{3}\right ) \sqrt {3}}{9}+\frac {\ln \left (2 x^{2}-x +2\right )}{6}+\frac {\sqrt {15}\, \arctan \left (\frac {\left (4 x -1\right ) \sqrt {15}}{15}\right )}{9}\) | \(57\) |
risch | \(x +\frac {\ln \left (16 x^{2}-8 x +16\right )}{6}+\frac {\sqrt {15}\, \arctan \left (\frac {\left (4 x -1\right ) \sqrt {15}}{15}\right )}{9}+\frac {\ln \left (4 x^{2}+4 x +4\right )}{3}-\frac {10 \arctan \left (\frac {\left (2 x +1\right ) \sqrt {3}}{3}\right ) \sqrt {3}}{9}\) | \(61\) |
Input:
int(x*(2*x^3+3*x^2+x+5)/(2*x^4+x^3+3*x^2+x+2),x,method=_RETURNVERBOSE)
Output:
x+1/3*ln(x^2+x+1)-10/9*arctan(1/3*(2*x+1)*3^(1/2))*3^(1/2)+1/6*ln(2*x^2-x+ 2)+1/9*15^(1/2)*arctan(1/15*(4*x-1)*15^(1/2))
Time = 0.08 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.78 \[ \int \frac {x \left (5+x+3 x^2+2 x^3\right )}{2+x+3 x^2+x^3+2 x^4} \, dx=\frac {1}{3} \, \sqrt {\frac {5}{3}} \arctan \left (\frac {1}{5} \, \sqrt {\frac {5}{3}} {\left (4 \, x - 1\right )}\right ) - \frac {10}{9} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) + x + \frac {1}{6} \, \log \left (2 \, x^{2} - x + 2\right ) + \frac {1}{3} \, \log \left (x^{2} + x + 1\right ) \] Input:
integrate(x*(2*x^3+3*x^2+x+5)/(2*x^4+x^3+3*x^2+x+2),x, algorithm="fricas")
Output:
1/3*sqrt(5/3)*arctan(1/5*sqrt(5/3)*(4*x - 1)) - 10/9*sqrt(3)*arctan(1/3*sq rt(3)*(2*x + 1)) + x + 1/6*log(2*x^2 - x + 2) + 1/3*log(x^2 + x + 1)
Time = 0.11 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.04 \[ \int \frac {x \left (5+x+3 x^2+2 x^3\right )}{2+x+3 x^2+x^3+2 x^4} \, dx=x + \frac {\log {\left (x^{2} - \frac {x}{2} + 1 \right )}}{6} + \frac {\log {\left (x^{2} + x + 1 \right )}}{3} + \frac {\sqrt {15} \operatorname {atan}{\left (\frac {4 \sqrt {15} x}{15} - \frac {\sqrt {15}}{15} \right )}}{9} - \frac {10 \sqrt {3} \operatorname {atan}{\left (\frac {2 \sqrt {3} x}{3} + \frac {\sqrt {3}}{3} \right )}}{9} \] Input:
integrate(x*(2*x**3+3*x**2+x+5)/(2*x**4+x**3+3*x**2+x+2),x)
Output:
x + log(x**2 - x/2 + 1)/6 + log(x**2 + x + 1)/3 + sqrt(15)*atan(4*sqrt(15) *x/15 - sqrt(15)/15)/9 - 10*sqrt(3)*atan(2*sqrt(3)*x/3 + sqrt(3)/3)/9
Time = 0.11 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.78 \[ \int \frac {x \left (5+x+3 x^2+2 x^3\right )}{2+x+3 x^2+x^3+2 x^4} \, dx=\frac {1}{9} \, \sqrt {15} \arctan \left (\frac {1}{15} \, \sqrt {15} {\left (4 \, x - 1\right )}\right ) - \frac {10}{9} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) + x + \frac {1}{6} \, \log \left (2 \, x^{2} - x + 2\right ) + \frac {1}{3} \, \log \left (x^{2} + x + 1\right ) \] Input:
integrate(x*(2*x^3+3*x^2+x+5)/(2*x^4+x^3+3*x^2+x+2),x, algorithm="maxima")
Output:
1/9*sqrt(15)*arctan(1/15*sqrt(15)*(4*x - 1)) - 10/9*sqrt(3)*arctan(1/3*sqr t(3)*(2*x + 1)) + x + 1/6*log(2*x^2 - x + 2) + 1/3*log(x^2 + x + 1)
Time = 0.11 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.78 \[ \int \frac {x \left (5+x+3 x^2+2 x^3\right )}{2+x+3 x^2+x^3+2 x^4} \, dx=\frac {1}{9} \, \sqrt {15} \arctan \left (\frac {1}{15} \, \sqrt {15} {\left (4 \, x - 1\right )}\right ) - \frac {10}{9} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) + x + \frac {1}{6} \, \log \left (2 \, x^{2} - x + 2\right ) + \frac {1}{3} \, \log \left (x^{2} + x + 1\right ) \] Input:
integrate(x*(2*x^3+3*x^2+x+5)/(2*x^4+x^3+3*x^2+x+2),x, algorithm="giac")
Output:
1/9*sqrt(15)*arctan(1/15*sqrt(15)*(4*x - 1)) - 10/9*sqrt(3)*arctan(1/3*sqr t(3)*(2*x + 1)) + x + 1/6*log(2*x^2 - x + 2) + 1/3*log(x^2 + x + 1)
Time = 0.15 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.11 \[ \int \frac {x \left (5+x+3 x^2+2 x^3\right )}{2+x+3 x^2+x^3+2 x^4} \, dx=x+\ln \left (x+\frac {1}{2}-\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {1}{3}+\frac {\sqrt {3}\,5{}\mathrm {i}}{9}\right )-\ln \left (x+\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (-\frac {1}{3}+\frac {\sqrt {3}\,5{}\mathrm {i}}{9}\right )-\ln \left (x-\frac {1}{4}-\frac {\sqrt {15}\,1{}\mathrm {i}}{4}\right )\,\left (-\frac {1}{6}+\frac {\sqrt {15}\,1{}\mathrm {i}}{18}\right )+\ln \left (x-\frac {1}{4}+\frac {\sqrt {15}\,1{}\mathrm {i}}{4}\right )\,\left (\frac {1}{6}+\frac {\sqrt {15}\,1{}\mathrm {i}}{18}\right ) \] Input:
int((x*(x + 3*x^2 + 2*x^3 + 5))/(x + 3*x^2 + x^3 + 2*x^4 + 2),x)
Output:
x + log(x - (3^(1/2)*1i)/2 + 1/2)*((3^(1/2)*5i)/9 + 1/3) - log(x + (3^(1/2 )*1i)/2 + 1/2)*((3^(1/2)*5i)/9 - 1/3) - log(x - (15^(1/2)*1i)/4 - 1/4)*((1 5^(1/2)*1i)/18 - 1/6) + log(x + (15^(1/2)*1i)/4 - 1/4)*((15^(1/2)*1i)/18 + 1/6)
Time = 0.15 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.75 \[ \int \frac {x \left (5+x+3 x^2+2 x^3\right )}{2+x+3 x^2+x^3+2 x^4} \, dx=\frac {\sqrt {15}\, \mathit {atan} \left (\frac {4 x -1}{\sqrt {15}}\right )}{9}-\frac {10 \sqrt {3}\, \mathit {atan} \left (\frac {2 x +1}{\sqrt {3}}\right )}{9}+\frac {\mathrm {log}\left (x^{2}+x +1\right )}{3}+\frac {\mathrm {log}\left (2 x^{2}-x +2\right )}{6}+x \] Input:
int(x*(2*x^3+3*x^2+x+5)/(2*x^4+x^3+3*x^2+x+2),x)
Output:
(2*sqrt(15)*atan((4*x - 1)/sqrt(15)) - 20*sqrt(3)*atan((2*x + 1)/sqrt(3)) + 6*log(x**2 + x + 1) + 3*log(2*x**2 - x + 2) + 18*x)/18