3.66.19 \(\int \frac {e^{\frac {4}{x+\log (x)}} (-4-4 x)-2 x^2-x^3+x^4+(-4 x-4 x^2+2 x^3+2 x^4) \log (x)+(-2-5 x+x^2+4 x^3) \log ^2(x)+(-2+2 x^2) \log ^3(x)}{x^3+2 x^2 \log (x)+x \log ^2(x)} \, dx\)

Optimal. Leaf size=28 \[ 1+e^{\frac {4}{x+\log (x)}}-x-\log (x) \left (2-x^2+\log (x)\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 2.92, antiderivative size = 30, normalized size of antiderivative = 1.07, number of steps used = 31, number of rules used = 7, integrand size = 102, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {6688, 6742, 6706, 14, 2357, 2301, 2304} \begin {gather*} x^2 \log (x)-x-\log ^2(x)+e^{\frac {4}{x+\log (x)}}-2 \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

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 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2357

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*x^
n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, n}, x] && RationalFunctionQ[RFx, x] && IGtQ[p, 0]

Rule 6688

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

Rule 6706

Int[(F_)^(v_)*(u_), x_Symbol] :> With[{q = DerivativeDivides[v, u, x]}, Simp[(q*F^v)/Log[F], x] /;  !FalseQ[q]
] /; FreeQ[F, x]

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 \frac {(1+x) \left (-4 e^{\frac {4}{x+\log (x)}}+(-2+x) x^2+2 x \left (-2+x^2\right ) \log (x)+\left (-2-3 x+4 x^2\right ) \log ^2(x)+2 (-1+x) \log ^3(x)\right )}{x (x+\log (x))^2} \, dx\\ &=\int \left (-\frac {4 e^{\frac {4}{x+\log (x)}} (1+x)}{x (x+\log (x))^2}+\frac {(-2+x) x (1+x)}{(x+\log (x))^2}+\frac {2 (1+x) \left (-2+x^2\right ) \log (x)}{(x+\log (x))^2}+\frac {(1+x) \left (-2-3 x+4 x^2\right ) \log ^2(x)}{x (x+\log (x))^2}+\frac {2 (-1+x) (1+x) \log ^3(x)}{x (x+\log (x))^2}\right ) \, dx\\ &=2 \int \frac {(1+x) \left (-2+x^2\right ) \log (x)}{(x+\log (x))^2} \, dx+2 \int \frac {(-1+x) (1+x) \log ^3(x)}{x (x+\log (x))^2} \, dx-4 \int \frac {e^{\frac {4}{x+\log (x)}} (1+x)}{x (x+\log (x))^2} \, dx+\int \frac {(-2+x) x (1+x)}{(x+\log (x))^2} \, dx+\int \frac {(1+x) \left (-2-3 x+4 x^2\right ) \log ^2(x)}{x (x+\log (x))^2} \, dx\\ &=e^{\frac {4}{x+\log (x)}}+2 \int \left (-\frac {x \left (-2-2 x+x^2+x^3\right )}{(x+\log (x))^2}+\frac {(1+x) \left (-2+x^2\right )}{x+\log (x)}\right ) \, dx+2 \int \left (-2 \left (-1+x^2\right )+\frac {(-1+x) (1+x) \log (x)}{x}+\frac {x^2 \left (1-x^2\right )}{(x+\log (x))^2}+\frac {3 x \left (-1+x^2\right )}{x+\log (x)}\right ) \, dx+\int \left (-\frac {2 x}{(x+\log (x))^2}-\frac {x^2}{(x+\log (x))^2}+\frac {x^3}{(x+\log (x))^2}\right ) \, dx+\int \left (\frac {-2-5 x+x^2+4 x^3}{x}+\frac {x \left (-2-5 x+x^2+4 x^3\right )}{(x+\log (x))^2}-\frac {2 \left (-2-5 x+x^2+4 x^3\right )}{x+\log (x)}\right ) \, dx\\ &=e^{\frac {4}{x+\log (x)}}+2 \int \frac {(-1+x) (1+x) \log (x)}{x} \, dx-2 \int \frac {x}{(x+\log (x))^2} \, dx+2 \int \frac {x^2 \left (1-x^2\right )}{(x+\log (x))^2} \, dx-2 \int \frac {x \left (-2-2 x+x^2+x^3\right )}{(x+\log (x))^2} \, dx+2 \int \frac {(1+x) \left (-2+x^2\right )}{x+\log (x)} \, dx-2 \int \frac {-2-5 x+x^2+4 x^3}{x+\log (x)} \, dx-4 \int \left (-1+x^2\right ) \, dx+6 \int \frac {x \left (-1+x^2\right )}{x+\log (x)} \, dx+\int \frac {-2-5 x+x^2+4 x^3}{x} \, dx-\int \frac {x^2}{(x+\log (x))^2} \, dx+\int \frac {x^3}{(x+\log (x))^2} \, dx+\int \frac {x \left (-2-5 x+x^2+4 x^3\right )}{(x+\log (x))^2} \, dx\\ &=e^{\frac {4}{x+\log (x)}}+4 x-\frac {4 x^3}{3}-2 \int \frac {x}{(x+\log (x))^2} \, dx+2 \int \left (-\frac {\log (x)}{x}+x \log (x)\right ) \, dx+2 \int \left (\frac {x^2}{(x+\log (x))^2}-\frac {x^4}{(x+\log (x))^2}\right ) \, dx-2 \int \left (-\frac {2 x}{(x+\log (x))^2}-\frac {2 x^2}{(x+\log (x))^2}+\frac {x^3}{(x+\log (x))^2}+\frac {x^4}{(x+\log (x))^2}\right ) \, dx+2 \int \left (-\frac {2}{x+\log (x)}-\frac {2 x}{x+\log (x)}+\frac {x^2}{x+\log (x)}+\frac {x^3}{x+\log (x)}\right ) \, dx-2 \int \left (-\frac {2}{x+\log (x)}-\frac {5 x}{x+\log (x)}+\frac {x^2}{x+\log (x)}+\frac {4 x^3}{x+\log (x)}\right ) \, dx+6 \int \left (-\frac {x}{x+\log (x)}+\frac {x^3}{x+\log (x)}\right ) \, dx+\int \left (-5-\frac {2}{x}+x+4 x^2\right ) \, dx-\int \frac {x^2}{(x+\log (x))^2} \, dx+\int \frac {x^3}{(x+\log (x))^2} \, dx+\int \left (-\frac {2 x}{(x+\log (x))^2}-\frac {5 x^2}{(x+\log (x))^2}+\frac {x^3}{(x+\log (x))^2}+\frac {4 x^4}{(x+\log (x))^2}\right ) \, dx\\ &=e^{\frac {4}{x+\log (x)}}-x+\frac {x^2}{2}-2 \log (x)-2 \int \frac {\log (x)}{x} \, dx+2 \int x \log (x) \, dx-2 \left (2 \int \frac {x}{(x+\log (x))^2} \, dx\right )+2 \int \frac {x^2}{(x+\log (x))^2} \, dx-2 \int \frac {x^3}{(x+\log (x))^2} \, dx-2 \left (2 \int \frac {x^4}{(x+\log (x))^2} \, dx\right )+2 \int \frac {x^3}{x+\log (x)} \, dx+4 \int \frac {x}{(x+\log (x))^2} \, dx+4 \int \frac {x^2}{(x+\log (x))^2} \, dx+4 \int \frac {x^4}{(x+\log (x))^2} \, dx-4 \int \frac {x}{x+\log (x)} \, dx-5 \int \frac {x^2}{(x+\log (x))^2} \, dx-6 \int \frac {x}{x+\log (x)} \, dx+6 \int \frac {x^3}{x+\log (x)} \, dx-8 \int \frac {x^3}{x+\log (x)} \, dx+10 \int \frac {x}{x+\log (x)} \, dx-\int \frac {x^2}{(x+\log (x))^2} \, dx+2 \int \frac {x^3}{(x+\log (x))^2} \, dx\\ &=e^{\frac {4}{x+\log (x)}}-x-2 \log (x)+x^2 \log (x)-\log ^2(x)-2 \left (2 \int \frac {x}{(x+\log (x))^2} \, dx\right )+2 \int \frac {x^2}{(x+\log (x))^2} \, dx-2 \int \frac {x^3}{(x+\log (x))^2} \, dx-2 \left (2 \int \frac {x^4}{(x+\log (x))^2} \, dx\right )+2 \int \frac {x^3}{x+\log (x)} \, dx+4 \int \frac {x}{(x+\log (x))^2} \, dx+4 \int \frac {x^2}{(x+\log (x))^2} \, dx+4 \int \frac {x^4}{(x+\log (x))^2} \, dx-4 \int \frac {x}{x+\log (x)} \, dx-5 \int \frac {x^2}{(x+\log (x))^2} \, dx-6 \int \frac {x}{x+\log (x)} \, dx+6 \int \frac {x^3}{x+\log (x)} \, dx-8 \int \frac {x^3}{x+\log (x)} \, dx+10 \int \frac {x}{x+\log (x)} \, dx-\int \frac {x^2}{(x+\log (x))^2} \, dx+2 \int \frac {x^3}{(x+\log (x))^2} \, dx\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.73, size = 30, normalized size = 1.07 \begin {gather*} e^{\frac {4}{x+\log (x)}}-x-2 \log (x)+x^2 \log (x)-\log ^2(x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.67, size = 27, normalized size = 0.96 \begin {gather*} {\left (x^{2} - 2\right )} \log \relax (x) - \log \relax (x)^{2} - x + e^{\left (\frac {4}{x + \log \relax (x)}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-4*x-4)*exp(4/(x+log(x)))+(2*x^2-2)*log(x)^3+(4*x^3+x^2-5*x-2)*log(x)^2+(2*x^4+2*x^3-4*x^2-4*x)*lo
g(x)+x^4-x^3-2*x^2)/(x*log(x)^2+2*x^2*log(x)+x^3),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.21, size = 29, normalized size = 1.04 \begin {gather*} x^{2} \log \relax (x) - \log \relax (x)^{2} - x + e^{\left (\frac {4}{x + \log \relax (x)}\right )} - 2 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-4*x-4)*exp(4/(x+log(x)))+(2*x^2-2)*log(x)^3+(4*x^3+x^2-5*x-2)*log(x)^2+(2*x^4+2*x^3-4*x^2-4*x)*lo
g(x)+x^4-x^3-2*x^2)/(x*log(x)^2+2*x^2*log(x)+x^3),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.05, size = 30, normalized size = 1.07




