Optimal. Leaf size=19 \[ 2 \log \left (1+\sqrt {-4+x}+\sqrt {-1+x}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.37, antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 66, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.045, Rules used = {6820, 1600,
6816} \begin {gather*} 2 \log \left (\sqrt {x-4}+\sqrt {x-1}+1\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 1600
Rule 6816
Rule 6820
Rubi steps
\begin {align*} \int \frac {-\sqrt {-4+x}-4 \sqrt {-1+x}+\sqrt {-4+x} x+\sqrt {-1+x} x}{\left (1+\sqrt {-4+x}+\sqrt {-1+x}\right ) \left (4-5 x+x^2\right )} \, dx &=\int \frac {\sqrt {-1+x} \left (-4+\sqrt {-4+x} \sqrt {-1+x}+x\right )}{\left (1+\sqrt {-4+x}+\sqrt {-1+x}\right ) \left (4-5 x+x^2\right )} \, dx\\ &=\int \frac {-4+\sqrt {-4+x} \sqrt {-1+x}+x}{\left (1+\sqrt {-4+x}+\sqrt {-1+x}\right ) (-4+x) \sqrt {-1+x}} \, dx\\ &=2 \log \left (1+\sqrt {-4+x}+\sqrt {-1+x}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.27, size = 27, normalized size = 1.42 \begin {gather*} 4 \tanh ^{-1}\left (1-\frac {2 \sqrt {-4+x}}{3}+\frac {2 \sqrt {-1+x}}{3}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(146\) vs.
\(2(15)=30\).
time = 0.40, size = 147, normalized size = 7.74
method | result | size |
default | \(\frac {\ln \left (-5+x \right )}{2}+\frac {\ln \left (2+\sqrt {-1+x}\right )}{2}-\frac {\ln \left (-2+\sqrt {-1+x}\right )}{2}-\frac {\ln \left (1+\sqrt {x -4}\right )}{2}+\frac {\ln \left (-1+\sqrt {x -4}\right )}{2}+\frac {7 \sqrt {x -4}\, \sqrt {-1+x}\, \arctanh \left (\frac {-17+5 x}{4 \sqrt {x^{2}-5 x +4}}\right )}{4 \sqrt {x^{2}-5 x +4}}+\frac {\sqrt {x -4}\, \sqrt {-1+x}\, \left (2 \ln \left (-\frac {5}{2}+x +\sqrt {x^{2}-5 x +4}\right )-5 \arctanh \left (\frac {-17+5 x}{4 \sqrt {x^{2}-5 x +4}}\right )\right )}{4 \sqrt {x^{2}-5 x +4}}\) | \(147\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 94 vs.
\(2 (15) = 30\).
time = 0.33, size = 94, normalized size = 4.95 \begin {gather*} \frac {1}{2} \, \log \left (x - 1\right ) + \frac {1}{2} \, \log \left (\frac {2 \, x^{2} + 2 \, {\left ({\left (x - 1\right )} \sqrt {x - 4} + 2 \, x - 6\right )} \sqrt {x - 1} + 2 \, {\left (2 \, x - 3\right )} \sqrt {x - 4} - 7 \, x + 3}{2 \, {\left ({\left (x - 1\right )} \sqrt {x - 4} + 2 \, x - 6\right )}}\right ) + \frac {1}{2} \, \log \left (\frac {{\left (x - 1\right )} \sqrt {x - 4} + 2 \, x - 6}{x - 1}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 96 vs.
\(2 (15) = 30\).
time = 0.36, size = 96, normalized size = 5.05 \begin {gather*} -\frac {1}{2} \, \log \left (-{\left (4 \, x - 11\right )} \sqrt {x - 1} \sqrt {x - 4} + 4 \, x^{2} - 21 \, x + 23\right ) + \frac {1}{2} \, \log \left (\sqrt {x - 1} \sqrt {x - 4} - x + 7\right ) + \frac {1}{2} \, \log \left (x - 5\right ) + \frac {1}{2} \, \log \left (\sqrt {x - 1} + 2\right ) - \frac {1}{2} \, \log \left (\sqrt {x - 1} - 2\right ) - \frac {1}{2} \, \log \left (\sqrt {x - 4} + 1\right ) + \frac {1}{2} \, \log \left (\sqrt {x - 4} - 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 157.08, size = 17, normalized size = 0.89 \begin {gather*} 2 \log {\left (\sqrt {x - 4} + \sqrt {x - 1} + 1 \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 58 vs.
\(2 (15) = 30\).
time = 3.33, size = 58, normalized size = 3.05 \begin {gather*} -\log \left (\sqrt {x - 1} - \sqrt {x - 4} + 1\right ) - \log \left (\sqrt {x - 1} - \sqrt {x - 4}\right ) + \log \left (\sqrt {x - 1} + 2\right ) + \log \left ({\left | -\sqrt {x - 1} + \sqrt {x - 4} - 3 \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 6.10, size = 132, normalized size = 6.95 \begin {gather*} \frac {\ln \left (x-5\right )}{2}+2\,\mathrm {atanh}\left (\frac {\sqrt {x-1}-\sqrt {3}}{\sqrt {x-4}}\right )+\frac {7\,\mathrm {atanh}\left (\frac {4\,\left (\sqrt {x-1}-\sqrt {3}\right )}{\left (\frac {{\left (\sqrt {x-1}-\sqrt {3}\right )}^2}{x-4}+1\right )\,\sqrt {x-4}}\right )}{2}-\frac {5\,\mathrm {atanh}\left (\frac {194400\,\left (\sqrt {x-1}-\sqrt {3}\right )}{\left (\frac {48600\,{\left (\sqrt {x-1}-\sqrt {3}\right )}^2}{x-4}+48600\right )\,\sqrt {x-4}}\right )}{2}-\mathrm {atanh}\left (\sqrt {x-4}\right )+\mathrm {atanh}\left (\frac {\sqrt {x-1}}{2}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________