Integrand size = 22, antiderivative size = 86 \[ \int \frac {1}{\sqrt {4+2 x+x^2} \left (-x+x^3\right )} \, dx=\frac {1}{2} \text {arctanh}\left (\frac {4+x}{2 \sqrt {4+2 x+x^2}}\right )-\frac {\text {arctanh}\left (\frac {5+2 x}{\sqrt {7} \sqrt {4+2 x+x^2}}\right )}{2 \sqrt {7}}-\frac {\text {arctanh}\left (\frac {\sqrt {4+2 x+x^2}}{\sqrt {3}}\right )}{2 \sqrt {3}} \] Output:
1/2*arctanh(1/2*(4+x)/(x^2+2*x+4)^(1/2))-1/6*arctanh(1/3*(x^2+2*x+4)^(1/2) *3^(1/2))*3^(1/2)-1/14*arctanh(1/7*(5+2*x)*7^(1/2)/(x^2+2*x+4)^(1/2))*7^(1 /2)
Time = 0.17 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.99 \[ \int \frac {1}{\sqrt {4+2 x+x^2} \left (-x+x^3\right )} \, dx=-\text {arctanh}\left (\frac {1}{2} \left (x-\sqrt {4+2 x+x^2}\right )\right )+\frac {\text {arctanh}\left (\frac {1+x-\sqrt {4+2 x+x^2}}{\sqrt {3}}\right )}{\sqrt {3}}-\frac {\text {arctanh}\left (\frac {1-x+\sqrt {4+2 x+x^2}}{\sqrt {7}}\right )}{\sqrt {7}} \] Input:
Integrate[1/(Sqrt[4 + 2*x + x^2]*(-x + x^3)),x]
Output:
-ArcTanh[(x - Sqrt[4 + 2*x + x^2])/2] + ArcTanh[(1 + x - Sqrt[4 + 2*x + x^ 2])/Sqrt[3]]/Sqrt[3] - ArcTanh[(1 - x + Sqrt[4 + 2*x + x^2])/Sqrt[7]]/Sqrt [7]
Time = 0.43 (sec) , antiderivative size = 86, 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.136, Rules used = {2026, 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 {1}{\sqrt {x^2+2 x+4} \left (x^3-x\right )} \, dx\) |
\(\Big \downarrow \) 2026 |
\(\displaystyle \int \frac {1}{x \left (x^2-1\right ) \sqrt {x^2+2 x+4}}dx\) |
\(\Big \downarrow \) 7276 |
\(\displaystyle \int \left (\frac {x}{\left (x^2-1\right ) \sqrt {x^2+2 x+4}}-\frac {1}{x \sqrt {x^2+2 x+4}}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{2} \text {arctanh}\left (\frac {x+4}{2 \sqrt {x^2+2 x+4}}\right )-\frac {\text {arctanh}\left (\frac {2 x+5}{\sqrt {7} \sqrt {x^2+2 x+4}}\right )}{2 \sqrt {7}}-\frac {\text {arctanh}\left (\frac {\sqrt {x^2+2 x+4}}{\sqrt {3}}\right )}{2 \sqrt {3}}\) |
Input:
Int[1/(Sqrt[4 + 2*x + x^2]*(-x + x^3)),x]
Output:
ArcTanh[(4 + x)/(2*Sqrt[4 + 2*x + x^2])]/2 - ArcTanh[(5 + 2*x)/(Sqrt[7]*Sq rt[4 + 2*x + x^2])]/(2*Sqrt[7]) - ArcTanh[Sqrt[4 + 2*x + x^2]/Sqrt[3]]/(2* Sqrt[3])
Int[(Fx_.)*(Px_)^(p_.), x_Symbol] :> With[{r = Expon[Px, x, Min]}, Int[x^(p *r)*ExpandToSum[Px/x^r, x]^p*Fx, x] /; IGtQ[r, 0]] /; PolyQ[Px, x] && Integ erQ[p] && !MonomialQ[Px, x] && (ILtQ[p, 0] || !PolyQ[u, x])
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]
Time = 0.40 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.80
method | result | size |
default | \(\frac {\operatorname {arctanh}\left (\frac {8+2 x}{4 \sqrt {x^{2}+2 x +4}}\right )}{2}-\frac {\sqrt {7}\, \operatorname {arctanh}\left (\frac {\left (10+4 x \right ) \sqrt {7}}{14 \sqrt {\left (-1+x \right )^{2}+3+4 x}}\right )}{14}-\frac {\sqrt {3}\, \operatorname {arctanh}\left (\frac {\sqrt {3}}{\sqrt {\left (1+x \right )^{2}+3}}\right )}{6}\) | \(69\) |
trager | \(\frac {\ln \left (\frac {2 \sqrt {x^{2}+2 x +4}+4+x}{x}\right )}{2}+\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}-3\right ) \ln \left (\frac {\sqrt {x^{2}+2 x +4}-\operatorname {RootOf}\left (\textit {\_Z}^{2}-3\right )}{1+x}\right )}{6}-\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}-7\right ) \ln \left (\frac {2 \operatorname {RootOf}\left (\textit {\_Z}^{2}-7\right ) x +7 \sqrt {x^{2}+2 x +4}+5 \operatorname {RootOf}\left (\textit {\_Z}^{2}-7\right )}{-1+x}\right )}{14}\) | \(103\) |
Input:
int(1/(x^3-x)/(x^2+2*x+4)^(1/2),x,method=_RETURNVERBOSE)
Output:
1/2*arctanh(1/4*(8+2*x)/(x^2+2*x+4)^(1/2))-1/14*7^(1/2)*arctanh(1/14*(10+4 *x)*7^(1/2)/((-1+x)^2+3+4*x)^(1/2))-1/6*3^(1/2)*arctanh(3^(1/2)/((1+x)^2+3 )^(1/2))
Time = 0.07 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.28 \[ \int \frac {1}{\sqrt {4+2 x+x^2} \left (-x+x^3\right )} \, dx=\frac {1}{14} \, \sqrt {7} \log \left (\frac {\sqrt {7} {\left (2 \, x + 5\right )} + \sqrt {x^{2} + 2 \, x + 4} {\left (2 \, \sqrt {7} - 7\right )} - 4 \, x - 10}{x - 1}\right ) + \frac {1}{6} \, \sqrt {3} \log \left (-\frac {\sqrt {3} - \sqrt {x^{2} + 2 \, x + 4}}{x + 1}\right ) + \frac {1}{2} \, \log \left (-x + \sqrt {x^{2} + 2 \, x + 4} + 2\right ) - \frac {1}{2} \, \log \left (-x + \sqrt {x^{2} + 2 \, x + 4} - 2\right ) \] Input:
integrate(1/(x^3-x)/(x^2+2*x+4)^(1/2),x, algorithm="fricas")
Output:
1/14*sqrt(7)*log((sqrt(7)*(2*x + 5) + sqrt(x^2 + 2*x + 4)*(2*sqrt(7) - 7) - 4*x - 10)/(x - 1)) + 1/6*sqrt(3)*log(-(sqrt(3) - sqrt(x^2 + 2*x + 4))/(x + 1)) + 1/2*log(-x + sqrt(x^2 + 2*x + 4) + 2) - 1/2*log(-x + sqrt(x^2 + 2 *x + 4) - 2)
\[ \int \frac {1}{\sqrt {4+2 x+x^2} \left (-x+x^3\right )} \, dx=\int \frac {1}{x \left (x - 1\right ) \left (x + 1\right ) \sqrt {x^{2} + 2 x + 4}}\, dx \] Input:
integrate(1/(x**3-x)/(x**2+2*x+4)**(1/2),x)
Output:
Integral(1/(x*(x - 1)*(x + 1)*sqrt(x**2 + 2*x + 4)), x)
\[ \int \frac {1}{\sqrt {4+2 x+x^2} \left (-x+x^3\right )} \, dx=\int { \frac {1}{{\left (x^{3} - x\right )} \sqrt {x^{2} + 2 \, x + 4}} \,d x } \] Input:
integrate(1/(x^3-x)/(x^2+2*x+4)^(1/2),x, algorithm="maxima")
Output:
integrate(1/((x^3 - x)*sqrt(x^2 + 2*x + 4)), x)
Leaf count of result is larger than twice the leaf count of optimal. 147 vs. \(2 (66) = 132\).
Time = 0.16 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.71 \[ \int \frac {1}{\sqrt {4+2 x+x^2} \left (-x+x^3\right )} \, dx=\frac {1}{14} \, \sqrt {7} \log \left (\frac {{\left | -2 \, x - 2 \, \sqrt {7} + 2 \, \sqrt {x^{2} + 2 \, x + 4} + 2 \right |}}{{\left | -2 \, x + 2 \, \sqrt {7} + 2 \, \sqrt {x^{2} + 2 \, x + 4} + 2 \right |}}\right ) + \frac {1}{6} \, \sqrt {3} \log \left (-\frac {{\left | -2 \, x - 2 \, \sqrt {3} + 2 \, \sqrt {x^{2} + 2 \, x + 4} - 2 \right |}}{2 \, {\left (x - \sqrt {3} - \sqrt {x^{2} + 2 \, x + 4} + 1\right )}}\right ) + \frac {1}{2} \, \log \left ({\left | -x + \sqrt {x^{2} + 2 \, x + 4} + 2 \right |}\right ) - \frac {1}{2} \, \log \left ({\left | -x + \sqrt {x^{2} + 2 \, x + 4} - 2 \right |}\right ) \] Input:
integrate(1/(x^3-x)/(x^2+2*x+4)^(1/2),x, algorithm="giac")
Output:
1/14*sqrt(7)*log(abs(-2*x - 2*sqrt(7) + 2*sqrt(x^2 + 2*x + 4) + 2)/abs(-2* x + 2*sqrt(7) + 2*sqrt(x^2 + 2*x + 4) + 2)) + 1/6*sqrt(3)*log(-1/2*abs(-2* x - 2*sqrt(3) + 2*sqrt(x^2 + 2*x + 4) - 2)/(x - sqrt(3) - sqrt(x^2 + 2*x + 4) + 1)) + 1/2*log(abs(-x + sqrt(x^2 + 2*x + 4) + 2)) - 1/2*log(abs(-x + sqrt(x^2 + 2*x + 4) - 2))
Timed out. \[ \int \frac {1}{\sqrt {4+2 x+x^2} \left (-x+x^3\right )} \, dx=-\int \frac {1}{\left (x-x^3\right )\,\sqrt {x^2+2\,x+4}} \,d x \] Input:
int(-1/((x - x^3)*(2*x + x^2 + 4)^(1/2)),x)
Output:
-int(1/((x - x^3)*(2*x + x^2 + 4)^(1/2)), x)
Time = 0.16 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.05 \[ \int \frac {1}{\sqrt {4+2 x+x^2} \left (-x+x^3\right )} \, dx=\frac {\sqrt {7}\, \mathrm {log}\left (\sqrt {x^{2}+2 x +4}\, \sqrt {7}-2 x -5\right )}{14}-\frac {\sqrt {7}\, \mathrm {log}\left (x -1\right )}{14}+\frac {\sqrt {3}\, \mathrm {log}\left (\sqrt {x^{2}+2 x +4}-\sqrt {3}\right )}{12}-\frac {\sqrt {3}\, \mathrm {log}\left (\sqrt {x^{2}+2 x +4}+\sqrt {3}\right )}{12}+\frac {\mathrm {log}\left (-2 \sqrt {x^{2}+2 x +4}-x -4\right )}{2}-\frac {\mathrm {log}\left (x \right )}{2} \] Input:
int(1/(x^3-x)/(x^2+2*x+4)^(1/2),x)
Output:
(6*sqrt(7)*log(sqrt(x**2 + 2*x + 4)*sqrt(7) - 2*x - 5) - 6*sqrt(7)*log(x - 1) + 7*sqrt(3)*log(sqrt(x**2 + 2*x + 4) - sqrt(3)) - 7*sqrt(3)*log(sqrt(x **2 + 2*x + 4) + sqrt(3)) + 42*log( - 2*sqrt(x**2 + 2*x + 4) - x - 4) - 42 *log(x))/84