3.49.99 \(\int \frac {e^{2 x} (3-6 x)+3 x+3 x^2}{x^2} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 18, normalized size of antiderivative = 0.86, number of steps used = 5, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {14, 43, 2197} \begin {gather*} 3 x-\frac {3 e^{2 x}}{x}+3 \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(E^(2*x)*(3 - 6*x) + 3*x + 3*x^2)/x^2,x]

[Out]

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

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

Integrate[(E^(2*x)*(3 - 6*x) + 3*x + 3*x^2)/x^2,x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.97, size = 19, normalized size = 0.90 \begin {gather*} \frac {3 \, {\left (x^{2} + x \log \relax (x) - e^{\left (2 \, x\right )}\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-6*x+3)*exp(2*x)+3*x^2+3*x)/x^2,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.18, size = 19, normalized size = 0.90 \begin {gather*} \frac {3 \, {\left (x^{2} + x \log \relax (x) - e^{\left (2 \, x\right )}\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-6*x+3)*exp(2*x)+3*x^2+3*x)/x^2,x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.10, size = 18, normalized size = 0.86




method result size



risch \(3 x +3 \ln \relax (x )-\frac {3 \,{\mathrm e}^{2 x}}{x}\) \(18\)
derivativedivides \(3 x +3 \ln \left (2 x \right )-\frac {3 \,{\mathrm e}^{2 x}}{x}\) \(20\)
default \(3 x +3 \ln \left (2 x \right )-\frac {3 \,{\mathrm e}^{2 x}}{x}\) \(20\)
norman \(\frac {3 x^{2}-3 \,{\mathrm e}^{2 x}}{x}+3 \ln \relax (x )\) \(22\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-6*x+3)*exp(2*x)+3*x^2+3*x)/x^2,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.05, size = 22, normalized size = 1.05 \begin {gather*} 3\,\ln \relax (x)-\frac {3\,{\mathrm {e}}^{2\,x}-3\,x^2}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((3*x - exp(2*x)*(6*x - 3) + 3*x^2)/x^2,x)

[Out]

3*log(x) - (3*exp(2*x) - 3*x^2)/x

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-6*x+3)*exp(2*x)+3*x**2+3*x)/x**2,x)

[Out]

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

________________________________________________________________________________________