3.3.25 \(\int \frac {e^x (2-x)+8 x^2-7 x^3}{4 x^3} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 20, normalized size of antiderivative = 0.74, number of steps used = 6, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {12, 14, 2197, 43} \begin {gather*} -\frac {e^x}{4 x^2}-\frac {7 x}{4}+2 \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 20, normalized size = 0.74 \begin {gather*} \frac {1}{4} \left (-\frac {e^x}{x^2}-7 x+8 \log (x)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.98, size = 20, normalized size = 0.74 \begin {gather*} -\frac {7 \, x^{3} - 8 \, x^{2} \log \relax (x) + e^{x}}{4 \, x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.51, size = 20, normalized size = 0.74 \begin {gather*} -\frac {7 \, x^{3} - 8 \, x^{2} \log \relax (x) + e^{x}}{4 \, x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.05, size = 16, normalized size = 0.59




method result size



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



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [C]  time = 0.59, size = 22, normalized size = 0.81 \begin {gather*} -\frac {7}{4} \, x - \frac {1}{4} \, \Gamma \left (-1, -x\right ) - \frac {1}{2} \, \Gamma \left (-2, -x\right ) + 2 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.08, size = 18, normalized size = 0.67 \begin {gather*} 2\,\ln \relax (x)-\frac {{\mathrm {e}}^x+7\,x^3}{4\,x^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________