Optimal. Leaf size=25 \[ -\frac {1}{x}+\frac {4}{\sqrt {x}}-4 \sqrt {x}+x+3 \log (x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, 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 = {1371, 712}
\begin {gather*} x-4 \sqrt {x}+\frac {4}{\sqrt {x}}-\frac {1}{x}+3 \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 712
Rule 1371
Rubi steps
\begin {align*} \int \frac {\left (1-\sqrt {x}+x\right )^2}{x^2} \, dx &=2 \text {Subst}\left (\int \frac {\left (1-x+x^2\right )^2}{x^3} \, dx,x,\sqrt {x}\right )\\ &=2 \text {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.02, size = 25, normalized size = 1.00 \begin {gather*} -\frac {1}{x}+\frac {4}{\sqrt {x}}-4 \sqrt {x}+x+3 \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.03, size = 22, normalized size = 0.88
method | result | size |
derivativedivides | \(-\frac {1}{x}+x +3 \ln \left (x \right )+\frac {4}{\sqrt {x}}-4 \sqrt {x}\) | \(22\) |
default | \(-\frac {1}{x}+x +3 \ln \left (x \right )+\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 = 1.84, size = 22, normalized size = 0.88 \begin {gather*} x - 4 \, \sqrt {x} + \frac {4 \, \sqrt {x} - 1}{x} + 3 \, \log \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.65, size = 24, normalized size = 0.96 \begin {gather*} \frac {x^{2} + 6 \, x \log \left (\sqrt {x}\right ) - 4 \, {\left (x - 1\right )} \sqrt {x} - 1}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.15, size = 22, normalized size = 0.88 \begin {gather*} - 4 \sqrt {x} + x + 3 \log {\left (x \right )} - \frac {1}{x} + \frac {4}{\sqrt {x}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.05, size = 23, normalized size = 0.92 \begin {gather*} x - 4 \, \sqrt {x} + \frac {4 \, \sqrt {x} - 1}{x} + 3 \, \log \left ({\left | x \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.04, size = 24, normalized size = 0.96 \begin {gather*} x+6\,\ln \left (\sqrt {x}\right )+\frac {4\,\sqrt {x}-1}{x}-4\,\sqrt {x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________