Optimal. Leaf size=29 \[ \left (2-x+\log \left (x-\log \left (e^{-4-2 e^3+4 x}\right )-\log (x)\right )\right )^2 \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.17, antiderivative size = 30, normalized size of antiderivative = 1.03, number of steps
used = 3, number of rules used = 3, integrand size = 132, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.023, Rules used = {6820, 12,
6818} \begin {gather*} \left (-x+\log \left (x-\log \left (e^{4 x-2 \left (2+e^3\right )}\right )-\log (x)\right )+2\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 (1+3 x+x^2-x \log \left (e^{-4-2 e^3+4 x}\right )-x \log (x)\right ) \left (-2+x-\log \left (x-\log \left (e^{-4-2 e^3+4 x}\right )-\log (x)\right )\right )}{x \left (x-\log \left (e^{-4-2 e^3+4 x}\right )-\log (x)\right )} \, dx\\ &=2 \int \frac {\left (1+3 x+x^2-x \log \left (e^{-4-2 e^3+4 x}\right )-x \log (x)\right ) \left (-2+x-\log \left (x-\log \left (e^{-4-2 e^3+4 x}\right )-\log (x)\right )\right )}{x \left (x-\log \left (e^{-4-2 e^3+4 x}\right )-\log (x)\right )} \, dx\\ &=\left (2-x+\log \left (x-\log \left (e^{-2 \left (2+e^3\right )+4 x}\right )-\log (x)\right )\right )^2\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(88\) vs. \(2(29)=58\).
time = 0.03, size = 88, normalized size = 3.03 \begin {gather*} 2 \left (-2 x+\frac {x^2}{2}-x \log \left (x-\log \left (e^{-4-2 e^3+4 x}\right )-\log (x)\right )+\frac {1}{2} \log ^2\left (x-\log \left (e^{-4-2 e^3+4 x}\right )-\log (x)\right )+2 \log \left (-x+\log \left (e^{-4-2 e^3+4 x}\right )+\log (x)\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 = 4.19, size = 529, normalized size = 18.24
method | result | size |
risch | \(\ln \left (4+2 \,{\mathrm e}^{3}-4 \ln \left ({\mathrm e}^{x}\right )+\frac {i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{2 x}\right ) \left (-\mathrm {csgn}\left (i {\mathrm e}^{2 x}\right )+\mathrm {csgn}\left (i {\mathrm e}^{x}\right )\right )^{2}}{2}+\frac {i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{3 x}\right ) \left (-\mathrm {csgn}\left (i {\mathrm e}^{3 x}\right )+\mathrm {csgn}\left (i {\mathrm e}^{2 x}\right )\right ) \left (-\mathrm {csgn}\left (i {\mathrm e}^{3 x}\right )+\mathrm {csgn}\left (i {\mathrm e}^{x}\right )\right )}{2}+\frac {i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{4 x}\right ) \left (-\mathrm {csgn}\left (i {\mathrm e}^{4 x}\right )+\mathrm {csgn}\left (i {\mathrm e}^{3 x}\right )\right ) \left (-\mathrm {csgn}\left (i {\mathrm e}^{4 x}\right )+\mathrm {csgn}\left (i {\mathrm e}^{x}\right )\right )}{2}+x -\ln \left (x \right )\right )^{2}-2 x \ln \left (4+2 \,{\mathrm e}^{3}-4 \ln \left ({\mathrm e}^{x}\right )+\frac {i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{2 x}\right ) \left (-\mathrm {csgn}\left (i {\mathrm e}^{2 x}\right )+\mathrm {csgn}\left (i {\mathrm e}^{x}\right )\right )^{2}}{2}+\frac {i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{3 x}\right ) \left (-\mathrm {csgn}\left (i {\mathrm e}^{3 x}\right )+\mathrm {csgn}\left (i {\mathrm e}^{2 x}\right )\right ) \left (-\mathrm {csgn}\left (i {\mathrm e}^{3 x}\right )+\mathrm {csgn}\left (i {\mathrm e}^{x}\right )\right )}{2}+\frac {i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{4 x}\right ) \left (-\mathrm {csgn}\left (i {\mathrm e}^{4 x}\right )+\mathrm {csgn}\left (i {\mathrm e}^{3 x}\right )\right ) \left (-\mathrm {csgn}\left (i {\mathrm e}^{4 x}\right )+\mathrm {csgn}\left (i {\mathrm e}^{x}\right )\right )}{2}+x -\ln \left (x \right )\right )+x^{2}-4 x +4 \ln \left (\ln \left ({\mathrm e}^{x}\right )-\frac {i \left (\pi \mathrm {csgn}\left (i {\mathrm e}^{2 x}\right )^{3}-2 \pi \mathrm {csgn}\left (i {\mathrm e}^{2 x}\right )^{2} \mathrm {csgn}\left (i {\mathrm e}^{x}\right )+\pi \,\mathrm {csgn}\left (i {\mathrm e}^{2 x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{x}\right )^{2}+\pi \,\mathrm {csgn}\left (i {\mathrm e}^{2 x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{3 x}\right )-\pi \,\mathrm {csgn}\left (i {\mathrm e}^{2 x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{3 x}\right )^{2}-\pi \,\mathrm {csgn}\left (i {\mathrm e}^{x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{3 x}\right )^{2}+\pi \,\mathrm {csgn}\left (i {\mathrm e}^{x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{3 x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{4 x}\right )-\pi \,\mathrm {csgn}\left (i {\mathrm e}^{x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{4 x}\right )^{2}+\pi \mathrm {csgn}\left (i {\mathrm e}^{3 x}\right )^{3}-\pi \,\mathrm {csgn}\left (i {\mathrm e}^{3 x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{4 x}\right )^{2}+\pi \mathrm {csgn}\left (i {\mathrm e}^{4 x}\right )^{3}-2 i x +2 i \ln \left (x \right )-4 i {\mathrm e}^{3}-8 i\right )}{8}\right )\) | \(529\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.31, size = 42, normalized size = 1.45 \begin {gather*} x^{2} - 2 \, {\left (x - 2\right )} \log \left (-3 \, x + 2 \, e^{3} - \log \left (x\right ) + 4\right ) + \log \left (-3 \, x + 2 \, e^{3} - \log \left (x\right ) + 4\right )^{2} - 4 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 42, normalized size = 1.45 \begin {gather*} x^{2} - 2 \, {\left (x - 2\right )} \log \left (-3 \, x + 2 \, e^{3} - \log \left (x\right ) + 4\right ) + \log \left (-3 \, x + 2 \, e^{3} - \log \left (x\right ) + 4\right )^{2} - 4 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 54, normalized size = 1.86 \begin {gather*} x^{2} - 2 \, x \log \left (-3 \, x + 2 \, e^{3} - \log \left (x\right ) + 4\right ) + \log \left (-3 \, x + 2 \, e^{3} - \log \left (x\right ) + 4\right )^{2} - 4 \, x + 4 \, \log \left (3 \, x - 2 \, e^{3} + \log \left (x\right ) - 4\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.42, size = 54, normalized size = 1.86 \begin {gather*} 4\,\ln \left (3\,x-2\,{\mathrm {e}}^3+\ln \left (x\right )-4\right )-4\,x+{\ln \left (2\,{\mathrm {e}}^3-3\,x-\ln \left (x\right )+4\right )}^2-2\,x\,\ln \left (2\,{\mathrm {e}}^3-3\,x-\ln \left (x\right )+4\right )+x^2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________