3.3.80 \(\int \frac {x (-\sqrt {-4+x^2}+x^2 \sqrt {-4+x^2}-4 \sqrt {-1+x^2}+x^2 \sqrt {-1+x^2})}{(4-5 x^2+x^4) (1+\sqrt {-4+x^2}+\sqrt {-1+x^2})} \, dx\) [280]

Optimal. Leaf size=21 \[ \log \left (1+\sqrt {-4+x^2}+\sqrt {-1+x^2}\right ) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.19, antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 85, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.012, Rules used = {6816} \begin {gather*} \log \left (\sqrt {x^2-4}+\sqrt {x^2-1}+1\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

Log[1 + Sqrt[-4 + x^2] + Sqrt[-1 + x^2]]

Rule 6816

Int[(u_)/(y_), x_Symbol] :> With[{q = DerivativeDivides[y, u, x]}, Simp[q*Log[RemoveContent[y, x]], x] /;  !Fa
lseQ[q]]

Rubi steps

\begin {align*} \int \frac {x \left (-\sqrt {-4+x^2}+x^2 \sqrt {-4+x^2}-4 \sqrt {-1+x^2}+x^2 \sqrt {-1+x^2}\right )}{\left (4-5 x^2+x^4\right ) \left (1+\sqrt {-4+x^2}+\sqrt {-1+x^2}\right )} \, dx &=\log \left (1+\sqrt {-4+x^2}+\sqrt {-1+x^2}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.62, size = 31, normalized size = 1.48 \begin {gather*} 2 \tanh ^{-1}\left (1-\frac {2}{3} \sqrt {-4+x^2}+\frac {2}{3} \sqrt {-1+x^2}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1087\) vs. \(2(17)=34\).
time = 0.20, size = 1088, normalized size = 51.81

method result size
elliptic \(\frac {\sqrt {\left (x^{2}-4\right ) \left (x^{2}-1\right )}\, \left (\frac {\ln \left (x^{2}-5\right )}{4}+\frac {\ln \left (-\frac {5}{2}+x^{2}+\sqrt {x^{4}-5 x^{2}+4}\right )}{4}+\frac {\arctanh \left (\frac {5 x^{2}-17}{4 \sqrt {\left (x^{2}-5\right )^{2}+5 x^{2}-21}}\right )}{4}+\frac {\arctanh \left (\frac {8+2 \sqrt {5}\, \left (x -\sqrt {5}\right )}{4 \sqrt {\left (x -\sqrt {5}\right )^{2}+2 \sqrt {5}\, \left (x -\sqrt {5}\right )+4}}\right )}{4}+\frac {\arctanh \left (\frac {8-2 \sqrt {5}\, \left (x +\sqrt {5}\right )}{4 \sqrt {\left (x +\sqrt {5}\right )^{2}-2 \sqrt {5}\, \left (x +\sqrt {5}\right )+4}}\right )}{4}-\frac {\arctanh \left (\frac {2+2 \sqrt {5}\, \left (x -\sqrt {5}\right )}{2 \sqrt {\left (x -\sqrt {5}\right )^{2}+2 \sqrt {5}\, \left (x -\sqrt {5}\right )+1}}\right )}{4}-\frac {\arctanh \left (\frac {2-2 \sqrt {5}\, \left (x +\sqrt {5}\right )}{2 \sqrt {\left (x +\sqrt {5}\right )^{2}-2 \sqrt {5}\, \left (x +\sqrt {5}\right )+1}}\right )}{4}\right )}{\sqrt {x^{2}-4}\, \sqrt {x^{2}-1}}\) \(250\)
default \(\text {Expression too large to display}\) \(1088\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/4/(2+5^(1/2))/(-2+5^(1/2))*((-2+x)^2+4*x-8)^(1/2)-1/2/(2+5^(1/2))/(-2+5^(1/2))*ln(x+((-2+x)^2+4*x-8)^(1/2))
-1/4/(2+5^(1/2))/(-2+5^(1/2))*((2+x)^2-4*x-8)^(1/2)+1/2/(2+5^(1/2))/(-2+5^(1/2))*ln(x+((2+x)^2-4*x-8)^(1/2))+1
/2/(5^(1/2)+1)/(5^(1/2)-1)*((1+x)^2-2*x-2)^(1/2)-1/2/(5^(1/2)+1)/(5^(1/2)-1)*ln(x+((1+x)^2-2*x-2)^(1/2))+1/2/(
5^(1/2)+1)/(5^(1/2)-1)*((-1+x)^2-2+2*x)^(1/2)+1/2/(5^(1/2)+1)/(5^(1/2)-1)*ln(x+((-1+x)^2-2+2*x)^(1/2))+1/(5^(1
/2)+1)/(2+5^(1/2))/(-2+5^(1/2))/(5^(1/2)-1)*5^(1/2)*ln(x+((x-5^(1/2))^2+2*5^(1/2)*(x-5^(1/2))+1)^(1/2))-1/(5^(
1/2)+1)/(2+5^(1/2))/(-2+5^(1/2))/(5^(1/2)-1)*5^(1/2)*ln(x+((x+5^(1/2))^2-2*5^(1/2)*(x+5^(1/2))+1)^(1/2))-1/2/(
5^(1/2)+1)/(2+5^(1/2))/(-2+5^(1/2))/(5^(1/2)-1)*5^(1/2)*ln(x+((x-5^(1/2))^2+2*5^(1/2)*(x-5^(1/2))+4)^(1/2))+1/
2/(5^(1/2)+1)/(2+5^(1/2))/(-2+5^(1/2))/(5^(1/2)-1)*5^(1/2)*ln(x+((x+5^(1/2))^2-2*5^(1/2)*(x+5^(1/2))+4)^(1/2))
+1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2*ln(-5/2+x^2+(x^4-5
*x^2+4)^(1/2))-5*arctanh(1/4*(5*x^2-17)/(x^4-5*x^2+4)^(1/2)))/(x^4-5*x^2+4)^(1/2)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 171 vs. \(2 (17) = 34\).
time = 2.53, size = 171, normalized size = 8.14 \begin {gather*} \frac {1}{4} \, \log \left (x + 1\right ) + \frac {3}{8} \, \log \left (x - 1\right ) + \frac {1}{8} \, \log \left (x - 2\right ) + \frac {1}{4} \, \log \left (\frac {2 \, x^{4} + 4 \, {\left (x^{2} - 3\right )} \sqrt {x + 1} \sqrt {x - 1} - 7 \, x^{2} + 2 \, {\left ({\left (x^{2} - 1\right )} \sqrt {x + 1} \sqrt {x - 1} \sqrt {x - 2} + {\left (2 \, x^{2} - 3\right )} \sqrt {x - 2}\right )} \sqrt {x + 2} + 3}{2 \, {\left ({\left (x^{2} - 1\right )} \sqrt {x + 1} \sqrt {x - 1} \sqrt {x - 2} + {\left (2 \, x^{2} - 3\right )} \sqrt {x - 2}\right )}}\right ) + \frac {1}{4} \, \log \left (\frac {{\left (x^{2} - 1\right )} \sqrt {x + 1} \sqrt {x - 1} + 2 \, x^{2} - 3}{{\left (x^{2} - 1\right )} \sqrt {x - 1}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 162 vs. \(2 (17) = 34\).
time = 0.83, size = 162, normalized size = 7.71 \begin {gather*} -\frac {1}{4} \, \log \left (4 \, x^{4} - {\left (4 \, x^{2} - 11\right )} \sqrt {x^{2} - 1} \sqrt {x^{2} - 4} - 21 \, x^{2} + 23\right ) - \frac {1}{4} \, \log \left (x^{2} - \sqrt {x^{2} - 1} {\left (x + 2\right )} + 2 \, x - 1\right ) + \frac {1}{4} \, \log \left (x^{2} - \sqrt {x^{2} - 4} {\left (x + 1\right )} + x - 4\right ) - \frac {1}{4} \, \log \left (x^{2} - \sqrt {x^{2} - 4} {\left (x - 1\right )} - x - 4\right ) + \frac {1}{4} \, \log \left (x^{2} - \sqrt {x^{2} - 1} {\left (x - 2\right )} - 2 \, x - 1\right ) + \frac {1}{4} \, \log \left (x^{2} - 5\right ) + \frac {1}{4} \, \log \left (-x^{2} + \sqrt {x^{2} - 1} \sqrt {x^{2} - 4} + 7\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/4*log(4*x^4 - (4*x^2 - 11)*sqrt(x^2 - 1)*sqrt(x^2 - 4) - 21*x^2 + 23) - 1/4*log(x^2 - sqrt(x^2 - 1)*(x + 2)
 + 2*x - 1) + 1/4*log(x^2 - sqrt(x^2 - 4)*(x + 1) + x - 4) - 1/4*log(x^2 - sqrt(x^2 - 4)*(x - 1) - x - 4) + 1/
4*log(x^2 - sqrt(x^2 - 1)*(x - 2) - 2*x - 1) + 1/4*log(x^2 - 5) + 1/4*log(-x^2 + sqrt(x^2 - 1)*sqrt(x^2 - 4) +
 7)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 76 vs. \(2 (17) = 34\).
time = 0.44, size = 76, normalized size = 3.62 \begin {gather*} -\frac {1}{2} \, \log \left (\sqrt {x^{2} - 1} - \sqrt {x^{2} - 4} + 1\right ) - \frac {1}{2} \, \log \left (\sqrt {x^{2} - 1} - \sqrt {x^{2} - 4}\right ) + \frac {1}{2} \, \log \left (\sqrt {x^{2} - 1} + 2\right ) + \frac {1}{2} \, \log \left ({\left | -\sqrt {x^{2} - 1} + \sqrt {x^{2} - 4} - 3 \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 2.37, size = 172, normalized size = 8.19 \begin {gather*} \frac {\ln \left (x-\sqrt {5}\right )}{4}-\mathrm {atanh}\left (\frac {\sqrt {3}-\sqrt {x^2-1}}{\sqrt {x^2-4}}\right )+\frac {\mathrm {atanh}\left (\frac {\sqrt {x^2-1}}{2}\right )}{2}+\frac {\ln \left (x+\sqrt {5}\right )}{4}-\frac {7\,\mathrm {atanh}\left (\frac {4\,\left (\sqrt {3}-\sqrt {x^2-1}\right )}{\sqrt {x^2-4}\,\left (\frac {{\left (\sqrt {3}-\sqrt {x^2-1}\right )}^2}{x^2-4}+1\right )}\right )}{4}+\frac {5\,\mathrm {atanh}\left (\frac {12150\,\left (\sqrt {3}-\sqrt {x^2-1}\right )}{\sqrt {x^2-4}\,\left (\frac {6075\,{\left (\sqrt {3}-\sqrt {x^2-1}\right )}^2}{2\,\left (x^2-4\right )}+\frac {6075}{2}\right )}\right )}{4}-\frac {\mathrm {atanh}\left (\sqrt {x^2-4}\right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x - 5^(1/2))/4 - atanh((3^(1/2) - (x^2 - 1)^(1/2))/(x^2 - 4)^(1/2)) + atanh((x^2 - 1)^(1/2)/2)/2 + log(x +
 5^(1/2))/4 - (7*atanh((4*(3^(1/2) - (x^2 - 1)^(1/2)))/((x^2 - 4)^(1/2)*((3^(1/2) - (x^2 - 1)^(1/2))^2/(x^2 -
4) + 1))))/4 + (5*atanh((12150*(3^(1/2) - (x^2 - 1)^(1/2)))/((x^2 - 4)^(1/2)*((6075*(3^(1/2) - (x^2 - 1)^(1/2)
)^2)/(2*(x^2 - 4)) + 6075/2))))/4 - atanh((x^2 - 4)^(1/2))/2

________________________________________________________________________________________