3.56.79 \(\int \frac {e^{2+x} (-3 x^2+x^3) \log (3)+(e^4 (-12+4 x)+e^2 (-4 x^2+x^3)) \log (3)}{e^2 (-3 x^2+x^3)} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.31, antiderivative size = 31, normalized size of antiderivative = 1.24, number of steps used = 8, number of rules used = 5, integrand size = 59, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.085, Rules used = {12, 1593, 6688, 2194, 43} \begin {gather*} x \log (3)-\log (3) \log (3-x)+e^x \log (3)-\frac {4 e^2 \log (3)}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

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

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.24, size = 28, normalized size = 1.12




method result size



risch \(x \ln \relax (3)-\frac {4 \,{\mathrm e}^{2} \ln \relax (3)}{x}-\ln \relax (3) \ln \left (x -3\right )+\ln \relax (3) {\mathrm e}^{x}\) \(28\)
norman \(\frac {x^{2} \ln \relax (3)+x \ln \relax (3) {\mathrm e}^{x}-4 \,{\mathrm e}^{-2} {\mathrm e}^{4} \ln \relax (3)}{x}-\ln \relax (3) \ln \left (x -3\right )\) \(37\)
default \({\mathrm e}^{-2} \left (-{\mathrm e}^{2} \ln \relax (3) \ln \left (x -3\right )+x \,{\mathrm e}^{2} \ln \relax (3)+{\mathrm e}^{2} \ln \relax (3) {\mathrm e}^{x}-\frac {4 \,{\mathrm e}^{4} \ln \relax (3)}{x}\right )\) \(39\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((x^3-3*x^2)*exp(2)*ln(3)*exp(x)+((4*x-12)*exp(4)+(x^3-4*x^2)*exp(2))*ln(3))/(x^3-3*x^2)/exp(2),x,method=_
RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} -\frac {1}{3} \, {\left (4 \, {\left (\frac {3}{x} + \log \left (x - 3\right ) - \log \relax (x)\right )} e^{4} \log \relax (3) - 4 \, {\left (\log \left (x - 3\right ) - \log \relax (x)\right )} e^{4} \log \relax (3) - 3 \, {\left (x + 3 \, \log \left (x - 3\right )\right )} e^{2} \log \relax (3) - 9 \, e^{5} E_{1}\left (-x + 3\right ) \log \relax (3) + 12 \, e^{2} \log \relax (3) \log \left (x - 3\right ) - 3 \, {\left (\frac {x e^{\left (x + 2\right )}}{x - 3} + 3 \, \int \frac {e^{\left (x + 2\right )}}{x^{2} - 6 \, x + 9}\,{d x}\right )} \log \relax (3)\right )} e^{\left (-2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/3*(4*(3/x + log(x - 3) - log(x))*e^4*log(3) - 4*(log(x - 3) - log(x))*e^4*log(3) - 3*(x + 3*log(x - 3))*e^2
*log(3) - 9*e^5*exp_integral_e(1, -x + 3)*log(3) + 12*e^2*log(3)*log(x - 3) - 3*(x*e^(x + 2)/(x - 3) + 3*integ
rate(e^(x + 2)/(x^2 - 6*x + 9), x))*log(3))*e^(-2)

________________________________________________________________________________________

mupad [B]  time = 0.13, size = 27, normalized size = 1.08 \begin {gather*} x\,\ln \relax (3)-\ln \relax (3)\,\left (\ln \left (x-3\right )-{\mathrm {e}}^x\right )-\frac {4\,{\mathrm {e}}^2\,\ln \relax (3)}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________