3.2.35 \(\int \frac {-10+x^2+e^{5 x} (-1+5 x)+e^x (4-4 x+x^2)-5 \log (4)}{x^2} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.14, antiderivative size = 31, normalized size of antiderivative = 1.03, number of steps used = 11, number of rules used = 6, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {14, 2199, 2194, 2177, 2178, 2197} \begin {gather*} x+e^x-\frac {4 e^x}{x}+\frac {e^{5 x}}{x}+\frac {5 (2+\log (4))}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[((c + d*x)^(m
 + 1)*(b*F^(g*(e + f*x)))^n)/(d*(m + 1)), x] - Dist[(f*g*n*Log[F])/(d*(m + 1)), 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] && LtQ[m, -1] && IntegerQ[2*m] &&  !$UseGamma ===
True

Rule 2178

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - (c*f)/d))*ExpIntegral
Ei[(f*g*(c + d*x)*Log[F])/d])/d, x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !$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 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
]

Rule 2199

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 26, normalized size = 0.87 \begin {gather*} \frac {e^{5 x}+e^x (-4+x)+x^2+5 (2+\log (4))}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 1.22, size = 23, normalized size = 0.77 \begin {gather*} \frac {x^{2} + {\left (x - 4\right )} e^{x} + e^{\left (5 \, x\right )} + 10 \, \log \relax (2) + 10}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((5*x-1)*exp(5*x)+(x^2-4*x+4)*exp(x)-10*log(2)+x^2-10)/x^2,x, algorithm="fricas")

[Out]

(x^2 + (x - 4)*e^x + e^(5*x) + 10*log(2) + 10)/x

________________________________________________________________________________________

giac [A]  time = 0.43, size = 25, normalized size = 0.83 \begin {gather*} \frac {x^{2} + x e^{x} + e^{\left (5 \, x\right )} - 4 \, e^{x} + 10 \, \log \relax (2) + 10}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((5*x-1)*exp(5*x)+(x^2-4*x+4)*exp(x)-10*log(2)+x^2-10)/x^2,x, algorithm="giac")

[Out]

(x^2 + x*e^x + e^(5*x) - 4*e^x + 10*log(2) + 10)/x

________________________________________________________________________________________

maple [A]  time = 0.04, size = 26, normalized size = 0.87




method result size



norman \(\frac {x^{2}+{\mathrm e}^{5 x}+{\mathrm e}^{x} x -4 \,{\mathrm e}^{x}+10 \ln \relax (2)+10}{x}\) \(26\)
default \(x +\frac {10}{x}+\frac {{\mathrm e}^{5 x}}{x}-\frac {4 \,{\mathrm e}^{x}}{x}+\frac {10 \ln \relax (2)}{x}+{\mathrm e}^{x}\) \(32\)
risch \(x +\frac {10 \ln \relax (2)}{x}+\frac {10}{x}+\frac {{\mathrm e}^{5 x}}{x}+\frac {\left (x -4\right ) {\mathrm e}^{x}}{x}\) \(32\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x^2+exp(x)^5+exp(x)*x-4*exp(x)+10*ln(2)+10)/x

________________________________________________________________________________________

maxima [C]  time = 0.61, size = 40, normalized size = 1.33 \begin {gather*} x + \frac {10 \, \log \relax (2)}{x} + \frac {10}{x} + 5 \, {\rm Ei}\left (5 \, x\right ) - 4 \, {\rm Ei}\relax (x) + e^{x} + 4 \, \Gamma \left (-1, -x\right ) - 5 \, \Gamma \left (-1, -5 \, x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((5*x-1)*exp(5*x)+(x^2-4*x+4)*exp(x)-10*log(2)+x^2-10)/x^2,x, algorithm="maxima")

[Out]

x + 10*log(2)/x + 10/x + 5*Ei(5*x) - 4*Ei(x) + e^x + 4*gamma(-1, -x) - 5*gamma(-1, -5*x)

________________________________________________________________________________________

mupad [B]  time = 0.27, size = 22, normalized size = 0.73 \begin {gather*} x+{\mathrm {e}}^x+\frac {{\mathrm {e}}^{5\,x}+10\,\ln \relax (2)-4\,{\mathrm {e}}^x+10}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((exp(x)*(x^2 - 4*x + 4) - 10*log(2) + exp(5*x)*(5*x - 1) + x^2 - 10)/x^2,x)

[Out]

x + exp(x) + (exp(5*x) + 10*log(2) - 4*exp(x) + 10)/x

________________________________________________________________________________________

sympy [A]  time = 0.16, size = 29, normalized size = 0.97 \begin {gather*} x + \frac {10 \log {\relax (2 )} + 10}{x} + \frac {x e^{5 x} + \left (x^{2} - 4 x\right ) e^{x}}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + (10*log(2) + 10)/x + (x*exp(5*x) + (x**2 - 4*x)*exp(x))/x**2

________________________________________________________________________________________