Optimal. Leaf size=25 \[ x-4 \sqrt {x}+\frac {4}{\sqrt {x}}-\frac {1}{x}+3 \log (x) \]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {1357, 698} \[ x-4 \sqrt {x}+\frac {4}{\sqrt {x}}-\frac {1}{x}+3 \log (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 698
Rule 1357
Rubi steps
\begin {align*} \int \frac {\left (1-\sqrt {x}+x\right )^2}{x^2} \, dx &=2 \operatorname {Subst}\left (\int \frac {\left (1-x+x^2\right )^2}{x^3} \, dx,x,\sqrt {x}\right )\\ &=2 \operatorname {Subst}\left (\int \left (-2+\frac {1}{x^3}-\frac {2}{x^2}+\frac {3}{x}+x\right ) \, dx,x,\sqrt {x}\right )\\ &=-\frac {1}{x}+\frac {4}{\sqrt {x}}-4 \sqrt {x}+x+3 \log (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 25, normalized size = 1.00 \[ x-4 \sqrt {x}+\frac {4}{\sqrt {x}}-\frac {1}{x}+3 \log (x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.01, size = 25, normalized size = 1.00 \[ x-4 \sqrt {x}+\frac {4}{\sqrt {x}}-\frac {1}{x}+3 \log (x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.08, size = 24, normalized size = 0.96 \[ \frac {x^{2} + 6 \, x \log \left (\sqrt {x}\right ) - 4 \, {\left (x - 1\right )} \sqrt {x} - 1}{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.00, size = 23, normalized size = 0.92 \[ x - 4 \, \sqrt {x} + \frac {4 \, \sqrt {x} - 1}{x} + 3 \, \log \left ({\left | x \right |}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.11, size = 22, normalized size = 0.88
method | result | size |
derivativedivides | \(-\frac {1}{x}+x +3 \ln \relax (x )+\frac {4}{\sqrt {x}}-4 \sqrt {x}\) | \(22\) |
default | \(-\frac {1}{x}+x +3 \ln \relax (x )+\frac {4}{\sqrt {x}}-4 \sqrt {x}\) | \(22\) |
trager | \(\frac {\left (-1+x \right ) \left (1+x \right )}{x}-\frac {4 \left (-1+x \right )}{\sqrt {x}}-3 \ln \left (\frac {1}{x}\right )\) | \(26\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.43, size = 22, normalized size = 0.88 \[ x - 4 \, \sqrt {x} + \frac {4 \, \sqrt {x} - 1}{x} + 3 \, \log \relax (x) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.04, size = 24, normalized size = 0.96 \[ x+6\,\ln \left (\sqrt {x}\right )+\frac {4\,\sqrt {x}-1}{x}-4\,\sqrt {x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.42, size = 22, normalized size = 0.88 \[ - 4 \sqrt {x} + x + 3 \log {\relax (x )} - \frac {1}{x} + \frac {4}{\sqrt {x}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________