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

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

Optimal result

Integrand size = 22, antiderivative size = 77 \[ \int \frac {\sqrt {1+x^2}}{x^3 \left (1-x^3\right )} \, dx=-\frac {\sqrt {1+x^2}}{2 x^2}+\frac {2}{3} \arctan \left (\frac {1+x}{\sqrt {1+x^2}}\right )+\frac {1}{3} \sqrt {2} \text {arctanh}\left (\frac {1+x}{\sqrt {2} \sqrt {1+x^2}}\right )-\frac {1}{2} \text {arctanh}\left (\sqrt {1+x^2}\right ) \] Output:

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

Mathematica [A] (verified)

Time = 0.28 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.38 \[ \int \frac {\sqrt {1+x^2}}{x^3 \left (1-x^3\right )} \, dx=\text {arctanh}\left (x-\sqrt {1+x^2}\right )+\frac {1}{6} \left (-\frac {3 \sqrt {1+x^2}}{x^2}-4 \arctan \left (\frac {1+x+2 x^2-(1+2 x) \sqrt {1+x^2}}{1-x+\sqrt {1+x^2}}\right )+4 \sqrt {2} \text {arctanh}\left (\frac {1-x+\sqrt {1+x^2}}{\sqrt {2}}\right )\right ) \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.71 (sec) , antiderivative size = 77, 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.091, Rules used = {7276, 2009}

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 {\sqrt {x^2+1}}{x^3 \left (1-x^3\right )} \, dx\)

\(\Big \downarrow \) 7276

