3.73.56 \(\int \frac {-2-25 x+e^{x^2} (-27+4 x^2)+27 \log (x)+(-e^{x^2}-x+\log (x)) \log (\frac {e^{2 x^2}+2 e^{x^2} x+x^2+(-2 e^{x^2}-2 x) \log (x)+\log ^2(x)}{x^2})}{-e^{x^2} x^2-x^3+x^2 \log (x)} \, dx\)

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]

Int[(-2 - 25*x + E^x^2*(-27 + 4*x^2) + 27*Log[x] + (-E^x^2 - x + Log[x])*Log[(E^(2*x^2) + 2*E^x^2*x + x^2 + (-
2*E^x^2 - 2*x)*Log[x] + Log[x]^2)/x^2])/(-(E^x^2*x^2) - x^3 + x^2*Log[x]),x]

[Out]

-25/x - Log[(E^x^2 + x - Log[x])^2/x^2]/x

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2555

Int[Log[u_]*(v_), x_Symbol] :> With[{w = IntHide[v, x]}, Dist[Log[u], w, x] - Int[SimplifyIntegrand[w*Simplify
[D[u, x]/u], x], x] /; InverseFunctionFreeQ[w, x]] /; ProductQ[u]

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

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]

Integrate[(-2 - 25*x + E^x^2*(-27 + 4*x^2) + 27*Log[x] + (-E^x^2 - x + Log[x])*Log[(E^(2*x^2) + 2*E^x^2*x + x^
2 + (-2*E^x^2 - 2*x)*Log[x] + Log[x]^2)/x^2])/(-(E^x^2*x^2) - x^3 + x^2*Log[x]),x]

[Out]

-25/x - Log[(E^x^2 + x - Log[x])^2/x^2]/x

________________________________________________________________________________________

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]

integrate(((log(x)-exp(x^2)-x)*log((log(x)^2+(-2*exp(x^2)-2*x)*log(x)+exp(x^2)^2+2*exp(x^2)*x+x^2)/x^2)+27*log
(x)+(4*x^2-27)*exp(x^2)-25*x-2)/(x^2*log(x)-x^2*exp(x^2)-x^3),x, algorithm="fricas")

[Out]

-(log((x^2 + 2*x*e^(x^2) - 2*(x + e^(x^2))*log(x) + log(x)^2 + e^(2*x^2))/x^2) + 25)/x

________________________________________________________________________________________

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]

integrate(((log(x)-exp(x^2)-x)*log((log(x)^2+(-2*exp(x^2)-2*x)*log(x)+exp(x^2)^2+2*exp(x^2)*x+x^2)/x^2)+27*log
(x)+(4*x^2-27)*exp(x^2)-25*x-2)/(x^2*log(x)-x^2*exp(x^2)-x^3),x, algorithm="giac")

[Out]

Timed 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]

int(((ln(x)-exp(x^2)-x)*ln((ln(x)^2+(-2*exp(x^2)-2*x)*ln(x)+exp(x^2)^2+2*exp(x^2)*x+x^2)/x^2)+27*ln(x)+(4*x^2-
27)*exp(x^2)-25*x-2)/(x^2*ln(x)-x^2*exp(x^2)-x^3),x,method=_RETURNVERBOSE)

[Out]

-2/x*ln(exp(x^2)-ln(x)+x)+1/2*(-I*Pi*csgn(I*x)^2*csgn(I*x^2)+2*I*Pi*csgn(I*x)*csgn(I*x^2)^2-I*Pi*csgn(I*x^2)^3
+I*Pi*csgn(I/x^2)*csgn(I*(ln(x)-exp(x^2)-x)^2)*csgn(I*(ln(x)-exp(x^2)-x)^2/x^2)-I*Pi*csgn(I/x^2)*csgn(I*(ln(x)
-exp(x^2)-x)^2/x^2)^2+I*Pi*csgn(I*(ln(x)-exp(x^2)-x))^2*csgn(I*(ln(x)-exp(x^2)-x)^2)+2*I*Pi*csgn(I*(ln(x)-exp(
x^2)-x))*csgn(I*(ln(x)-exp(x^2)-x)^2)^2+I*Pi*csgn(I*(ln(x)-exp(x^2)-x)^2)^3-I*Pi*csgn(I*(ln(x)-exp(x^2)-x)^2)*
csgn(I*(ln(x)-exp(x^2)-x)^2/x^2)^2+I*Pi*csgn(I*(ln(x)-exp(x^2)-x)^2/x^2)^3+4*ln(x)-50)/x

________________________________________________________________________________________

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]

integrate(((log(x)-exp(x^2)-x)*log((log(x)^2+(-2*exp(x^2)-2*x)*log(x)+exp(x^2)^2+2*exp(x^2)*x+x^2)/x^2)+27*log
(x)+(4*x^2-27)*exp(x^2)-25*x-2)/(x^2*log(x)-x^2*exp(x^2)-x^3),x, algorithm="maxima")

[Out]

(2*log(x) - 2*log(-x - e^(x^2) + log(x)) - 25)/x

________________________________________________________________________________________

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]

int((25*x - 27*log(x) - exp(x^2)*(4*x^2 - 27) + log((exp(2*x^2) + 2*x*exp(x^2) - log(x)*(2*x + 2*exp(x^2)) + l
og(x)^2 + x^2)/x^2)*(x + exp(x^2) - log(x)) + 2)/(x^2*exp(x^2) - x^2*log(x) + x^3),x)

[Out]

-(log((exp(2*x^2) + 2*x*exp(x^2) - log(x)*(2*x + 2*exp(x^2)) + log(x)^2 + x^2)/x^2) + 25)/x

________________________________________________________________________________________

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]

integrate(((ln(x)-exp(x**2)-x)*ln((ln(x)**2+(-2*exp(x**2)-2*x)*ln(x)+exp(x**2)**2+2*exp(x**2)*x+x**2)/x**2)+27
*ln(x)+(4*x**2-27)*exp(x**2)-25*x-2)/(x**2*ln(x)-x**2*exp(x**2)-x**3),x)

[Out]

-log((x**2 + 2*x*exp(x**2) + (-2*x - 2*exp(x**2))*log(x) + exp(2*x**2) + log(x)**2)/x**2)/x - 25/x

________________________________________________________________________________________