Integrand size = 18, antiderivative size = 85 \[ \int \frac {-1+x^2}{9+5 x^2+x^4} \, dx=-\frac {\arctan \left (\frac {1}{11} \left (-\sqrt {11}-2 \sqrt {11} x\right )\right )}{3 \sqrt {11}}+\frac {\arctan \left (\frac {1}{11} \left (-\sqrt {11}+2 \sqrt {11} x\right )\right )}{3 \sqrt {11}}+\frac {1}{3} \log \left (3-x+x^2\right )-\frac {1}{3} \log \left (3+x+x^2\right ) \] Output:
1/33*arctan(1/11*11^(1/2)+2/11*11^(1/2)*x)*11^(1/2)+1/33*arctan(-1/11*11^( 1/2)+2/11*11^(1/2)*x)*11^(1/2)+1/3*ln(x^2-x+3)-1/3*ln(x^2+x+3)
Result contains complex when optimal does not.
Time = 0.15 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.16 \[ \int \frac {-1+x^2}{9+5 x^2+x^4} \, dx=\frac {\left (7 i+\sqrt {11}\right ) \arctan \left (\frac {x}{\sqrt {\frac {1}{2} \left (5-i \sqrt {11}\right )}}\right )}{\sqrt {22 \left (5-i \sqrt {11}\right )}}+\frac {\left (-7 i+\sqrt {11}\right ) \arctan \left (\frac {x}{\sqrt {\frac {1}{2} \left (5+i \sqrt {11}\right )}}\right )}{\sqrt {22 \left (5+i \sqrt {11}\right )}} \] Input:
Integrate[(-1 + x^2)/(9 + 5*x^2 + x^4),x]
Output:
((7*I + Sqrt[11])*ArcTan[x/Sqrt[(5 - I*Sqrt[11])/2]])/Sqrt[22*(5 - I*Sqrt[ 11])] + ((-7*I + Sqrt[11])*ArcTan[x/Sqrt[(5 + I*Sqrt[11])/2]])/Sqrt[22*(5 + I*Sqrt[11])]
Time = 0.42 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.81, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.389, Rules used = {1483, 25, 1142, 25, 1083, 217, 1103}
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^2-1}{x^4+5 x^2+9} \, dx\) |
\(\Big \downarrow \) 1483 |
\(\displaystyle \frac {1}{6} \int -\frac {1-4 x}{x^2-x+3}dx+\frac {1}{6} \int -\frac {4 x+1}{x^2+x+3}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {1}{6} \int \frac {1-4 x}{x^2-x+3}dx-\frac {1}{6} \int \frac {4 x+1}{x^2+x+3}dx\) |
\(\Big \downarrow \) 1142 |
\(\displaystyle \frac {1}{6} \left (\int \frac {1}{x^2-x+3}dx+2 \int -\frac {1-2 x}{x^2-x+3}dx\right )+\frac {1}{6} \left (\int \frac {1}{x^2+x+3}dx-2 \int \frac {2 x+1}{x^2+x+3}dx\right )\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {1}{6} \left (\int \frac {1}{x^2-x+3}dx-2 \int \frac {1-2 x}{x^2-x+3}dx\right )+\frac {1}{6} \left (\int \frac {1}{x^2+x+3}dx-2 \int \frac {2 x+1}{x^2+x+3}dx\right )\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle \frac {1}{6} \left (-2 \int \frac {1-2 x}{x^2-x+3}dx-2 \int \frac {1}{-(2 x-1)^2-11}d(2 x-1)\right )+\frac {1}{6} \left (-2 \int \frac {2 x+1}{x^2+x+3}dx-2 \int \frac {1}{-(2 x+1)^2-11}d(2 x+1)\right )\) |
\(\Big \downarrow \) 217 |
\(\displaystyle \frac {1}{6} \left (\frac {2 \arctan \left (\frac {2 x-1}{\sqrt {11}}\right )}{\sqrt {11}}-2 \int \frac {1-2 x}{x^2-x+3}dx\right )+\frac {1}{6} \left (\frac {2 \arctan \left (\frac {2 x+1}{\sqrt {11}}\right )}{\sqrt {11}}-2 \int \frac {2 x+1}{x^2+x+3}dx\right )\) |
\(\Big \downarrow \) 1103 |
\(\displaystyle \frac {1}{6} \left (\frac {2 \arctan \left (\frac {2 x-1}{\sqrt {11}}\right )}{\sqrt {11}}+2 \log \left (x^2-x+3\right )\right )+\frac {1}{6} \left (\frac {2 \arctan \left (\frac {2 x+1}{\sqrt {11}}\right )}{\sqrt {11}}-2 \log \left (x^2+x+3\right )\right )\) |
Input:
Int[(-1 + x^2)/(9 + 5*x^2 + x^4),x]
Output:
((2*ArcTan[(-1 + 2*x)/Sqrt[11]])/Sqrt[11] + 2*Log[3 - x + x^2])/6 + ((2*Ar cTan[(1 + 2*x)/Sqrt[11]])/Sqrt[11] - 2*Log[3 + x + x^2])/6
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[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S imp[d*(Log[RemoveContent[a + b*x + c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]
Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S imp[(2*c*d - b*e)/(2*c) Int[1/(a + b*x + c*x^2), x], x] + Simp[e/(2*c) Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x]
Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] : > With[{q = Rt[a/c, 2]}, With[{r = Rt[2*q - b/c, 2]}, Simp[1/(2*c*q*r) In t[(d*r - (d - e*q)*x)/(q - r*x + x^2), x], x] + Simp[1/(2*c*q*r) Int[(d*r + (d - e*q)*x)/(q + r*x + x^2), x], x]]] /; FreeQ[{a, b, c, d, e}, x] && N eQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && NegQ[b^2 - 4*a*c]
Time = 0.05 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.64
method | result | size |
default | \(\frac {\ln \left (x^{2}-x +3\right )}{3}+\frac {\sqrt {11}\, \arctan \left (\frac {\left (2 x -1\right ) \sqrt {11}}{11}\right )}{33}-\frac {\ln \left (x^{2}+x +3\right )}{3}+\frac {\sqrt {11}\, \arctan \left (\frac {\left (1+2 x \right ) \sqrt {11}}{11}\right )}{33}\) | \(54\) |
risch | \(-\frac {\ln \left (4 x^{2}+4 x +12\right )}{3}+\frac {\sqrt {11}\, \arctan \left (\frac {\left (1+2 x \right ) \sqrt {11}}{11}\right )}{33}+\frac {\ln \left (4 x^{2}-4 x +12\right )}{3}+\frac {\sqrt {11}\, \arctan \left (\frac {\left (2 x -1\right ) \sqrt {11}}{11}\right )}{33}\) | \(60\) |
Input:
int((x^2-1)/(x^4+5*x^2+9),x,method=_RETURNVERBOSE)
Output:
1/3*ln(x^2-x+3)+1/33*11^(1/2)*arctan(1/11*(2*x-1)*11^(1/2))-1/3*ln(x^2+x+3 )+1/33*11^(1/2)*arctan(1/11*(1+2*x)*11^(1/2))
Time = 0.07 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.62 \[ \int \frac {-1+x^2}{9+5 x^2+x^4} \, dx=\frac {1}{33} \, \sqrt {11} \arctan \left (\frac {1}{11} \, \sqrt {11} {\left (2 \, x + 1\right )}\right ) + \frac {1}{33} \, \sqrt {11} \arctan \left (\frac {1}{11} \, \sqrt {11} {\left (2 \, x - 1\right )}\right ) - \frac {1}{3} \, \log \left (x^{2} + x + 3\right ) + \frac {1}{3} \, \log \left (x^{2} - x + 3\right ) \] Input:
integrate((x^2-1)/(x^4+5*x^2+9),x, algorithm="fricas")
Output:
1/33*sqrt(11)*arctan(1/11*sqrt(11)*(2*x + 1)) + 1/33*sqrt(11)*arctan(1/11* sqrt(11)*(2*x - 1)) - 1/3*log(x^2 + x + 3) + 1/3*log(x^2 - x + 3)
Time = 0.09 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.82 \[ \int \frac {-1+x^2}{9+5 x^2+x^4} \, dx=\frac {\log {\left (x^{2} - x + 3 \right )}}{3} - \frac {\log {\left (x^{2} + x + 3 \right )}}{3} + \frac {\sqrt {11} \operatorname {atan}{\left (\frac {2 \sqrt {11} x}{11} - \frac {\sqrt {11}}{11} \right )}}{33} + \frac {\sqrt {11} \operatorname {atan}{\left (\frac {2 \sqrt {11} x}{11} + \frac {\sqrt {11}}{11} \right )}}{33} \] Input:
integrate((x**2-1)/(x**4+5*x**2+9),x)
Output:
log(x**2 - x + 3)/3 - log(x**2 + x + 3)/3 + sqrt(11)*atan(2*sqrt(11)*x/11 - sqrt(11)/11)/33 + sqrt(11)*atan(2*sqrt(11)*x/11 + sqrt(11)/11)/33
Time = 0.10 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.62 \[ \int \frac {-1+x^2}{9+5 x^2+x^4} \, dx=\frac {1}{33} \, \sqrt {11} \arctan \left (\frac {1}{11} \, \sqrt {11} {\left (2 \, x + 1\right )}\right ) + \frac {1}{33} \, \sqrt {11} \arctan \left (\frac {1}{11} \, \sqrt {11} {\left (2 \, x - 1\right )}\right ) - \frac {1}{3} \, \log \left (x^{2} + x + 3\right ) + \frac {1}{3} \, \log \left (x^{2} - x + 3\right ) \] Input:
integrate((x^2-1)/(x^4+5*x^2+9),x, algorithm="maxima")
Output:
1/33*sqrt(11)*arctan(1/11*sqrt(11)*(2*x + 1)) + 1/33*sqrt(11)*arctan(1/11* sqrt(11)*(2*x - 1)) - 1/3*log(x^2 + x + 3) + 1/3*log(x^2 - x + 3)
Time = 0.12 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.62 \[ \int \frac {-1+x^2}{9+5 x^2+x^4} \, dx=\frac {1}{33} \, \sqrt {11} \arctan \left (\frac {1}{11} \, \sqrt {11} {\left (2 \, x + 1\right )}\right ) + \frac {1}{33} \, \sqrt {11} \arctan \left (\frac {1}{11} \, \sqrt {11} {\left (2 \, x - 1\right )}\right ) - \frac {1}{3} \, \log \left (x^{2} + x + 3\right ) + \frac {1}{3} \, \log \left (x^{2} - x + 3\right ) \] Input:
integrate((x^2-1)/(x^4+5*x^2+9),x, algorithm="giac")
Output:
1/33*sqrt(11)*arctan(1/11*sqrt(11)*(2*x + 1)) + 1/33*sqrt(11)*arctan(1/11* sqrt(11)*(2*x - 1)) - 1/3*log(x^2 + x + 3) + 1/3*log(x^2 - x + 3)
Time = 0.12 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.98 \[ \int \frac {-1+x^2}{9+5 x^2+x^4} \, dx=\mathrm {atan}\left (\frac {x\,136{}\mathrm {i}}{27\,\left (-\frac {184}{9}+\frac {\sqrt {11}\,8{}\mathrm {i}}{9}\right )}-\frac {88\,\sqrt {11}\,x}{27\,\left (-\frac {184}{9}+\frac {\sqrt {11}\,8{}\mathrm {i}}{9}\right )}\right )\,\left (\frac {\sqrt {11}}{33}-\frac {2}{3}{}\mathrm {i}\right )+\mathrm {atan}\left (\frac {x\,136{}\mathrm {i}}{27\,\left (\frac {184}{9}+\frac {\sqrt {11}\,8{}\mathrm {i}}{9}\right )}+\frac {88\,\sqrt {11}\,x}{27\,\left (\frac {184}{9}+\frac {\sqrt {11}\,8{}\mathrm {i}}{9}\right )}\right )\,\left (\frac {\sqrt {11}}{33}+\frac {2}{3}{}\mathrm {i}\right ) \] Input:
int((x^2 - 1)/(5*x^2 + x^4 + 9),x)
Output:
atan((x*136i)/(27*((11^(1/2)*8i)/9 - 184/9)) - (88*11^(1/2)*x)/(27*((11^(1 /2)*8i)/9 - 184/9)))*(11^(1/2)/33 - 2i/3) + atan((x*136i)/(27*((11^(1/2)*8 i)/9 + 184/9)) + (88*11^(1/2)*x)/(27*((11^(1/2)*8i)/9 + 184/9)))*(11^(1/2) /33 + 2i/3)
Time = 0.18 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.60 \[ \int \frac {-1+x^2}{9+5 x^2+x^4} \, dx=\frac {\sqrt {11}\, \mathit {atan} \left (\frac {2 x -1}{\sqrt {11}}\right )}{33}+\frac {\sqrt {11}\, \mathit {atan} \left (\frac {2 x +1}{\sqrt {11}}\right )}{33}+\frac {\mathrm {log}\left (x^{2}-x +3\right )}{3}-\frac {\mathrm {log}\left (x^{2}+x +3\right )}{3} \] Input:
int((x^2-1)/(x^4+5*x^2+9),x)
Output:
(sqrt(11)*atan((2*x - 1)/sqrt(11)) + sqrt(11)*atan((2*x + 1)/sqrt(11)) + 1 1*log(x**2 - x + 3) - 11*log(x**2 + x + 3))/33