\(\displaystyle \int \left (\frac {\sqrt {x^2+1} (x+2)}{3 \left (x^2+x+1\right )}-\frac {\sqrt {x^2+1}}{3 (x-1)}+\frac {\sqrt {x^2+1}}{x^3}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {2}{3} \arctan \left (\frac {x+1}{\sqrt {x^2+1}}\right )+\frac {1}{3} \sqrt {2} \text {arctanh}\left (\frac {x+1}{\sqrt {2} \sqrt {x^2+1}}\right )-\frac {1}{2} \text {arctanh}\left (\sqrt {x^2+1}\right )-\frac {\sqrt {x^2+1}}{2 x^2}\)

Input:

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

Output:

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

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 7276
Int[(u_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> With[{v = RationalFunctionE 
xpand[u/(a + b*x^n), x]}, Int[v, x] /; SumQ[v]] /; FreeQ[{a, b}, x] && IGtQ 
[n, 0]
 
Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.37 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.51

method result size
trager \(-\frac {\sqrt {x^{2}+1}}{2 x^{2}}-\frac {\ln \left (\frac {\sqrt {x^{2}+1}+1}{x}\right )}{2}+\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right ) \ln \left (\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right ) x +\operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right )+2 \sqrt {x^{2}+1}}{x -1}\right )}{3}+\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) \ln \left (-\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) x -\sqrt {x^{2}+1}\, x -\sqrt {x^{2}+1}}{x^{2}+x +1}\right )}{3}\) \(116\)
risch \(-\frac {\sqrt {x^{2}+1}}{2 x^{2}}-\frac {\operatorname {arctanh}\left (\frac {1}{\sqrt {x^{2}+1}}\right )}{2}+\frac {\sqrt {2}\, \operatorname {arctanh}\left (\frac {\left (2 x +2\right ) \sqrt {2}}{4 \sqrt {\left (x -1\right )^{2}+2 x}}\right )}{3}+\frac {\sqrt {2}\, \sqrt {\frac {2 \left (x +1\right )^{2}}{\left (1-x \right )^{2}}+2}\, \arctan \left (\frac {\sqrt {\frac {2 \left (x +1\right )^{2}}{\left (1-x \right )^{2}}+2}\, \left (x +1\right )}{\left (\frac {\left (x +1\right )^{2}}{\left (1-x \right )^{2}}+1\right ) \left (1-x \right )}\right )}{3 \sqrt {\frac {\frac {\left (x +1\right )^{2}}{\left (1-x \right )^{2}}+1}{\left (\frac {x +1}{1-x}+1\right )^{2}}}\, \left (\frac {x +1}{1-x}+1\right )}\) \(169\)
default \(-\frac {\left (x^{2}+1\right )^{\frac {3}{2}}}{2 x^{2}}+\frac {5 \sqrt {x^{2}+1}}{6}-\frac {\operatorname {arctanh}\left (\frac {1}{\sqrt {x^{2}+1}}\right )}{2}-\frac {\sqrt {\left (x -1\right )^{2}+2 x}}{3}+\frac {\sqrt {2}\, \operatorname {arctanh}\left (\frac {\left (2 x +2\right ) \sqrt {2}}{4 \sqrt {\left (x -1\right )^{2}+2 x}}\right )}{3}+\frac {\sqrt {2}\, \sqrt {\frac {2 \left (x +1\right )^{2}}{\left (1-x \right )^{2}}+2}\, \left (\sqrt {3}\, \operatorname {arctanh}\left (\frac {\sqrt {\frac {2 \left (x +1\right )^{2}}{\left (1-x \right )^{2}}+2}\, \sqrt {3}}{2}\right )+\arctan \left (\frac {\sqrt {\frac {2 \left (x +1\right )^{2}}{\left (1-x \right )^{2}}+2}\, \left (x +1\right )}{\left (\frac {\left (x +1\right )^{2}}{\left (1-x \right )^{2}}+1\right ) \left (1-x \right )}\right )\right )}{6 \sqrt {\frac {\frac {\left (x +1\right )^{2}}{\left (1-x \right )^{2}}+1}{\left (\frac {x +1}{1-x}+1\right )^{2}}}\, \left (\frac {x +1}{1-x}+1\right )}-\frac {\sqrt {2}\, \sqrt {\frac {2 \left (x +1\right )^{2}}{\left (1-x \right )^{2}}+2}\, \left (\sqrt {3}\, \operatorname {arctanh}\left (\frac {\sqrt {\frac {2 \left (x +1\right )^{2}}{\left (1-x \right )^{2}}+2}\, \sqrt {3}}{2}\right )-\arctan \left (\frac {\sqrt {\frac {2 \left (x +1\right )^{2}}{\left (1-x \right )^{2}}+2}\, \left (x +1\right )}{\left (\frac {\left (x +1\right )^{2}}{\left (1-x \right )^{2}}+1\right ) \left (1-x \right )}\right )\right )}{6 \sqrt {\frac {\frac {\left (x +1\right )^{2}}{\left (1-x \right )^{2}}+1}{\left (\frac {x +1}{1-x}+1\right )^{2}}}\, \left (\frac {x +1}{1-x}+1\right )}\) \(369\)

Input:

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

Output:

-1/2*(x^2+1)^(1/2)/x^2-1/2*ln(((x^2+1)^(1/2)+1)/x)+1/3*RootOf(_Z^2-2)*ln(( 
RootOf(_Z^2-2)*x+RootOf(_Z^2-2)+2*(x^2+1)^(1/2))/(x-1))+1/3*RootOf(_Z^2+1) 
*ln(-(RootOf(_Z^2+1)*x-(x^2+1)^(1/2)*x-(x^2+1)^(1/2))/(x^2+x+1))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 119 vs. \(2 (58) = 116\).

Time = 0.08 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.55 \[ \int \frac {\sqrt {1+x^2}}{x^3 \left (1-x^3\right )} \, dx=\frac {2 \, \sqrt {2} x^{2} \log \left (-\frac {\sqrt {2} {\left (x + 1\right )} + \sqrt {x^{2} + 1} {\left (\sqrt {2} + 2\right )} + x + 1}{x - 1}\right ) - 4 \, x^{2} \arctan \left (-\frac {x^{2} - \sqrt {x^{2} + 1} {\left (x + 1\right )} + x + 1}{x}\right ) - 3 \, x^{2} \log \left (-x + \sqrt {x^{2} + 1} + 1\right ) + 3 \, x^{2} \log \left (-x + \sqrt {x^{2} + 1} - 1\right ) - 3 \, \sqrt {x^{2} + 1}}{6 \, x^{2}} \] Input:

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 186 vs. \(2 (58) = 116\).

