Optimal. Leaf size=65 \[ \frac {1}{5} \left (5-\sqrt {5}\right ) \log \left (1-\sqrt {5}+2 \sqrt {1-x}\right )+\frac {1}{5} \left (5+\sqrt {5}\right ) \log \left (1+\sqrt {5}+2 \sqrt {1-x}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 2, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {646, 31}
\begin {gather*} \frac {1}{5} \left (5-\sqrt {5}\right ) \log \left (2 \sqrt {1-x}-\sqrt {5}+1\right )+\frac {1}{5} \left (5+\sqrt {5}\right ) \log \left (2 \sqrt {1-x}+\sqrt {5}+1\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 646
Rubi steps
\begin {align*} \int \frac {1}{-\sqrt {1-x}+x} \, dx &=2 \text {Subst}\left (\int \frac {x}{-1+x+x^2} \, dx,x,\sqrt {1-x}\right )\\ &=\frac {1}{5} \left (5-\sqrt {5}\right ) \text {Subst}\left (\int \frac {1}{\frac {1}{2}-\frac {\sqrt {5}}{2}+x} \, dx,x,\sqrt {1-x}\right )+\frac {1}{5} \left (5+\sqrt {5}\right ) \text {Subst}\left (\int \frac {1}{\frac {1}{2}+\frac {\sqrt {5}}{2}+x} \, dx,x,\sqrt {1-x}\right )\\ &=\frac {1}{5} \left (5-\sqrt {5}\right ) \log \left (1-\sqrt {5}+2 \sqrt {1-x}\right )+\frac {1}{5} \left (5+\sqrt {5}\right ) \log \left (1+\sqrt {5}+2 \sqrt {1-x}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 60, normalized size = 0.92 \begin {gather*} \frac {1}{5} \left (-\left (\left (-5+\sqrt {5}\right ) \log \left (-1+\sqrt {5}-2 \sqrt {1-x}\right )\right )+\left (5+\sqrt {5}\right ) \log \left (1+\sqrt {5}+2 \sqrt {1-x}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(100\) vs.
\(2(49)=98\).
time = 0.14, size = 101, normalized size = 1.55
method | result | size |
derivativedivides | \(\ln \left (-x +\sqrt {1-x}\right )+\frac {2 \sqrt {5}\, \arctanh \left (\frac {\left (2 \sqrt {1-x}+1\right ) \sqrt {5}}{5}\right )}{5}\) | \(36\) |
default | \(\frac {\ln \left (x^{2}+x -1\right )}{2}+\frac {\arctanh \left (\frac {\left (2 x +1\right ) \sqrt {5}}{5}\right ) \sqrt {5}}{5}+\frac {\ln \left (-x +\sqrt {1-x}\right )}{2}+\frac {\sqrt {5}\, \arctanh \left (\frac {\left (2 \sqrt {1-x}+1\right ) \sqrt {5}}{5}\right )}{5}-\frac {\ln \left (-x -\sqrt {1-x}\right )}{2}+\frac {\sqrt {5}\, \arctanh \left (\frac {\left (2 \sqrt {1-x}-1\right ) \sqrt {5}}{5}\right )}{5}\) | \(101\) |
trager | \(\RootOf \left (5 \textit {\_Z}^{2}-10 \textit {\_Z} +4\right ) \ln \left (x -\sqrt {1-x}\right )-\ln \left (5 \RootOf \left (5 \textit {\_Z}^{2}-10 \textit {\_Z} +4\right )^{2} x -5 \RootOf \left (5 \textit {\_Z}^{2}-10 \textit {\_Z} +4\right ) x -10 \RootOf \left (5 \textit {\_Z}^{2}-10 \textit {\_Z} +4\right )+4 \sqrt {1-x}+10\right ) \RootOf \left (5 \textit {\_Z}^{2}-10 \textit {\_Z} +4\right )+\ln \left (5 \RootOf \left (5 \textit {\_Z}^{2}-10 \textit {\_Z} +4\right )^{2} x -5 \RootOf \left (5 \textit {\_Z}^{2}-10 \textit {\_Z} +4\right ) x -10 \RootOf \left (5 \textit {\_Z}^{2}-10 \textit {\_Z} +4\right )+4 \sqrt {1-x}+10\right )\) | \(149\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.48, size = 51, normalized size = 0.78 \begin {gather*} -\frac {1}{5} \, \sqrt {5} \log \left (-\frac {\sqrt {5} - 2 \, \sqrt {-x + 1} - 1}{\sqrt {5} + 2 \, \sqrt {-x + 1} + 1}\right ) + \log \left (-x + \sqrt {-x + 1}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.38, size = 65, normalized size = 1.00 \begin {gather*} \frac {1}{5} \, \sqrt {5} \log \left (\frac {2 \, x^{2} + \sqrt {5} {\left (x - 2\right )} - {\left (\sqrt {5} {\left (2 \, x + 1\right )} + 5\right )} \sqrt {-x + 1} - 3 \, x - 2}{x^{2} + x - 1}\right ) + \log \left (-x + \sqrt {-x + 1}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.93, size = 92, normalized size = 1.42 \begin {gather*} - 4 \left (\begin {cases} - \frac {\sqrt {5} \operatorname {acoth}{\left (\frac {2 \sqrt {5} \left (\sqrt {1 - x} + \frac {1}{2}\right )}{5} \right )}}{10} & \text {for}\: \left (\sqrt {1 - x} + \frac {1}{2}\right )^{2} > \frac {5}{4} \\- \frac {\sqrt {5} \operatorname {atanh}{\left (\frac {2 \sqrt {5} \left (\sqrt {1 - x} + \frac {1}{2}\right )}{5} \right )}}{10} & \text {for}\: \left (\sqrt {1 - x} + \frac {1}{2}\right )^{2} < \frac {5}{4} \end {cases}\right ) + \log {\left (x - \sqrt {1 - x} \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 2.44, size = 54, normalized size = 0.83 \begin {gather*} -\frac {1}{5} \, \sqrt {5} \log \left (\frac {{\left | -\sqrt {5} + 2 \, \sqrt {-x + 1} + 1 \right |}}{\sqrt {5} + 2 \, \sqrt {-x + 1} + 1}\right ) + \log \left ({\left | -x + \sqrt {-x + 1} \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.16, size = 79, normalized size = 1.22 \begin {gather*} \ln \left (2\,\sqrt {1-x}-\left (\frac {\sqrt {5}}{5}+1\right )\,\left (2\,\sqrt {1-x}+1\right )\right )\,\left (\frac {\sqrt {5}}{5}+1\right )-\ln \left (2\,\sqrt {1-x}+\left (\frac {\sqrt {5}}{5}-1\right )\,\left (2\,\sqrt {1-x}+1\right )\right )\,\left (\frac {\sqrt {5}}{5}-1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________