3.92.23 \(\int \frac {38 e^x x-2 e^{2 x} x+2 x^2+(-76+4 e^x) \log (x)+2 e^x x \log ^2(x)-4 \log ^3(x)}{x} \, dx\) [9123]

Optimal. Leaf size=19 \[ x^2-\left (19-e^x+\log ^2(x)\right )^2 \]

[Out]

x^2-(ln(x)^2-exp(x)+19)^2

________________________________________________________________________________________

Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(41\) vs. \(2(19)=38\).
time = 0.10, antiderivative size = 41, normalized size of antiderivative = 2.16, number of steps used = 9, number of rules used = 6, integrand size = 50, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {14, 2225, 2326, 2338, 2339, 30} \begin {gather*} x^2-e^{2 x}-\log ^4(x)-38 \log ^2(x)+\frac {2 e^x \left (19 x+x \log ^2(x)\right )}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-E^(2*x) + x^2 - 38*Log[x]^2 - Log[x]^4 + (2*E^x*(19*x + x*Log[x]^2))/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 2225

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

Rule 2326

Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = v*(y/(Log[F]*D[u, x]))}, Simp[F^u*z, x] /; EqQ[D[z,
x], w*y]] /; FreeQ[F, x]

Rule 2338

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 2339

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-2 e^{2 x}+\frac {2 e^x \left (19 x+2 \log (x)+x \log ^2(x)\right )}{x}+\frac {2 \left (x^2-38 \log (x)-2 \log ^3(x)\right )}{x}\right ) \, dx\\ &=-\left (2 \int e^{2 x} \, dx\right )+2 \int \frac {e^x \left (19 x+2 \log (x)+x \log ^2(x)\right )}{x} \, dx+2 \int \frac {x^2-38 \log (x)-2 \log ^3(x)}{x} \, dx\\ &=-e^{2 x}+\frac {2 e^x \left (19 x+x \log ^2(x)\right )}{x}+2 \int \left (x-\frac {38 \log (x)}{x}-\frac {2 \log ^3(x)}{x}\right ) \, dx\\ &=-e^{2 x}+x^2+\frac {2 e^x \left (19 x+x \log ^2(x)\right )}{x}-4 \int \frac {\log ^3(x)}{x} \, dx-76 \int \frac {\log (x)}{x} \, dx\\ &=-e^{2 x}+x^2-38 \log ^2(x)+\frac {2 e^x \left (19 x+x \log ^2(x)\right )}{x}-4 \text {Subst}\left (\int x^3 \, dx,x,\log (x)\right )\\ &=-e^{2 x}+x^2-38 \log ^2(x)-\log ^4(x)+\frac {2 e^x \left (19 x+x \log ^2(x)\right )}{x}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.14, size = 34, normalized size = 1.79 \begin {gather*} -361+38 e^x-e^{2 x}+x^2+2 \left (-19+e^x\right ) \log ^2(x)-\log ^4(x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-361 + 38*E^x - E^(2*x) + x^2 + 2*(-19 + E^x)*Log[x]^2 - Log[x]^4

________________________________________________________________________________________

Maple [A]
time = 0.49, size = 35, normalized size = 1.84

method result size
risch \(-\ln \left (x \right )^{4}+\left (2 \,{\mathrm e}^{x}-38\right ) \ln \left (x \right )^{2}+x^{2}-{\mathrm e}^{2 x}+38 \,{\mathrm e}^{x}\) \(32\)
default \(2 \,{\mathrm e}^{x} \ln \left (x \right )^{2}+38 \,{\mathrm e}^{x}+x^{2}-{\mathrm e}^{2 x}-38 \ln \left (x \right )^{2}-\ln \left (x \right )^{4}\) \(35\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-4*ln(x)^3+2*x*exp(x)*ln(x)^2+(4*exp(x)-76)*ln(x)-2*x*exp(x)^2+38*exp(x)*x+2*x^2)/x,x,method=_RETURNVERBO
SE)

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 34, normalized size = 1.79 \begin {gather*} -\log \left (x\right )^{4} + 2 \, e^{x} \log \left (x\right )^{2} + x^{2} - 38 \, \log \left (x\right )^{2} - e^{\left (2 \, x\right )} + 38 \, e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.40, size = 30, normalized size = 1.58 \begin {gather*} -\log \left (x\right )^{4} + 2 \, {\left (e^{x} - 19\right )} \log \left (x\right )^{2} + x^{2} - e^{\left (2 \, x\right )} + 38 \, e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-log(x)^4 + 2*(e^x - 19)*log(x)^2 + x^2 - e^(2*x) + 38*e^x

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 31 vs. \(2 (14) = 28\).
time = 0.13, size = 31, normalized size = 1.63 \begin {gather*} x^{2} + \left (2 \log {\left (x \right )}^{2} + 38\right ) e^{x} - e^{2 x} - \log {\left (x \right )}^{4} - 38 \log {\left (x \right )}^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 0.41, size = 34, normalized size = 1.79 \begin {gather*} -\log \left (x\right )^{4} + 2 \, e^{x} \log \left (x\right )^{2} + x^{2} - 38 \, \log \left (x\right )^{2} - e^{\left (2 \, x\right )} + 38 \, e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 7.67, size = 34, normalized size = 1.79 \begin {gather*} 38\,{\mathrm {e}}^x-{\mathrm {e}}^{2\,x}-38\,{\ln \left (x\right )}^2-{\ln \left (x\right )}^4+2\,{\mathrm {e}}^x\,{\ln \left (x\right )}^2+x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________