Optimal. Leaf size=27 \[ 5-\frac {25+\log \left (\frac {\left (e^{x^2}+x-\log (x)\right )^2}{x^2}\right )}{x} \]
________________________________________________________________________________________
Rubi [A] time = 1.97, antiderivative size = 29, normalized size of antiderivative = 1.07, number of steps used = 16, number of rules used = 5, integrand size = 103, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.049, Rules used = {6742, 14, 30, 2555, 12} \begin {gather*} -\frac {\log \left (\frac {\left (e^{x^2}+x-\log (x)\right )^2}{x^2}\right )}{x}-\frac {25}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 14
Rule 30
Rule 2555
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {2 \left (1-x+2 x^3-2 x^2 \log (x)\right )}{x^2 \left (e^{x^2}+x-\log (x)\right )}+\frac {27-4 x^2+\log \left (\frac {\left (e^{x^2}+x-\log (x)\right )^2}{x^2}\right )}{x^2}\right ) \, dx\\ &=2 \int \frac {1-x+2 x^3-2 x^2 \log (x)}{x^2 \left (e^{x^2}+x-\log (x)\right )} \, dx+\int \frac {27-4 x^2+\log \left (\frac {\left (e^{x^2}+x-\log (x)\right )^2}{x^2}\right )}{x^2} \, dx\\ &=2 \int \left (\frac {1}{x^2 \left (e^{x^2}+x-\log (x)\right )}-\frac {1}{x \left (e^{x^2}+x-\log (x)\right )}+\frac {2 x}{e^{x^2}+x-\log (x)}-\frac {2 \log (x)}{e^{x^2}+x-\log (x)}\right ) \, dx+\int \left (\frac {27-4 x^2}{x^2}+\frac {\log \left (\frac {\left (e^{x^2}+x-\log (x)\right )^2}{x^2}\right )}{x^2}\right ) \, dx\\ &=2 \int \frac {1}{x^2 \left (e^{x^2}+x-\log (x)\right )} \, dx-2 \int \frac {1}{x \left (e^{x^2}+x-\log (x)\right )} \, dx+4 \int \frac {x}{e^{x^2}+x-\log (x)} \, dx-4 \int \frac {\log (x)}{e^{x^2}+x-\log (x)} \, dx+\int \frac {27-4 x^2}{x^2} \, dx+\int \frac {\log \left (\frac {\left (e^{x^2}+x-\log (x)\right )^2}{x^2}\right )}{x^2} \, dx\\ &=-\frac {\log \left (\frac {\left (e^{x^2}+x-\log (x)\right )^2}{x^2}\right )}{x}+2 \int \frac {1}{x^2 \left (e^{x^2}+x-\log (x)\right )} \, dx-2 \int \frac {1}{x \left (e^{x^2}+x-\log (x)\right )} \, dx+4 \int \frac {x}{e^{x^2}+x-\log (x)} \, dx-4 \int \frac {\log (x)}{e^{x^2}+x-\log (x)} \, dx+\int \left (-4+\frac {27}{x^2}\right ) \, dx-\int -\frac {2 \left (-1+e^{x^2} \left (-1+2 x^2\right )+\log (x)\right )}{x^2 \left (e^{x^2}+x-\log (x)\right )} \, dx\\ &=-\frac {27}{x}-4 x-\frac {\log \left (\frac {\left (e^{x^2}+x-\log (x)\right )^2}{x^2}\right )}{x}+2 \int \frac {1}{x^2 \left (e^{x^2}+x-\log (x)\right )} \, dx-2 \int \frac {1}{x \left (e^{x^2}+x-\log (x)\right )} \, dx+2 \int \frac {-1+e^{x^2} \left (-1+2 x^2\right )+\log (x)}{x^2 \left (e^{x^2}+x-\log (x)\right )} \, dx+4 \int \frac {x}{e^{x^2}+x-\log (x)} \, dx-4 \int \frac {\log (x)}{e^{x^2}+x-\log (x)} \, dx\\ &=-\frac {27}{x}-4 x-\frac {\log \left (\frac {\left (e^{x^2}+x-\log (x)\right )^2}{x^2}\right )}{x}+2 \int \frac {1}{x^2 \left (e^{x^2}+x-\log (x)\right )} \, dx-2 \int \frac {1}{x \left (e^{x^2}+x-\log (x)\right )} \, dx+2 \int \left (\frac {-1+2 x^2}{x^2}-\frac {1-x+2 x^3-2 x^2 \log (x)}{x^2 \left (e^{x^2}+x-\log (x)\right )}\right ) \, dx+4 \int \frac {x}{e^{x^2}+x-\log (x)} \, dx-4 \int \frac {\log (x)}{e^{x^2}+x-\log (x)} \, dx\\ &=-\frac {27}{x}-4 x-\frac {\log \left (\frac {\left (e^{x^2}+x-\log (x)\right )^2}{x^2}\right )}{x}+2 \int \frac {-1+2 x^2}{x^2} \, dx+2 \int \frac {1}{x^2 \left (e^{x^2}+x-\log (x)\right )} \, dx-2 \int \frac {1}{x \left (e^{x^2}+x-\log (x)\right )} \, dx-2 \int \frac {1-x+2 x^3-2 x^2 \log (x)}{x^2 \left (e^{x^2}+x-\log (x)\right )} \, dx+4 \int \frac {x}{e^{x^2}+x-\log (x)} \, dx-4 \int \frac {\log (x)}{e^{x^2}+x-\log (x)} \, dx\\ &=-\frac {27}{x}-4 x-\frac {\log \left (\frac {\left (e^{x^2}+x-\log (x)\right )^2}{x^2}\right )}{x}+2 \int \left (2-\frac {1}{x^2}\right ) \, dx+2 \int \frac {1}{x^2 \left (e^{x^2}+x-\log (x)\right )} \, dx-2 \int \frac {1}{x \left (e^{x^2}+x-\log (x)\right )} \, dx-2 \int \left (\frac {1}{x^2 \left (e^{x^2}+x-\log (x)\right )}-\frac {1}{x \left (e^{x^2}+x-\log (x)\right )}+\frac {2 x}{e^{x^2}+x-\log (x)}-\frac {2 \log (x)}{e^{x^2}+x-\log (x)}\right ) \, dx+4 \int \frac {x}{e^{x^2}+x-\log (x)} \, dx-4 \int \frac {\log (x)}{e^{x^2}+x-\log (x)} \, dx\\ &=-\frac {25}{x}-\frac {\log \left (\frac {\left (e^{x^2}+x-\log (x)\right )^2}{x^2}\right )}{x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.11, size = 29, normalized size = 1.07 \begin {gather*} -\frac {25}{x}-\frac {\log \left (\frac {\left (e^{x^2}+x-\log (x)\right )^2}{x^2}\right )}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.54, size = 43, normalized size = 1.59 \begin {gather*} -\frac {\log \left (\frac {x^{2} + 2 \, x e^{\left (x^{2}\right )} - 2 \, {\left (x + e^{\left (x^{2}\right )}\right )} \log \relax (x) + \log \relax (x)^{2} + e^{\left (2 \, x^{2}\right )}}{x^{2}}\right ) + 25}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.16, size = 338, normalized size = 12.52
method | result | size |
risch | \(-\frac {2 \ln \left ({\mathrm e}^{x^{2}}-\ln \relax (x )+x \right )}{x}+\frac {-i \pi \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )+2 i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2}-i \pi \mathrm {csgn}\left (i x^{2}\right )^{3}+i \pi \,\mathrm {csgn}\left (\frac {i}{x^{2}}\right ) \mathrm {csgn}\left (i \left (\ln \relax (x )-{\mathrm e}^{x^{2}}-x \right )^{2}\right ) \mathrm {csgn}\left (\frac {i \left (\ln \relax (x )-{\mathrm e}^{x^{2}}-x \right )^{2}}{x^{2}}\right )-i \pi \,\mathrm {csgn}\left (\frac {i}{x^{2}}\right ) \mathrm {csgn}\left (\frac {i \left (\ln \relax (x )-{\mathrm e}^{x^{2}}-x \right )^{2}}{x^{2}}\right )^{2}+i \pi \mathrm {csgn}\left (i \left (\ln \relax (x )-{\mathrm e}^{x^{2}}-x \right )\right )^{2} \mathrm {csgn}\left (i \left (\ln \relax (x )-{\mathrm e}^{x^{2}}-x \right )^{2}\right )+2 i \pi \,\mathrm {csgn}\left (i \left (\ln \relax (x )-{\mathrm e}^{x^{2}}-x \right )\right ) \mathrm {csgn}\left (i \left (\ln \relax (x )-{\mathrm e}^{x^{2}}-x \right )^{2}\right )^{2}+i \pi \mathrm {csgn}\left (i \left (\ln \relax (x )-{\mathrm e}^{x^{2}}-x \right )^{2}\right )^{3}-i \pi \,\mathrm {csgn}\left (i \left (\ln \relax (x )-{\mathrm e}^{x^{2}}-x \right )^{2}\right ) \mathrm {csgn}\left (\frac {i \left (\ln \relax (x )-{\mathrm e}^{x^{2}}-x \right )^{2}}{x^{2}}\right )^{2}+i \pi \mathrm {csgn}\left (\frac {i \left (\ln \relax (x )-{\mathrm e}^{x^{2}}-x \right )^{2}}{x^{2}}\right )^{3}+4 \ln \relax (x )-50}{2 x}\) | \(338\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.39, size = 25, normalized size = 0.93 \begin {gather*} \frac {2 \, \log \relax (x) - 2 \, \log \left (-x - e^{\left (x^{2}\right )} + \log \relax (x)\right ) - 25}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.57, size = 47, normalized size = 1.74 \begin {gather*} -\frac {\ln \left (\frac {{\mathrm {e}}^{2\,x^2}+2\,x\,{\mathrm {e}}^{x^2}-\ln \relax (x)\,\left (2\,x+2\,{\mathrm {e}}^{x^2}\right )+{\ln \relax (x)}^2+x^2}{x^2}\right )+25}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 1.07, size = 49, normalized size = 1.81 \begin {gather*} - \frac {\log {\left (\frac {x^{2} + 2 x e^{x^{2}} + \left (- 2 x - 2 e^{x^{2}}\right ) \log {\relax (x )} + e^{2 x^{2}} + \log {\relax (x )}^{2}}{x^{2}} \right )}}{x} - \frac {25}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________