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

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

Optimal result

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

[Out]

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

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {390, 385, 212} \[ \int \frac {1}{\sqrt {1+x^2} \left (2+x^2\right )^2} \, dx=\frac {3 \text {arctanh}\left (\frac {x}{\sqrt {2} \sqrt {x^2+1}}\right )}{4 \sqrt {2}}-\frac {x \sqrt {x^2+1}}{4 \left (x^2+2\right )} \]

[In]

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

[Out]

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

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 385

Int[((a_) + (b_.)*(x_)^(n_))^(p_)/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Subst[Int[1/(c - (b*c - a*d)*x^n), x]
, x, x/(a + b*x^n)^(1/n)] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && EqQ[n*p + 1, 0] && IntegerQ[n]

Rule 390

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(-b)*x*(a + b*x^n)^(p + 1)*
((c + d*x^n)^(q + 1)/(a*n*(p + 1)*(b*c - a*d))), x] + Dist[(b*c + n*(p + 1)*(b*c - a*d))/(a*n*(p + 1)*(b*c - a
*d)), Int[(a + b*x^n)^(p + 1)*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, n, q}, x] && NeQ[b*c - a*d, 0] && Eq
Q[n*(p + q + 2) + 1, 0] && (LtQ[p, -1] ||  !LtQ[q, -1]) && NeQ[p, -1]

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

Mathematica [A] (verified)

Time = 0.14 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.15 \[ \int \frac {1}{\sqrt {1+x^2} \left (2+x^2\right )^2} \, dx=\frac {1}{8} \left (-\frac {2 x \sqrt {1+x^2}}{2+x^2}+3 \sqrt {2} \text {arctanh}\left (\frac {2+x^2-x \sqrt {1+x^2}}{\sqrt {2}}\right )\right ) \]

[In]

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

[Out]

((-2*x*Sqrt[1 + x^2])/(2 + x^2) + 3*Sqrt[2]*ArcTanh[(2 + x^2 - x*Sqrt[1 + x^2])/Sqrt[2]])/8

Maple [A] (verified)

Time = 0.30 (sec) , antiderivative size = 38, normalized size of antiderivative = 0.79

method result size
risch \(\frac {3 \,\operatorname {arctanh}\left (\frac {x \sqrt {2}}{2 \sqrt {x^{2}+1}}\right ) \sqrt {2}}{8}-\frac {x \sqrt {x^{2}+1}}{4 \left (x^{2}+2\right )}\) \(38\)
default \(\frac {x}{4 \sqrt {x^{2}+1}\, \left (\frac {x^{2}}{x^{2}+1}-2\right )}+\frac {3 \,\operatorname {arctanh}\left (\frac {x \sqrt {2}}{2 \sqrt {x^{2}+1}}\right ) \sqrt {2}}{8}\) \(46\)
pseudoelliptic \(\frac {\left (3 x^{2}+6\right ) \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {2}\, \sqrt {x^{2}+1}}{x}\right )-2 x \sqrt {x^{2}+1}}{8 x^{2}+16}\) \(48\)
trager \(-\frac {x \sqrt {x^{2}+1}}{4 \left (x^{2}+2\right )}+\frac {3 \operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right ) \ln \left (\frac {3 \operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right ) x^{2}+4 x \sqrt {x^{2}+1}+2 \operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right )}{x^{2}+2}\right )}{16}\) \(66\)

[In]

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

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 83 vs. \(2 (37) = 74\).

Time = 0.24 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.73 \[ \int \frac {1}{\sqrt {1+x^2} \left (2+x^2\right )^2} \, dx=\frac {3 \, \sqrt {2} {\left (x^{2} + 2\right )} \log \left (\frac {9 \, x^{2} + 2 \, \sqrt {2} {\left (3 \, x^{2} + 2\right )} + 2 \, \sqrt {x^{2} + 1} {\left (3 \, \sqrt {2} x + 4 \, x\right )} + 6}{x^{2} + 2}\right ) - 4 \, x^{2} - 4 \, \sqrt {x^{2} + 1} x - 8}{16 \, {\left (x^{2} + 2\right )}} \]

[In]

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

[Out]

1/16*(3*sqrt(2)*(x^2 + 2)*log((9*x^2 + 2*sqrt(2)*(3*x^2 + 2) + 2*sqrt(x^2 + 1)*(3*sqrt(2)*x + 4*x) + 6)/(x^2 +
 2)) - 4*x^2 - 4*sqrt(x^2 + 1)*x - 8)/(x^2 + 2)

Sympy [F]

\[ \int \frac {1}{\sqrt {1+x^2} \left (2+x^2\right )^2} \, dx=\int \frac {1}{\sqrt {x^{2} + 1} \left (x^{2} + 2\right )^{2}}\, dx \]

[In]

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

[Out]

Integral(1/(sqrt(x**2 + 1)*(x**2 + 2)**2), x)

Maxima [F]

\[ \int \frac {1}{\sqrt {1+x^2} \left (2+x^2\right )^2} \, dx=\int { \frac {1}{{\left (x^{2} + 2\right )}^{2} \sqrt {x^{2} + 1}} \,d x } \]

[In]

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

[Out]

integrate(1/((x^2 + 2)^2*sqrt(x^2 + 1)), x)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 101 vs. \(2 (37) = 74\).

Time = 0.30 (sec) , antiderivative size = 101, normalized size of antiderivative = 2.10 \[ \int \frac {1}{\sqrt {1+x^2} \left (2+x^2\right )^2} \, dx=-\frac {3}{16} \, \sqrt {2} \log \left (\frac {{\left (x - \sqrt {x^{2} + 1}\right )}^{2} - 2 \, \sqrt {2} + 3}{{\left (x - \sqrt {x^{2} + 1}\right )}^{2} + 2 \, \sqrt {2} + 3}\right ) - \frac {3 \, {\left (x - \sqrt {x^{2} + 1}\right )}^{2} + 1}{2 \, {\left ({\left (x - \sqrt {x^{2} + 1}\right )}^{4} + 6 \, {\left (x - \sqrt {x^{2} + 1}\right )}^{2} + 1\right )}} \]

[In]

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

[Out]

-3/16*sqrt(2)*log(((x - sqrt(x^2 + 1))^2 - 2*sqrt(2) + 3)/((x - sqrt(x^2 + 1))^2 + 2*sqrt(2) + 3)) - 1/2*(3*(x
 - sqrt(x^2 + 1))^2 + 1)/((x - sqrt(x^2 + 1))^4 + 6*(x - sqrt(x^2 + 1))^2 + 1)

Mupad [B] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 117, normalized size of antiderivative = 2.44 \[ \int \frac {1}{\sqrt {1+x^2} \left (2+x^2\right )^2} \, dx=-\frac {3\,\sqrt {2}\,\left (\ln \left (x-\sqrt {2}\,1{}\mathrm {i}\right )-\ln \left (1+\sqrt {2}\,x\,1{}\mathrm {i}+\sqrt {x^2+1}\,1{}\mathrm {i}\right )\right )}{16}+\frac {3\,\sqrt {2}\,\left (\ln \left (x+\sqrt {2}\,1{}\mathrm {i}\right )-\ln \left (1-\sqrt {2}\,x\,1{}\mathrm {i}+\sqrt {x^2+1}\,1{}\mathrm {i}\right )\right )}{16}-\frac {\sqrt {x^2+1}}{8\,\left (x-\sqrt {2}\,1{}\mathrm {i}\right )}-\frac {\sqrt {x^2+1}}{8\,\left (x+\sqrt {2}\,1{}\mathrm {i}\right )} \]

[In]

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

[Out]

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