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

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

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 23, normalized size of antiderivative = 0.92, number of steps used = 6, number of rules used = 3, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {12, 14, 2197} \begin {gather*} -\frac {x}{3}+\frac {4 e^x}{x}+\frac {2 \log (4)}{3 x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> With[{b = Coefficient[v, x, 1], d = Coefficient[u, x, 0],
e = Coefficient[u, x, 1], f = Coefficient[w, x, 0], g = Coefficient[w, x, 1]}, Simp[(g*u^(m + 1)*F^(c*v))/(b*c
*e*Log[F]), x] /; EqQ[e*g*(m + 1) - b*c*(e*f - d*g)*Log[F], 0]] /; FreeQ[{F, c, m}, x] && LinearQ[{u, v, w}, x
]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 23, normalized size = 0.92 \begin {gather*} \frac {4 e^x}{x}-\frac {x}{3}+\frac {2 \log (4)}{3 x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 1.64, size = 17, normalized size = 0.68 \begin {gather*} -\frac {x^{2} - 12 \, e^{x} - 4 \, \log \relax (2)}{3 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/3*((12*x-12)*exp(x)-4*log(2)-x^2)/x^2,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.14, size = 17, normalized size = 0.68 \begin {gather*} -\frac {x^{2} - 12 \, e^{x} - 4 \, \log \relax (2)}{3 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/3*((12*x-12)*exp(x)-4*log(2)-x^2)/x^2,x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.04, size = 19, normalized size = 0.76




method result size



default \(-\frac {x}{3}+\frac {4 \,{\mathrm e}^{x}}{x}+\frac {4 \ln \relax (2)}{3 x}\) \(19\)
norman \(\frac {-\frac {x^{2}}{3}+4 \,{\mathrm e}^{x}+\frac {4 \ln \relax (2)}{3}}{x}\) \(19\)
risch \(-\frac {x}{3}+\frac {4 \,{\mathrm e}^{x}}{x}+\frac {4 \ln \relax (2)}{3 x}\) \(19\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [C]  time = 0.38, size = 22, normalized size = 0.88 \begin {gather*} -\frac {1}{3} \, x + \frac {4 \, \log \relax (2)}{3 \, x} + 4 \, {\rm Ei}\relax (x) - 4 \, \Gamma \left (-1, -x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/3*((12*x-12)*exp(x)-4*log(2)-x^2)/x^2,x, algorithm="maxima")

[Out]

-1/3*x + 4/3*log(2)/x + 4*Ei(x) - 4*gamma(-1, -x)

________________________________________________________________________________________

mupad [B]  time = 0.06, size = 17, normalized size = 0.68 \begin {gather*} \frac {\frac {\ln \left (16\right )}{3}+4\,{\mathrm {e}}^x}{x}-\frac {x}{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(log(16)/3 + 4*exp(x))/x - x/3

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/3*((12*x-12)*exp(x)-4*ln(2)-x**2)/x**2,x)

[Out]

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

________________________________________________________________________________________