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

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

________________________________________________________________________________________

Rubi [A]  time = 0.14, antiderivative size = 37, normalized size of antiderivative = 1.68, number of steps used = 21, number of rules used = 5, integrand size = 57, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.088, Rules used = {14, 2196, 2176, 2194, 2301} \begin {gather*} 2 e^x x^2+e^{2 x} x^2+x^2-\log ^2(x)-2 (4-\log (3)) \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x^2 + 2*E^x*x^2 + E^(2*x)*x^2 - 2*(4 - Log[3])*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 2176

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((c + d*x)^m
*(b*F^(g*(e + f*x)))^n)/(f*g*n*Log[F]), x] - Dist[(d*m)/(f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*(b*F^(g*(e + f*x
)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && GtQ[m, 0] && IntegerQ[2*m] &&  !$UseGamma === True

Rule 2194

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 2196

Int[(F_)^((c_.)*(v_))*(u_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), u, x], x] /; FreeQ[{F, c
}, x] && PolynomialQ[u, x] && LinearQ[v, x] &&  !$UseGamma === True

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]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 31, normalized size = 1.41 \begin {gather*} -16+\left (1+e^x\right )^2 x^2-8 \log \left (\frac {x}{3}\right )-\log ^2\left (\frac {x}{3}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-16 + (1 + E^x)^2*x^2 - 8*Log[x/3] - Log[x/3]^2

________________________________________________________________________________________

fricas [B]  time = 1.92, size = 55, normalized size = 2.50 \begin {gather*} x^{4} e^{\left (2 \, x - 2 \, \log \relax (3) - 2 \, \log \left (\frac {1}{3} \, x\right )\right )} + 2 \, x^{3} e^{\left (x - \log \relax (3) - \log \left (\frac {1}{3} \, x\right )\right )} + x^{2} - \log \left (\frac {1}{3} \, x\right )^{2} - 8 \, \log \left (\frac {1}{3} \, x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^5+2*x^4)*exp(x-log(x))^2+(2*x^4+4*x^3)*exp(x-log(x))-2*log(1/3*x)+2*x^2-8)/x,x, algorithm="fri
cas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.15, size = 35, normalized size = 1.59 \begin {gather*} x^{2} e^{\left (2 \, x\right )} + 2 \, x^{2} e^{x} + x^{2} + 2 \, \log \relax (3) \log \relax (x) - \log \relax (x)^{2} - 8 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^5+2*x^4)*exp(x-log(x))^2+(2*x^4+4*x^3)*exp(x-log(x))-2*log(1/3*x)+2*x^2-8)/x,x, algorithm="gia
c")

[Out]

x^2*e^(2*x) + 2*x^2*e^x + x^2 + 2*log(3)*log(x) - log(x)^2 - 8*log(x)

________________________________________________________________________________________

maple [A]  time = 0.10, size = 32, normalized size = 1.45




method result size



default \(x^{2}-8 \ln \relax (x )-\ln \left (\frac {x}{3}\right )^{2}+2 \,{\mathrm e}^{x} x^{2}+{\mathrm e}^{2 x} x^{2}\) \(32\)
risch \(-\ln \relax (x )^{2}+x^{2}+2 \ln \relax (3) \ln \relax (x )-8 \ln \relax (x )+{\mathrm e}^{2 x} x^{2}+2 \,{\mathrm e}^{x} x^{2}\) \(36\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2-8*ln(x)-ln(1/3*x)^2+2*exp(x)*x^2+exp(2*x)*x^2

________________________________________________________________________________________

maxima [B]  time = 0.38, size = 62, normalized size = 2.82 \begin {gather*} x^{2} + \frac {1}{2} \, {\left (2 \, x^{2} - 2 \, x + 1\right )} e^{\left (2 \, x\right )} + \frac {1}{2} \, {\left (2 \, x - 1\right )} e^{\left (2 \, x\right )} + 2 \, {\left (x^{2} - 2 \, x + 2\right )} e^{x} + 4 \, {\left (x - 1\right )} e^{x} - \log \left (\frac {1}{3} \, x\right )^{2} - 8 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^5+2*x^4)*exp(x-log(x))^2+(2*x^4+4*x^3)*exp(x-log(x))-2*log(1/3*x)+2*x^2-8)/x,x, algorithm="max
ima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 3.69, size = 34, normalized size = 1.55 \begin {gather*} 2\,x^2\,{\mathrm {e}}^x-8\,\ln \relax (x)-{\left (\ln \relax (3)-\ln \relax (x)\right )}^2+x^2\,{\mathrm {e}}^{2\,x}+x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*x^2*exp(x) - 8*log(x) - (log(3) - log(x))^2 + x^2*exp(2*x) + x^2

________________________________________________________________________________________

sympy [B]  time = 0.32, size = 31, normalized size = 1.41 \begin {gather*} x^{2} e^{2 x} + 2 x^{2} e^{x} + x^{2} - \log {\left (\frac {x}{3} \right )}^{2} - 8 \log {\relax (x )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x**2*exp(2*x) + 2*x**2*exp(x) + x**2 - log(x/3)**2 - 8*log(x)

________________________________________________________________________________________