3.71.64 \(\int \frac {18-4 e^3+e^{x+x^2} (-1+x+2 x^2)}{4 x^2} \, dx\) [7064]

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

[Out]

(exp(3)-9/2+1/4*exp(x^2+x)-7/3*x)/x

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 29, normalized size of antiderivative = 1.07, number of steps used = 4, number of rules used = 3, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {12, 14, 2327} \begin {gather*} \frac {e^{x^2+x}}{4 x}-\frac {9-2 e^3}{2 x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^(x + x^2)/(4*x) - (9 - 2*E^3)/(2*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 2327

Int[(F_)^(u_)*(v_)^(n_.)*(w_), x_Symbol] :> With[{z = Log[F]*v*D[u, x] + (n + 1)*D[v, x]}, Simp[(Coefficient[w
, x, Exponent[w, x]]/Coefficient[z, x, Exponent[z, x]])*F^u*v^(n + 1), x] /; EqQ[Exponent[w, x], Exponent[z, x
]] && EqQ[w*Coefficient[z, x, Exponent[z, x]], z*Coefficient[w, x, Exponent[w, x]]]] /; FreeQ[{F, n}, x] && Po
lynomialQ[u, x] && PolynomialQ[v, x] && PolynomialQ[w, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.59, size = 21, normalized size = 0.78 \begin {gather*} \frac {-18+4 e^3+e^{x+x^2}}{4 x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-18 + 4*E^3 + E^(x + x^2))/(4*x)

________________________________________________________________________________________

Maple [A]
time = 0.17, size = 17, normalized size = 0.63

method result size
norman \(\frac {\frac {{\mathrm e}^{x^{2}+x}}{4}+{\mathrm e}^{3}-\frac {9}{2}}{x}\) \(17\)
risch \(\frac {{\mathrm e}^{3}}{x}-\frac {9}{2 x}+\frac {{\mathrm e}^{\left (x +1\right ) x}}{4 x}\) \(24\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/4*I*sqrt(pi)*erf(I*x + 1/2*I)*e^(-1/4) + e^3/x - 9/2/x + 1/4*integrate((x - 1)*e^(x^2 + x)/x^2, x)

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 17, normalized size = 0.63 \begin {gather*} \frac {4 \, e^{3} + e^{\left (x^{2} + x\right )} - 18}{4 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.04, size = 17, normalized size = 0.63 \begin {gather*} \frac {e^{x^{2} + x}}{4 x} - \frac {\frac {9}{2} - e^{3}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/4*((2*x**2+x-1)*exp(x**2+x)-4*exp(3)+18)/x**2,x)

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 0.40, size = 17, normalized size = 0.63 \begin {gather*} \frac {4 \, e^{3} + e^{\left (x^{2} + x\right )} - 18}{4 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.08, size = 17, normalized size = 0.63 \begin {gather*} \frac {{\mathrm {e}}^{x^2+x}+4\,{\mathrm {e}}^3-18}{4\,x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((exp(x + x^2)*(x + 2*x^2 - 1))/4 - exp(3) + 9/2)/x^2,x)

[Out]

(exp(x + x^2) + 4*exp(3) - 18)/(4*x)

________________________________________________________________________________________