Optimal. Leaf size=38 \[ -\frac {2 \sqrt {k^2 x^3+\left (-k^2-1\right ) x^2+x}}{x \left (k^2 x-1\right )} \]
________________________________________________________________________________________
Rubi [A] time = 0.77, antiderivative size = 26, normalized size of antiderivative = 0.68, number of steps used = 4, number of rules used = 4, integrand size = 47, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.085, Rules used = {6718, 21, 1614, 8} \begin {gather*} \frac {2 (1-x)}{\sqrt {(1-x) x \left (1-k^2 x\right )}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 21
Rule 1614
Rule 6718
Rubi steps
\begin {align*} \int \frac {1-2 k^2 x+k^2 x^2}{x \sqrt {(1-x) x \left (1-k^2 x\right )} \left (-1+k^2 x\right )} \, dx &=\frac {\left (\sqrt {1-x} \sqrt {x} \sqrt {1-k^2 x}\right ) \int \frac {1-2 k^2 x+k^2 x^2}{\sqrt {1-x} x^{3/2} \sqrt {1-k^2 x} \left (-1+k^2 x\right )} \, dx}{\sqrt {(1-x) x \left (1-k^2 x\right )}}\\ &=-\frac {\left (\sqrt {1-x} \sqrt {x} \sqrt {1-k^2 x}\right ) \int \frac {1-2 k^2 x+k^2 x^2}{\sqrt {1-x} x^{3/2} \left (1-k^2 x\right )^{3/2}} \, dx}{\sqrt {(1-x) x \left (1-k^2 x\right )}}\\ &=\frac {2 (1-x)}{\sqrt {(1-x) x \left (1-k^2 x\right )}}+\frac {\left (2 \sqrt {1-x} \sqrt {x} \sqrt {1-k^2 x}\right ) \int 0 \, dx}{\sqrt {(1-x) x \left (1-k^2 x\right )}}\\ &=\frac {2 (1-x)}{\sqrt {(1-x) x \left (1-k^2 x\right )}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.21, size = 21, normalized size = 0.55 \begin {gather*} -\frac {2 (x-1)}{\sqrt {(x-1) x \left (k^2 x-1\right )}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.19, size = 38, normalized size = 1.00 \begin {gather*} -\frac {2 \sqrt {k^2 x^3+\left (-k^2-1\right ) x^2+x}}{x \left (k^2 x-1\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.41, size = 36, normalized size = 0.95 \begin {gather*} -\frac {2 \, \sqrt {k^{2} x^{3} - {\left (k^{2} + 1\right )} x^{2} + x}}{k^{2} x^{2} - x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {k^{2} x^{2} - 2 \, k^{2} x + 1}{{\left (k^{2} x - 1\right )} \sqrt {{\left (k^{2} x - 1\right )} {\left (x - 1\right )} x} x}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 20, normalized size = 0.53 \begin {gather*} -\frac {2 \left (-1+x \right )}{\sqrt {\left (-1+x \right ) x \left (k^{2} x -1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {k^{2} x^{2} - 2 \, k^{2} x + 1}{{\left (k^{2} x - 1\right )} \sqrt {{\left (k^{2} x - 1\right )} {\left (x - 1\right )} x} x}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.29, size = 28, normalized size = 0.74 \begin {gather*} -\frac {2\,\sqrt {x\,\left (k^2\,x-1\right )\,\left (x-1\right )}}{x\,\left (k^2\,x-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {k^{2} x^{2} - 2 k^{2} x + 1}{x \sqrt {x \left (x - 1\right ) \left (k^{2} x - 1\right )} \left (k^{2} x - 1\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________