\(\int \frac {x^2}{(1-x^2) (1+x^2)^2} \, dx\) [344]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 20, antiderivative size = 19 \[ \int \frac {x^2}{\left (1-x^2\right ) \left (1+x^2\right )^2} \, dx=-\frac {x}{4 \left (1+x^2\right )}+\frac {\text {arctanh}(x)}{4} \]

[Out]

-1/4*x/(x^2+1)+1/4*arctanh(x)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 19, 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.100, Rules used = {482, 212} \[ \int \frac {x^2}{\left (1-x^2\right ) \left (1+x^2\right )^2} \, dx=\frac {\text {arctanh}(x)}{4}-\frac {x}{4 \left (x^2+1\right )} \]

[In]

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

[Out]

-1/4*x/(1 + x^2) + ArcTanh[x]/4

Rule 212

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

Rule 482

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[e^(n - 1
)*(e*x)^(m - n + 1)*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(n*(b*c - a*d)*(p + 1))), x] - Dist[e^n/(n*(b*c -
 a*d)*(p + 1)), Int[(e*x)^(m - n)*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(m - n + 1) + d*(m + n*(p + q + 1)
+ 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, q}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && LtQ[p, -1] && GeQ[n
, m - n + 1] && GtQ[m - n + 1, 0] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]

Rubi steps \begin{align*} \text {integral}& = -\frac {x}{4 \left (1+x^2\right )}+\frac {1}{4} \int \frac {1}{1-x^2} \, dx \\ & = -\frac {x}{4 \left (1+x^2\right )}+\frac {1}{4} \tanh ^{-1}(x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.42 \[ \int \frac {x^2}{\left (1-x^2\right ) \left (1+x^2\right )^2} \, dx=\frac {1}{8} \left (-\frac {2 x}{1+x^2}-\log (1-x)+\log (1+x)\right ) \]

[In]

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

[Out]

((-2*x)/(1 + x^2) - Log[1 - x] + Log[1 + x])/8

Maple [A] (verified)

Time = 0.83 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.26

method result size
default \(\frac {\ln \left (x +1\right )}{8}-\frac {x}{4 \left (x^{2}+1\right )}-\frac {\ln \left (x -1\right )}{8}\) \(24\)
norman \(\frac {\ln \left (x +1\right )}{8}-\frac {x}{4 \left (x^{2}+1\right )}-\frac {\ln \left (x -1\right )}{8}\) \(24\)
risch \(\frac {\ln \left (x +1\right )}{8}-\frac {x}{4 \left (x^{2}+1\right )}-\frac {\ln \left (x -1\right )}{8}\) \(24\)
parallelrisch \(-\frac {\ln \left (x -1\right ) x^{2}-\ln \left (x +1\right ) x^{2}+\ln \left (x -1\right )-\ln \left (x +1\right )+2 x}{8 \left (x^{2}+1\right )}\) \(41\)

[In]

int(x^2/(-x^2+1)/(x^2+1)^2,x,method=_RETURNVERBOSE)

[Out]

1/8*ln(x+1)-1/4*x/(x^2+1)-1/8*ln(x-1)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 34 vs. \(2 (15) = 30\).

Time = 0.25 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.79 \[ \int \frac {x^2}{\left (1-x^2\right ) \left (1+x^2\right )^2} \, dx=\frac {{\left (x^{2} + 1\right )} \log \left (x + 1\right ) - {\left (x^{2} + 1\right )} \log \left (x - 1\right ) - 2 \, x}{8 \, {\left (x^{2} + 1\right )}} \]

[In]

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

[Out]

1/8*((x^2 + 1)*log(x + 1) - (x^2 + 1)*log(x - 1) - 2*x)/(x^2 + 1)

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.05 \[ \int \frac {x^2}{\left (1-x^2\right ) \left (1+x^2\right )^2} \, dx=- \frac {x}{4 x^{2} + 4} - \frac {\log {\left (x - 1 \right )}}{8} + \frac {\log {\left (x + 1 \right )}}{8} \]

[In]

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

[Out]

-x/(4*x**2 + 4) - log(x - 1)/8 + log(x + 1)/8

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.21 \[ \int \frac {x^2}{\left (1-x^2\right ) \left (1+x^2\right )^2} \, dx=-\frac {x}{4 \, {\left (x^{2} + 1\right )}} + \frac {1}{8} \, \log \left (x + 1\right ) - \frac {1}{8} \, \log \left (x - 1\right ) \]

[In]

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

[Out]

-1/4*x/(x^2 + 1) + 1/8*log(x + 1) - 1/8*log(x - 1)

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.58 \[ \int \frac {x^2}{\left (1-x^2\right ) \left (1+x^2\right )^2} \, dx=-\frac {1}{4 \, {\left (x + \frac {1}{x}\right )}} + \frac {1}{16} \, \log \left ({\left | x + \frac {1}{x} + 2 \right |}\right ) - \frac {1}{16} \, \log \left ({\left | x + \frac {1}{x} - 2 \right |}\right ) \]

[In]

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

[Out]

-1/4/(x + 1/x) + 1/16*log(abs(x + 1/x + 2)) - 1/16*log(abs(x + 1/x - 2))

Mupad [B] (verification not implemented)

Time = 9.91 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.89 \[ \int \frac {x^2}{\left (1-x^2\right ) \left (1+x^2\right )^2} \, dx=\frac {\mathrm {atanh}\left (x\right )}{4}-\frac {x}{4\,\left (x^2+1\right )} \]

[In]

int(-x^2/((x^2 - 1)*(x^2 + 1)^2),x)

[Out]

atanh(x)/4 - x/(4*(x^2 + 1))