Time = 0.13 (sec) , antiderivative size = 186, normalized size of antiderivative = 2.42 \[ \int \frac {\sqrt {1+x^2}}{x^3 \left (1-x^3\right )} \, dx=-\frac {1}{3} \, \sqrt {2} \log \left (\frac {{\left | -2 \, x - 2 \, \sqrt {2} + 2 \, \sqrt {x^{2} + 1} + 2 \right |}}{{\left | -2 \, x + 2 \, \sqrt {2} + 2 \, \sqrt {x^{2} + 1} + 2 \right |}}\right ) + \frac {{\left (x - \sqrt {x^{2} + 1}\right )}^{3} + x - \sqrt {x^{2} + 1}}{{\left ({\left (x - \sqrt {x^{2} + 1}\right )}^{2} - 1\right )}^{2}} + \frac {2}{3} \, \arctan \left (-\frac {1}{2} \, {\left (x - \sqrt {x^{2} + 1}\right )}^{3} - \frac {3}{2} \, {\left (x - \sqrt {x^{2} + 1}\right )}^{2} - \frac {3}{2} \, x + \frac {3}{2} \, \sqrt {x^{2} + 1} + \frac {1}{2}\right ) - \frac {2}{3} \, \arctan \left (-x + \sqrt {x^{2} + 1} - 2\right ) - \frac {1}{2} \, \log \left ({\left | -x + \sqrt {x^{2} + 1} + 1 \right |}\right ) + \frac {1}{2} \, \log \left ({\left | -x + \sqrt {x^{2} + 1} - 1 \right |}\right ) \] Input:

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

Output:

-1/3*sqrt(2)*log(abs(-2*x - 2*sqrt(2) + 2*sqrt(x^2 + 1) + 2)/abs(-2*x + 2* 
sqrt(2) + 2*sqrt(x^2 + 1) + 2)) + ((x - sqrt(x^2 + 1))^3 + x - sqrt(x^2 + 
1))/((x - sqrt(x^2 + 1))^2 - 1)^2 + 2/3*arctan(-1/2*(x - sqrt(x^2 + 1))^3 
- 3/2*(x - sqrt(x^2 + 1))^2 - 3/2*x + 3/2*sqrt(x^2 + 1) + 1/2) - 2/3*arcta 
n(-x + sqrt(x^2 + 1) - 2) - 1/2*log(abs(-x + sqrt(x^2 + 1) + 1)) + 1/2*log 
(abs(-x + sqrt(x^2 + 1) - 1))
 

Mupad [B] (verification not implemented)

Time = 22.56 (sec) , antiderivative size = 188, normalized size of antiderivative = 2.44 \[ \int \frac {\sqrt {1+x^2}}{x^3 \left (1-x^3\right )} \, dx=\frac {\mathrm {atan}\left (\sqrt {x^2+1}\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2}-\frac {\sqrt {2}\,\left (2\,\ln \left (x-1\right )-2\,\ln \left (x+\sqrt {2}\,\sqrt {x^2+1}+1\right )\right )}{6}-\frac {\sqrt {x^2+1}}{2\,x^2}+\frac {\left (-2+\sqrt {3}\,2{}\mathrm {i}\right )\,\left (\ln \left (x+\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )-\ln \left (1+\left (\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )\,\sqrt {x^2+1}-\frac {x}{2}-\frac {\sqrt {3}\,x\,1{}\mathrm {i}}{2}\right )\right )}{12\,\sqrt {{\left (\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )}^2+1}}-\frac {\left (2+\sqrt {3}\,2{}\mathrm {i}\right )\,\left (\ln \left (x+\frac {1}{2}-\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )-\ln \left (1+\left (\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )\,\sqrt {x^2+1}-\frac {x}{2}+\frac {\sqrt {3}\,x\,1{}\mathrm {i}}{2}\right )\right )}{12\,\sqrt {{\left (-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )}^2+1}} \] Input:

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

Output:

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

Reduce [F]

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

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

Output:

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