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

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

Optimal result

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

[Out]

-1/3*x/(2*x^2+1)^(1/2)+2/9*arctanh(-1/3*6^(1/2)+1/3*x^2*6^(1/2)-1/3*x*(2*x^2+1)^(1/2)*3^(1/2))*3^(1/2)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 45, normalized size of antiderivative = 0.69, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {541, 12, 385, 213} \[ \int \frac {1+x^2}{\left (-1+x^2\right ) \left (1+2 x^2\right )^{3/2}} \, dx=-\frac {2 \text {arctanh}\left (\frac {\sqrt {3} x}{\sqrt {2 x^2+1}}\right )}{3 \sqrt {3}}-\frac {x}{3 \sqrt {2 x^2+1}} \]

[In]

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

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 213

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

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

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

Mathematica [A] (verified)

Time = 0.14 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.92 \[ \int \frac {1+x^2}{\left (-1+x^2\right ) \left (1+2 x^2\right )^{3/2}} \, dx=\frac {1}{9} \left (-\frac {3 x}{\sqrt {1+2 x^2}}-2 \sqrt {3} \text {arctanh}\left (\frac {1}{3} \left (\sqrt {6}-\sqrt {6} x^2+x \sqrt {3+6 x^2}\right )\right )\right ) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 1.08 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.71

method result size
pseudoelliptic \(-\frac {\frac {2 \sqrt {3}\, \operatorname {arctanh}\left (\frac {\sqrt {3}\, \sqrt {2 x^{2}+1}}{3 x}\right ) \sqrt {2 x^{2}+1}}{3}+x}{3 \sqrt {2 x^{2}+1}}\) \(46\)
trager \(-\frac {x}{3 \sqrt {2 x^{2}+1}}+\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}-3\right ) \ln \left (-\frac {-5 \operatorname {RootOf}\left (\textit {\_Z}^{2}-3\right ) x^{2}+6 \sqrt {2 x^{2}+1}\, x -\operatorname {RootOf}\left (\textit {\_Z}^{2}-3\right )}{\left (x -1\right ) \left (1+x \right )}\right )}{9}\) \(67\)
risch \(-\frac {x}{3 \sqrt {2 x^{2}+1}}-\frac {\sqrt {3}\, \operatorname {arctanh}\left (\frac {\left (4 x +2\right ) \sqrt {3}}{6 \sqrt {2 \left (x -1\right )^{2}+4 x -1}}\right )}{9}+\frac {\sqrt {3}\, \operatorname {arctanh}\left (\frac {\left (2-4 x \right ) \sqrt {3}}{6 \sqrt {2 \left (1+x \right )^{2}-1-4 x}}\right )}{9}\) \(74\)
default \(\frac {x}{\sqrt {2 x^{2}+1}}+\frac {1}{3 \sqrt {2 \left (x -1\right )^{2}+4 x -1}}-\frac {2 x}{3 \sqrt {2 \left (x -1\right )^{2}+4 x -1}}-\frac {\sqrt {3}\, \operatorname {arctanh}\left (\frac {\left (4 x +2\right ) \sqrt {3}}{6 \sqrt {2 \left (x -1\right )^{2}+4 x -1}}\right )}{9}-\frac {1}{3 \sqrt {2 \left (1+x \right )^{2}-1-4 x}}-\frac {2 x}{3 \sqrt {2 \left (1+x \right )^{2}-1-4 x}}+\frac {\sqrt {3}\, \operatorname {arctanh}\left (\frac {\left (2-4 x \right ) \sqrt {3}}{6 \sqrt {2 \left (1+x \right )^{2}-1-4 x}}\right )}{9}\) \(139\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.02 \[ \int \frac {1+x^2}{\left (-1+x^2\right ) \left (1+2 x^2\right )^{3/2}} \, dx=\frac {\sqrt {3} {\left (2 \, x^{2} + 1\right )} \log \left (\frac {2 \, \sqrt {3} \sqrt {2 \, x^{2} + 1} x - 5 \, x^{2} - 1}{x^{2} - 1}\right ) - 3 \, \sqrt {2 \, x^{2} + 1} x}{9 \, {\left (2 \, x^{2} + 1\right )}} \]

[In]

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

[Out]

1/9*(sqrt(3)*(2*x^2 + 1)*log((2*sqrt(3)*sqrt(2*x^2 + 1)*x - 5*x^2 - 1)/(x^2 - 1)) - 3*sqrt(2*x^2 + 1)*x)/(2*x^
2 + 1)

Sympy [F]

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

[In]

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

[Out]

Integral((x**2 + 1)/((x - 1)*(x + 1)*(2*x**2 + 1)**(3/2)), x)

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.23 \[ \int \frac {1+x^2}{\left (-1+x^2\right ) \left (1+2 x^2\right )^{3/2}} \, dx=-\frac {1}{9} \, \sqrt {3} \operatorname {arsinh}\left (\frac {2 \, \sqrt {2} x}{{\left | 2 \, x + 2 \right |}} - \frac {\sqrt {2}}{{\left | 2 \, x + 2 \right |}}\right ) - \frac {1}{9} \, \sqrt {3} \operatorname {arsinh}\left (\frac {2 \, \sqrt {2} x}{{\left | 2 \, x - 2 \right |}} + \frac {\sqrt {2}}{{\left | 2 \, x - 2 \right |}}\right ) - \frac {x}{3 \, \sqrt {2 \, x^{2} + 1}} \]

[In]

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

[Out]

-1/9*sqrt(3)*arcsinh(2*sqrt(2)*x/abs(2*x + 2) - sqrt(2)/abs(2*x + 2)) - 1/9*sqrt(3)*arcsinh(2*sqrt(2)*x/abs(2*
x - 2) + sqrt(2)/abs(2*x - 2)) - 1/3*x/sqrt(2*x^2 + 1)

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.28 \[ \int \frac {1+x^2}{\left (-1+x^2\right ) \left (1+2 x^2\right )^{3/2}} \, dx=-\frac {1}{18} \, \sqrt {6} \sqrt {2} \log \left (\frac {{\left | 2 \, {\left (\sqrt {2} x - \sqrt {2 \, x^{2} + 1}\right )}^{2} - 4 \, \sqrt {6} - 10 \right |}}{{\left | 2 \, {\left (\sqrt {2} x - \sqrt {2 \, x^{2} + 1}\right )}^{2} + 4 \, \sqrt {6} - 10 \right |}}\right ) - \frac {x}{3 \, \sqrt {2 \, x^{2} + 1}} \]

[In]

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

[Out]

-1/18*sqrt(6)*sqrt(2)*log(abs(2*(sqrt(2)*x - sqrt(2*x^2 + 1))^2 - 4*sqrt(6) - 10)/abs(2*(sqrt(2)*x - sqrt(2*x^
2 + 1))^2 + 4*sqrt(6) - 10)) - 1/3*x/sqrt(2*x^2 + 1)

Mupad [B] (verification not implemented)

Time = 5.62 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.71 \[ \int \frac {1+x^2}{\left (-1+x^2\right ) \left (1+2 x^2\right )^{3/2}} \, dx=\frac {\sqrt {3}\,\left (\ln \left (x-1\right )-\ln \left (x+\frac {\sqrt {2}\,\sqrt {3}\,\sqrt {x^2+\frac {1}{2}}}{2}+\frac {1}{2}\right )\right )}{9}-\frac {\sqrt {3}\,\left (\ln \left (x+1\right )-\ln \left (x-\frac {\sqrt {2}\,\sqrt {3}\,\sqrt {x^2+\frac {1}{2}}}{2}-\frac {1}{2}\right )\right )}{9}-\frac {\sqrt {2}\,\sqrt {x^2+\frac {1}{2}}}{12\,\left (x-\frac {\sqrt {2}\,1{}\mathrm {i}}{2}\right )}-\frac {\sqrt {2}\,\sqrt {x^2+\frac {1}{2}}}{12\,\left (x+\frac {\sqrt {2}\,1{}\mathrm {i}}{2}\right )} \]

[In]

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

[Out]

(3^(1/2)*(log(x - 1) - log(x + (2^(1/2)*3^(1/2)*(x^2 + 1/2)^(1/2))/2 + 1/2)))/9 - (3^(1/2)*(log(x + 1) - log(x
 - (2^(1/2)*3^(1/2)*(x^2 + 1/2)^(1/2))/2 - 1/2)))/9 - (2^(1/2)*(x^2 + 1/2)^(1/2))/(12*(x - (2^(1/2)*1i)/2)) -
(2^(1/2)*(x^2 + 1/2)^(1/2))/(12*(x + (2^(1/2)*1i)/2))