Optimal. Leaf size=26 \[ \left (x+\log \left (-1-x+\log \left (\frac {4}{x^2}+e^{-2-x} x\right )\right )\right )^2 \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.64, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 241, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.012, Rules used = {6820, 12,
6818} \begin {gather*} \left (\log \left (\log \left (\frac {4}{x^2}+e^{-x-2} x\right )-x-1\right )+x\right )^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 6818
Rule 6820
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {2 \left (4 e^{2+x} \left (2+2 x+x^2\right )+x^3 \left (-1+3 x+x^2\right )-x \left (4 e^{2+x}+x^3\right ) \log \left (\frac {4}{x^2}+e^{-2-x} x\right )\right ) \left (x+\log \left (-1-x+\log \left (\frac {4}{x^2}+e^{-2-x} x\right )\right )\right )}{x \left (4 e^{2+x}+x^3\right ) \left (1+x-\log \left (\frac {4}{x^2}+e^{-2-x} x\right )\right )} \, dx\\ &=2 \int \frac {\left (4 e^{2+x} \left (2+2 x+x^2\right )+x^3 \left (-1+3 x+x^2\right )-x \left (4 e^{2+x}+x^3\right ) \log \left (\frac {4}{x^2}+e^{-2-x} x\right )\right ) \left (x+\log \left (-1-x+\log \left (\frac {4}{x^2}+e^{-2-x} x\right )\right )\right )}{x \left (4 e^{2+x}+x^3\right ) \left (1+x-\log \left (\frac {4}{x^2}+e^{-2-x} x\right )\right )} \, dx\\ &=\left (x+\log \left (-1-x+\log \left (\frac {4}{x^2}+e^{-2-x} x\right )\right )\right )^2\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(62\) vs. \(2(26)=52\).
time = 0.11, size = 62, normalized size = 2.38 \begin {gather*} 2 \left (\frac {x^2}{2}+x \log \left (-1-x+\log \left (\frac {4}{x^2}+e^{-2-x} x\right )\right )+\frac {1}{2} \log ^2\left (-1-x+\log \left (\frac {4}{x^2}+e^{-2-x} x\right )\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.50, size = 522, normalized size = 20.08
method | result | size |
risch | \(x^{2}+2 x \ln \left (-2 \ln \left (x \right )-\ln \left ({\mathrm e}^{2+x}\right )+\ln \left (4 \,{\mathrm e}^{2+x}+x^{3}\right )-\frac {i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{-x -2} \left (4 \,{\mathrm e}^{2+x}+x^{3}\right )\right ) \left (-\mathrm {csgn}\left (i {\mathrm e}^{-x -2} \left (4 \,{\mathrm e}^{2+x}+x^{3}\right )\right )+\mathrm {csgn}\left (i {\mathrm e}^{-x -2}\right )\right ) \left (-\mathrm {csgn}\left (i {\mathrm e}^{-x -2} \left (4 \,{\mathrm e}^{2+x}+x^{3}\right )\right )+\mathrm {csgn}\left (i \left (4 \,{\mathrm e}^{2+x}+x^{3}\right )\right )\right )}{2}+\frac {i \pi \,\mathrm {csgn}\left (i x^{2}\right ) \left (-\mathrm {csgn}\left (i x^{2}\right )+\mathrm {csgn}\left (i x \right )\right )^{2}}{2}-\frac {i \pi \,\mathrm {csgn}\left (\frac {i \left (4 \,{\mathrm e}^{2+x}+x^{3}\right ) {\mathrm e}^{-x -2}}{x^{2}}\right ) \left (-\mathrm {csgn}\left (\frac {i \left (4 \,{\mathrm e}^{2+x}+x^{3}\right ) {\mathrm e}^{-x -2}}{x^{2}}\right )+\mathrm {csgn}\left (\frac {i}{x^{2}}\right )\right ) \left (-\mathrm {csgn}\left (\frac {i \left (4 \,{\mathrm e}^{2+x}+x^{3}\right ) {\mathrm e}^{-x -2}}{x^{2}}\right )+\mathrm {csgn}\left (i {\mathrm e}^{-x -2} \left (4 \,{\mathrm e}^{2+x}+x^{3}\right )\right )\right )}{2}-x -1\right )+\ln \left (-2 \ln \left (x \right )-\ln \left ({\mathrm e}^{2+x}\right )+\ln \left (4 \,{\mathrm e}^{2+x}+x^{3}\right )-\frac {i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{-x -2} \left (4 \,{\mathrm e}^{2+x}+x^{3}\right )\right ) \left (-\mathrm {csgn}\left (i {\mathrm e}^{-x -2} \left (4 \,{\mathrm e}^{2+x}+x^{3}\right )\right )+\mathrm {csgn}\left (i {\mathrm e}^{-x -2}\right )\right ) \left (-\mathrm {csgn}\left (i {\mathrm e}^{-x -2} \left (4 \,{\mathrm e}^{2+x}+x^{3}\right )\right )+\mathrm {csgn}\left (i \left (4 \,{\mathrm e}^{2+x}+x^{3}\right )\right )\right )}{2}+\frac {i \pi \,\mathrm {csgn}\left (i x^{2}\right ) \left (-\mathrm {csgn}\left (i x^{2}\right )+\mathrm {csgn}\left (i x \right )\right )^{2}}{2}-\frac {i \pi \,\mathrm {csgn}\left (\frac {i \left (4 \,{\mathrm e}^{2+x}+x^{3}\right ) {\mathrm e}^{-x -2}}{x^{2}}\right ) \left (-\mathrm {csgn}\left (\frac {i \left (4 \,{\mathrm e}^{2+x}+x^{3}\right ) {\mathrm e}^{-x -2}}{x^{2}}\right )+\mathrm {csgn}\left (\frac {i}{x^{2}}\right )\right ) \left (-\mathrm {csgn}\left (\frac {i \left (4 \,{\mathrm e}^{2+x}+x^{3}\right ) {\mathrm e}^{-x -2}}{x^{2}}\right )+\mathrm {csgn}\left (i {\mathrm e}^{-x -2} \left (4 \,{\mathrm e}^{2+x}+x^{3}\right )\right )\right )}{2}-x -1\right )^{2}\) | \(522\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 51 vs.
\(2 (25) = 50\).
time = 0.37, size = 51, normalized size = 1.96 \begin {gather*} x^{2} + 2 \, x \log \left (-2 \, x + \log \left (x^{3} + 4 \, e^{\left (x + 2\right )}\right ) - 2 \, \log \left (x\right ) - 3\right ) + \log \left (-2 \, x + \log \left (x^{3} + 4 \, e^{\left (x + 2\right )}\right ) - 2 \, \log \left (x\right ) - 3\right )^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 63 vs.
\(2 (25) = 50\).
time = 0.39, size = 63, normalized size = 2.42 \begin {gather*} x^{2} + 2 \, x \log \left (-x + \log \left (\frac {{\left (x^{3} + 4 \, e^{\left (x + 2\right )}\right )} e^{\left (-x - 2\right )}}{x^{2}}\right ) - 1\right ) + \log \left (-x + \log \left (\frac {{\left (x^{3} + 4 \, e^{\left (x + 2\right )}\right )} e^{\left (-x - 2\right )}}{x^{2}}\right ) - 1\right )^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 61 vs.
\(2 (22) = 44\).
time = 13.33, size = 61, normalized size = 2.35 \begin {gather*} x^{2} + 2 x \log {\left (- x + \log {\left (\frac {\left (x^{3} + 4 e^{x + 2}\right ) e^{- x - 2}}{x^{2}} \right )} - 1 \right )} + \log {\left (- x + \log {\left (\frac {\left (x^{3} + 4 e^{x + 2}\right ) e^{- x - 2}}{x^{2}} \right )} - 1 \right )}^{2} \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*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.84, size = 55, normalized size = 2.12 \begin {gather*} x^2+2\,x\,\ln \left (\ln \left (\frac {x^3\,{\mathrm {e}}^{-x}\,{\mathrm {e}}^{-2}+4}{x^2}\right )-x-1\right )+{\ln \left (\ln \left (\frac {x^3\,{\mathrm {e}}^{-x}\,{\mathrm {e}}^{-2}+4}{x^2}\right )-x-1\right )}^2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________