Integrand size = 23, antiderivative size = 47 \[ \int \frac {5+8 x+5 x^2}{1-x^2+x^4} \, dx=-\frac {1}{3} \left (15+8 \sqrt {3}\right ) \arctan \left (\sqrt {3}-2 x\right )+\frac {1}{3} \left (15-8 \sqrt {3}\right ) \arctan \left (\sqrt {3}+2 x\right ) \] Output:
1/3*(15+8*3^(1/2))*arctan(-3^(1/2)+2*x)+1/3*(15-8*3^(1/2))*arctan(3^(1/2)+ 2*x)
Result contains complex when optimal does not.
Time = 0.34 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.28 \[ \int \frac {5+8 x+5 x^2}{1-x^2+x^4} \, dx=5 \arctan \left (\frac {1}{2} \left (x-i \sqrt {3} x\right )\right )+5 \arctan \left (\frac {1}{2} \left (x+i \sqrt {3} x\right )\right )-\frac {8 \arctan \left (\frac {1-2 x^2}{\sqrt {3}}\right )}{\sqrt {3}} \] Input:
Integrate[(5 + 8*x + 5*x^2)/(1 - x^2 + x^4),x]
Output:
5*ArcTan[(x - I*Sqrt[3]*x)/2] + 5*ArcTan[(x + I*Sqrt[3]*x)/2] - (8*ArcTan[ (1 - 2*x^2)/Sqrt[3]])/Sqrt[3]
Time = 0.27 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.98, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.348, Rules used = {2202, 27, 1432, 1083, 217, 1475, 1083, 217}
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 {5 x^2+8 x+5}{x^4-x^2+1} \, dx\) |
\(\Big \downarrow \) 2202 |
\(\displaystyle \int \frac {8 x}{x^4-x^2+1}dx+\int \frac {5 x^2+5}{x^4-x^2+1}dx\) |
\(\Big \downarrow \) 27 |
\(\displaystyle 8 \int \frac {x}{x^4-x^2+1}dx+\int \frac {5 x^2+5}{x^4-x^2+1}dx\) |
\(\Big \downarrow \) 1432 |
\(\displaystyle 4 \int \frac {1}{x^4-x^2+1}dx^2+\int \frac {5 x^2+5}{x^4-x^2+1}dx\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle \int \frac {5 x^2+5}{x^4-x^2+1}dx-8 \int \frac {1}{-x^4-3}d\left (2 x^2-1\right )\) |
\(\Big \downarrow \) 217 |
\(\displaystyle \int \frac {5 x^2+5}{x^4-x^2+1}dx+\frac {8 \arctan \left (\frac {2 x^2-1}{\sqrt {3}}\right )}{\sqrt {3}}\) |
\(\Big \downarrow \) 1475 |
\(\displaystyle \frac {5}{2} \int \frac {1}{x^2-\sqrt {3} x+1}dx+\frac {5}{2} \int \frac {1}{x^2+\sqrt {3} x+1}dx+\frac {8 \arctan \left (\frac {2 x^2-1}{\sqrt {3}}\right )}{\sqrt {3}}\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle -5 \int \frac {1}{-\left (2 x-\sqrt {3}\right )^2-1}d\left (2 x-\sqrt {3}\right )-5 \int \frac {1}{-\left (2 x+\sqrt {3}\right )^2-1}d\left (2 x+\sqrt {3}\right )+\frac {8 \arctan \left (\frac {2 x^2-1}{\sqrt {3}}\right )}{\sqrt {3}}\) |
\(\Big \downarrow \) 217 |
\(\displaystyle \frac {8 \arctan \left (\frac {2 x^2-1}{\sqrt {3}}\right )}{\sqrt {3}}-5 \arctan \left (\sqrt {3}-2 x\right )+5 \arctan \left (2 x+\sqrt {3}\right )\) |
Input:
Int[(5 + 8*x + 5*x^2)/(1 - x^2 + x^4),x]
Output:
-5*ArcTan[Sqrt[3] - 2*x] + 5*ArcTan[Sqrt[3] + 2*x] + (8*ArcTan[(-1 + 2*x^2 )/Sqrt[3]])/Sqrt[3]
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( -1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & & (LtQ[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2 Subst[I nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x]
Int[(x_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Simp[1/2 Subst[Int[(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, p}, x]
Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] : > With[{q = Rt[2*(d/e) - b/c, 2]}, Simp[e/(2*c) Int[1/Simp[d/e + q*x + x^ 2, x], x], x] + Simp[e/(2*c) Int[1/Simp[d/e - q*x + x^2, x], x], x]] /; F reeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 - a*e^2, 0] && (GtQ[2*(d/e) - b/c, 0] || ( !LtQ[2*(d/e) - b/c, 0] && EqQ[d - e*Rt[a/c, 2] , 0]))
Int[(Pn_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Module[{n = Expon[Pn, x], k}, Int[Sum[Coeff[Pn, x, 2*k]*x^(2*k), {k, 0, n/2}]*(a + b *x^2 + c*x^4)^p, x] + Int[x*Sum[Coeff[Pn, x, 2*k + 1]*x^(2*k), {k, 0, (n - 1)/2}]*(a + b*x^2 + c*x^4)^p, x]] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pn, x] && !PolyQ[Pn, x^2]
Time = 0.07 (sec) , antiderivative size = 38, normalized size of antiderivative = 0.81
method | result | size |
default | \(-2 \left (-\frac {5}{2}-\frac {4 \sqrt {3}}{3}\right ) \arctan \left (2 x -\sqrt {3}\right )+2 \left (\frac {5}{2}-\frac {4 \sqrt {3}}{3}\right ) \arctan \left (2 x +\sqrt {3}\right )\) | \(38\) |
risch | \(\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\textit {\_Z}^{4}-\textit {\_Z}^{2}+1\right )}{\sum }\frac {\left (5 \textit {\_R}^{2}+8 \textit {\_R} +5\right ) \ln \left (x -\textit {\_R} \right )}{2 \textit {\_R}^{3}-\textit {\_R}}\right )}{2}\) | \(45\) |
Input:
int((5*x^2+8*x+5)/(x^4-x^2+1),x,method=_RETURNVERBOSE)
Output:
-2*(-5/2-4/3*3^(1/2))*arctan(2*x-3^(1/2))+2*(5/2-4/3*3^(1/2))*arctan(2*x+3 ^(1/2))
Time = 0.08 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.74 \[ \int \frac {5+8 x+5 x^2}{1-x^2+x^4} \, dx=-\frac {1}{3} \, {\left (8 \, \sqrt {3} - 15\right )} \arctan \left (2 \, x + \sqrt {3}\right ) - \frac {1}{3} \, {\left (8 \, \sqrt {3} + 15\right )} \arctan \left (-2 \, x + \sqrt {3}\right ) \] Input:
integrate((5*x^2+8*x+5)/(x^4-x^2+1),x, algorithm="fricas")
Output:
-1/3*(8*sqrt(3) - 15)*arctan(2*x + sqrt(3)) - 1/3*(8*sqrt(3) + 15)*arctan( -2*x + sqrt(3))
Time = 0.09 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.98 \[ \int \frac {5+8 x+5 x^2}{1-x^2+x^4} \, dx=2 \cdot \left (\frac {4 \sqrt {3}}{3} + \frac {5}{2}\right ) \operatorname {atan}{\left (2 x - \sqrt {3} \right )} + 2 \cdot \left (\frac {5}{2} - \frac {4 \sqrt {3}}{3}\right ) \operatorname {atan}{\left (2 x + \sqrt {3} \right )} \] Input:
integrate((5*x**2+8*x+5)/(x**4-x**2+1),x)
Output:
2*(4*sqrt(3)/3 + 5/2)*atan(2*x - sqrt(3)) + 2*(5/2 - 4*sqrt(3)/3)*atan(2*x + sqrt(3))
\[ \int \frac {5+8 x+5 x^2}{1-x^2+x^4} \, dx=\int { \frac {5 \, x^{2} + 8 \, x + 5}{x^{4} - x^{2} + 1} \,d x } \] Input:
integrate((5*x^2+8*x+5)/(x^4-x^2+1),x, algorithm="maxima")
Output:
integrate((5*x^2 + 8*x + 5)/(x^4 - x^2 + 1), x)
Time = 0.12 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.79 \[ \int \frac {5+8 x+5 x^2}{1-x^2+x^4} \, dx=-\frac {1}{3} \, {\left (8 \, \sqrt {3} - 15\right )} \arctan \left (2 \, x + \sqrt {3}\right ) + \frac {1}{3} \, {\left (8 \, \sqrt {3} + 15\right )} \arctan \left (2 \, x - \sqrt {3}\right ) \] Input:
integrate((5*x^2+8*x+5)/(x^4-x^2+1),x, algorithm="giac")
Output:
-1/3*(8*sqrt(3) - 15)*arctan(2*x + sqrt(3)) + 1/3*(8*sqrt(3) + 15)*arctan( 2*x - sqrt(3))
Time = 0.11 (sec) , antiderivative size = 151, normalized size of antiderivative = 3.21 \[ \int \frac {5+8 x+5 x^2}{1-x^2+x^4} \, dx=2\,\mathrm {atanh}\left (\frac {960\,\sqrt {-\frac {20\,\sqrt {3}}{3}-\frac {139}{12}}}{2400\,x+1280\,\sqrt {3}\,x-800\,\sqrt {3}-1280}-\frac {320\,\sqrt {3}\,x\,\sqrt {-\frac {20\,\sqrt {3}}{3}-\frac {139}{12}}}{2400\,x+1280\,\sqrt {3}\,x-800\,\sqrt {3}-1280}\right )\,\sqrt {-\frac {20\,\sqrt {3}}{3}-\frac {139}{12}}+2\,\mathrm {atanh}\left (\frac {960\,\sqrt {\frac {20\,\sqrt {3}}{3}-\frac {139}{12}}}{2400\,x-1280\,\sqrt {3}\,x+800\,\sqrt {3}-1280}+\frac {320\,\sqrt {3}\,x\,\sqrt {\frac {20\,\sqrt {3}}{3}-\frac {139}{12}}}{2400\,x-1280\,\sqrt {3}\,x+800\,\sqrt {3}-1280}\right )\,\sqrt {\frac {20\,\sqrt {3}}{3}-\frac {139}{12}} \] Input:
int((8*x + 5*x^2 + 5)/(x^4 - x^2 + 1),x)
Output:
2*atanh((960*(- (20*3^(1/2))/3 - 139/12)^(1/2))/(2400*x + 1280*3^(1/2)*x - 800*3^(1/2) - 1280) - (320*3^(1/2)*x*(- (20*3^(1/2))/3 - 139/12)^(1/2))/( 2400*x + 1280*3^(1/2)*x - 800*3^(1/2) - 1280))*(- (20*3^(1/2))/3 - 139/12) ^(1/2) + 2*atanh((960*((20*3^(1/2))/3 - 139/12)^(1/2))/(2400*x - 1280*3^(1 /2)*x + 800*3^(1/2) - 1280) + (320*3^(1/2)*x*((20*3^(1/2))/3 - 139/12)^(1/ 2))/(2400*x - 1280*3^(1/2)*x + 800*3^(1/2) - 1280))*((20*3^(1/2))/3 - 139/ 12)^(1/2)
Time = 0.16 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.87 \[ \int \frac {5+8 x+5 x^2}{1-x^2+x^4} \, dx=-\frac {8 \sqrt {3}\, \mathit {atan} \left (\sqrt {3}-2 x \right )}{3}-5 \mathit {atan} \left (\sqrt {3}-2 x \right )-\frac {8 \sqrt {3}\, \mathit {atan} \left (\sqrt {3}+2 x \right )}{3}+5 \mathit {atan} \left (\sqrt {3}+2 x \right ) \] Input:
int((5*x^2+8*x+5)/(x^4-x^2+1),x)
Output:
( - 8*sqrt(3)*atan(sqrt(3) - 2*x) - 15*atan(sqrt(3) - 2*x) - 8*sqrt(3)*ata n(sqrt(3) + 2*x) + 15*atan(sqrt(3) + 2*x))/3