Optimal. Leaf size=23 \[ \left (-1+e^3-e^4-x+\log \left (3+\frac {3}{x}\right )\right )^2 \]
________________________________________________________________________________________
Rubi [A] time = 0.29, antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 72, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {1593, 6688, 12, 6686} \begin {gather*} \left (x-\log \left (\frac {3}{x}+3\right )+e^4-e^3+1\right )^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 1593
Rule 6686
Rule 6688
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {2+4 x+4 x^2+2 x^3+e^3 \left (-2-2 x-2 x^2\right )+e^4 \left (2+2 x+2 x^2\right )+\left (-2-2 x-2 x^2\right ) \log \left (\frac {3+3 x}{x}\right )}{x (1+x)} \, dx\\ &=\int \frac {2 \left (1+x+x^2\right ) \left (1+(-1+e) e^3+x-\log \left (3+\frac {3}{x}\right )\right )}{x (1+x)} \, dx\\ &=2 \int \frac {\left (1+x+x^2\right ) \left (1+(-1+e) e^3+x-\log \left (3+\frac {3}{x}\right )\right )}{x (1+x)} \, dx\\ &=\left (1-e^3+e^4+x-\log \left (3+\frac {3}{x}\right )\right )^2\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 23, normalized size = 1.00 \begin {gather*} \left (1-e^3+e^4+x-\log \left (3+\frac {3}{x}\right )\right )^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.87, size = 48, normalized size = 2.09 \begin {gather*} x^{2} + 2 \, x e^{4} - 2 \, x e^{3} - 2 \, {\left (x + e^{4} - e^{3} + 1\right )} \log \left (\frac {3 \, {\left (x + 1\right )}}{x}\right ) + \log \left (\frac {3 \, {\left (x + 1\right )}}{x}\right )^{2} + 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 {2 \, {\left (x^{3} + 2 \, x^{2} + {\left (x^{2} + x + 1\right )} e^{4} - {\left (x^{2} + x + 1\right )} e^{3} - {\left (x^{2} + x + 1\right )} \log \left (\frac {3 \, {\left (x + 1\right )}}{x}\right ) + 2 \, x + 1\right )}}{x^{2} + x}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.49, size = 63, normalized size = 2.74
method | result | size |
norman | \(x^{2}+\ln \left (\frac {3 x +3}{x}\right )^{2}+\left (2+2 \,{\mathrm e}^{4}-2 \,{\mathrm e}^{3}\right ) x +\left (-2 \,{\mathrm e}^{4}+2 \,{\mathrm e}^{3}-2\right ) \ln \left (\frac {3 x +3}{x}\right )-2 x \ln \left (\frac {3 x +3}{x}\right )\) | \(63\) |
derivativedivides | \(-2 \ln \left (\frac {3}{x}+3\right ) {\mathrm e}^{4}+2 \ln \left (\frac {3}{x}+3\right ) {\mathrm e}^{3}+2 x \,{\mathrm e}^{4}-2 x \,{\mathrm e}^{3}+2 x +x^{2}+\ln \left (\frac {3}{x}+3\right )^{2}-\frac {2 \ln \left (\frac {3}{x}+3\right ) \left (\frac {3}{x}+3\right ) x}{3}\) | \(70\) |
default | \(-2 \ln \left (\frac {3}{x}+3\right ) {\mathrm e}^{4}+2 \ln \left (\frac {3}{x}+3\right ) {\mathrm e}^{3}+2 x \,{\mathrm e}^{4}-2 x \,{\mathrm e}^{3}+2 x +x^{2}+\ln \left (\frac {3}{x}+3\right )^{2}-\frac {2 \ln \left (\frac {3}{x}+3\right ) \left (\frac {3}{x}+3\right ) x}{3}\) | \(70\) |
risch | \(2 x \,{\mathrm e}^{4}-2 x \,{\mathrm e}^{3}+x^{2}+2 x +2 \,{\mathrm e}^{4} \ln \relax (x )-2 \ln \relax (x ) {\mathrm e}^{3}+2 \ln \relax (x )-2 \,{\mathrm e}^{4} \ln \left (x +1\right )+2 \,{\mathrm e}^{3} \ln \left (x +1\right )+\ln \left (\frac {3}{x}+3\right )^{2}+2 \ln \left (\frac {3}{x}\right )-\frac {2 \ln \left (\frac {3}{x}+3\right ) \left (\frac {3}{x}+3\right ) x}{3}\) | \(86\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.48, size = 132, normalized size = 5.74 \begin {gather*} x^{2} + 2 \, x {\left (e^{4} - e^{3} - \log \relax (3) + 1\right )} - 2 \, {\left (\log \left (x + 1\right ) - \log \relax (x)\right )} e^{4} + 2 \, {\left (\log \left (x + 1\right ) - \log \relax (x)\right )} e^{3} - 2 \, {\left (x + e^{4} - e^{3} + 2\right )} \log \left (x + 1\right ) + 2 \, e^{4} \log \left (x + 1\right ) - 2 \, e^{3} \log \left (x + 1\right ) - \log \left (x + 1\right )^{2} + 2 \, x \log \relax (x) + 2 \, \log \left (x + 1\right ) \log \relax (x) - \log \relax (x)^{2} + 2 \, {\left (\log \left (x + 1\right ) - \log \relax (x)\right )} \log \left (\frac {3}{x} + 3\right ) + 2 \, \log \left (x + 1\right ) + 2 \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 7.49, size = 36, normalized size = 1.57 \begin {gather*} \left (x-\ln \left (\frac {3\,\left (x+1\right )}{x}\right )\right )\,\left (x-2\,{\mathrm {e}}^3+2\,{\mathrm {e}}^4-\ln \left (\frac {3\,\left (x+1\right )}{x}\right )+2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.38, size = 70, normalized size = 3.04 \begin {gather*} x^{2} - 2 x \log {\left (\frac {3 x + 3}{x} \right )} + x \left (- 2 e^{3} + 2 + 2 e^{4}\right ) + \left (- 2 e^{3} + 2 + 2 e^{4}\right ) \log {\relax (x )} + \log {\left (\frac {3 x + 3}{x} \right )}^{2} + \left (- 2 e^{4} - 2 + 2 e^{3}\right ) \log {\left (x + 1 \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________