method result size



risch \(-\ln \relax (x )^{2}+x^{2} \ln \relax (x )-x -2 \ln \relax (x )+{\mathrm e}^{\frac {4}{x +\ln \relax (x )}}\) \(30\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-ln(x)^2+x^2*ln(x)-x-2*ln(x)+exp(4/(x+ln(x)))

________________________________________________________________________________________

maxima [A]  time = 0.40, size = 27, normalized size = 0.96 \begin {gather*} {\left (x^{2} - 2\right )} \log \relax (x) - \log \relax (x)^{2} - x + e^{\left (\frac {4}{x + \log \relax (x)}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-4*x-4)*exp(4/(x+log(x)))+(2*x^2-2)*log(x)^3+(4*x^3+x^2-5*x-2)*log(x)^2+(2*x^4+2*x^3-4*x^2-4*x)*lo
g(x)+x^4-x^3-2*x^2)/(x*log(x)^2+2*x^2*log(x)+x^3),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 4.71, size = 29, normalized size = 1.04 \begin {gather*} {\mathrm {e}}^{\frac {4}{x+\ln \relax (x)}}-x-2\,\ln \relax (x)+x^2\,\ln \relax (x)-{\ln \relax (x)}^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(log(x)*(4*x + 4*x^2 - 2*x^3 - 2*x^4) - log(x)^3*(2*x^2 - 2) + log(x)^2*(5*x - x^2 - 4*x^3 + 2) + exp(4/(
x + log(x)))*(4*x + 4) + 2*x^2 + x^3 - x^4)/(x*log(x)^2 + 2*x^2*log(x) + x^3),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.42, size = 26, normalized size = 0.93 \begin {gather*} x^{2} \log {\relax (x )} - x + e^{\frac {4}{x + \log {\relax (x )}}} - \log {\relax (x )}^{2} - 2 \log {\relax (x )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________