3.109 \(\int \frac{x^2}{-2+x^2+x^4} \, dx\)

Optimal. Leaf size=24 \[ \frac{1}{3} \sqrt{2} \tan ^{-1}\left (\frac{x}{\sqrt{2}}\right )-\frac{1}{3} \tanh ^{-1}(x) \]

[Out]

(Sqrt[2]*ArcTan[x/Sqrt[2]])/3 - ArcTanh[x]/3

________________________________________________________________________________________

Rubi [A]  time = 0.0099284, antiderivative size = 24, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214, Rules used = {1130, 203, 207} \[ \frac{1}{3} \sqrt{2} \tan ^{-1}\left (\frac{x}{\sqrt{2}}\right )-\frac{1}{3} \tanh ^{-1}(x) \]

Antiderivative was successfully verified.

[In]

Int[x^2/(-2 + x^2 + x^4),x]

[Out]

(Sqrt[2]*ArcTan[x/Sqrt[2]])/3 - ArcTanh[x]/3

Rule 1130

Int[((d_.)*(x_))^(m_)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[(
d^2*(b/q + 1))/2, Int[(d*x)^(m - 2)/(b/2 + q/2 + c*x^2), x], x] - Dist[(d^2*(b/q - 1))/2, Int[(d*x)^(m - 2)/(b
/2 - q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[b^2 - 4*a*c, 0] && GeQ[m, 2]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{x^2}{-2+x^2+x^4} \, dx &=\frac{1}{3} \int \frac{1}{-1+x^2} \, dx+\frac{2}{3} \int \frac{1}{2+x^2} \, dx\\ &=\frac{1}{3} \sqrt{2} \tan ^{-1}\left (\frac{x}{\sqrt{2}}\right )-\frac{1}{3} \tanh ^{-1}(x)\\ \end{align*}

Mathematica [A]  time = 0.0093032, size = 32, normalized size = 1.33 \[ \frac{1}{6} \left (\log (1-x)-\log (x+1)+2 \sqrt{2} \tan ^{-1}\left (\frac{x}{\sqrt{2}}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[x^2/(-2 + x^2 + x^4),x]

[Out]

(2*Sqrt[2]*ArcTan[x/Sqrt[2]] + Log[1 - x] - Log[1 + x])/6

________________________________________________________________________________________

Maple [A]  time = 0.007, size = 26, normalized size = 1.1 \begin{align*} -{\frac{\ln \left ( 1+x \right ) }{6}}+{\frac{\ln \left ( -1+x \right ) }{6}}+{\frac{\sqrt{2}}{3}\arctan \left ({\frac{x\sqrt{2}}{2}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2/(x^4+x^2-2),x)

[Out]

-1/6*ln(1+x)+1/6*ln(-1+x)+1/3*arctan(1/2*x*2^(1/2))*2^(1/2)

________________________________________________________________________________________

Maxima [A]  time = 1.43036, size = 34, normalized size = 1.42 \begin{align*} \frac{1}{3} \, \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2} x\right ) - \frac{1}{6} \, \log \left (x + 1\right ) + \frac{1}{6} \, \log \left (x - 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/(x^4+x^2-2),x, algorithm="maxima")

[Out]

1/3*sqrt(2)*arctan(1/2*sqrt(2)*x) - 1/6*log(x + 1) + 1/6*log(x - 1)

________________________________________________________________________________________

Fricas [A]  time = 2.14877, size = 93, normalized size = 3.88 \begin{align*} \frac{1}{3} \, \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2} x\right ) - \frac{1}{6} \, \log \left (x + 1\right ) + \frac{1}{6} \, \log \left (x - 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/(x^4+x^2-2),x, algorithm="fricas")

[Out]

1/3*sqrt(2)*arctan(1/2*sqrt(2)*x) - 1/6*log(x + 1) + 1/6*log(x - 1)

________________________________________________________________________________________

Sympy [A]  time = 0.131159, size = 29, normalized size = 1.21 \begin{align*} \frac{\log{\left (x - 1 \right )}}{6} - \frac{\log{\left (x + 1 \right )}}{6} + \frac{\sqrt{2} \operatorname{atan}{\left (\frac{\sqrt{2} x}{2} \right )}}{3} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2/(x**4+x**2-2),x)

[Out]

log(x - 1)/6 - log(x + 1)/6 + sqrt(2)*atan(sqrt(2)*x/2)/3

________________________________________________________________________________________

Giac [A]  time = 1.05814, size = 36, normalized size = 1.5 \begin{align*} \frac{1}{3} \, \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2} x\right ) - \frac{1}{6} \, \log \left ({\left | x + 1 \right |}\right ) + \frac{1}{6} \, \log \left ({\left | x - 1 \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/(x^4+x^2-2),x, algorithm="giac")

[Out]

1/3*sqrt(2)*arctan(1/2*sqrt(2)*x) - 1/6*log(abs(x + 1)) + 1/6*log(abs(x - 1))