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

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

________________________________________________________________________________________

Rubi [A]  time = 0.43, antiderivative size = 29, normalized size of antiderivative = 1.04, number of steps used = 14, number of rules used = 10, integrand size = 61, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.164, Rules used = {1593, 6742, 36, 31, 29, 2199, 2194, 2177, 2178, 2176} \begin {gather*} -e^x x+\frac {6 e^x}{x}+2 \log \left (e^4-x\right )-2 \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rule 2176

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

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 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

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.11, size = 29, normalized size = 1.04 \begin {gather*} \frac {6 e^x}{x}-e^x x+2 \log \left (e^4-x\right )-2 \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.64, size = 29, normalized size = 1.04 \begin {gather*} -\frac {{\left (x^{2} - 6\right )} e^{x} - 2 \, x \log \left (x - e^{4}\right ) + 2 \, x \log \relax (x)}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.12, size = 31, normalized size = 1.11 \begin {gather*} -\frac {x^{2} e^{x} - 2 \, x \log \left (x - e^{4}\right ) + 2 \, x \log \relax (x) - 6 \, e^{x}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.32, size = 27, normalized size = 0.96




method result size



risch \(2 \ln \left (x -{\mathrm e}^{4}\right )-2 \ln \relax (x )-\frac {\left (x^{2}-6\right ) {\mathrm e}^{x}}{x}\) \(27\)
norman \(\frac {-{\mathrm e}^{x} x^{2}+6 \,{\mathrm e}^{x}}{x}-2 \ln \relax (x )+2 \ln \left ({\mathrm e}^{4}-x \right )\) \(31\)
default \(-{\mathrm e}^{x} x -{\mathrm e}^{4} {\mathrm e}^{x}+{\mathrm e}^{8} {\mathrm e}^{{\mathrm e}^{4}} \expIntegralEi \left (1, {\mathrm e}^{4}-x \right )-2 \ln \relax (x )+2 \ln \left (x -{\mathrm e}^{4}\right )-6 \,{\mathrm e}^{4} \left (-{\mathrm e}^{-8} \expIntegralEi \left (1, -x \right )+{\mathrm e}^{-4} \left (-\frac {{\mathrm e}^{x}}{x}-\expIntegralEi \left (1, -x \right )\right )+{\mathrm e}^{-8} {\mathrm e}^{{\mathrm e}^{4}} \expIntegralEi \left (1, {\mathrm e}^{4}-x \right )\right )-6 \,{\mathrm e}^{-4} \expIntegralEi \left (1, -x \right )+6 \,{\mathrm e}^{-4} {\mathrm e}^{{\mathrm e}^{4}} \expIntegralEi \left (1, {\mathrm e}^{4}-x \right )-6 \,{\mathrm e}^{{\mathrm e}^{4}} \expIntegralEi \left (1, {\mathrm e}^{4}-x \right )+6 \,{\mathrm e}^{4} \left (-{\mathrm e}^{-4} \expIntegralEi \left (1, -x \right )+{\mathrm e}^{-4} {\mathrm e}^{{\mathrm e}^{4}} \expIntegralEi \left (1, {\mathrm e}^{4}-x \right )\right )-{\mathrm e}^{4} \left (-{\mathrm e}^{x}+{\mathrm e}^{4} {\mathrm e}^{{\mathrm e}^{4}} \expIntegralEi \left (1, {\mathrm e}^{4}-x \right )\right )\) \(188\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*ln(x-exp(4))-2*ln(x)-(x^2-6)/x*exp(x)

________________________________________________________________________________________

maxima [A]  time = 0.40, size = 34, normalized size = 1.21 \begin {gather*} 2 \, {\left (e^{\left (-4\right )} \log \left (x - e^{4}\right ) - e^{\left (-4\right )} \log \relax (x)\right )} e^{4} - \frac {{\left (x^{2} - 6\right )} e^{x}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*(e^(-4)*log(x - e^4) - e^(-4)*log(x))*e^4 - (x^2 - 6)*e^x/x

________________________________________________________________________________________

mupad [B]  time = 0.30, size = 30, normalized size = 1.07 \begin {gather*} 2\,\ln \left (x-{\mathrm {e}}^4\right )-2\,\ln \relax (x)+\frac {6\,{\mathrm {e}}^x-x^2\,{\mathrm {e}}^x}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.23, size = 31, normalized size = 1.11 \begin {gather*} 2 \left (- \frac {\log {\relax (x )}}{e^{4}} + \frac {\log {\left (x - e^{4} \right )}}{e^{4}}\right ) e^{4} + \frac {\left (6 - x^{2}\right ) e^{x}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________