\(\int \frac {e^2 (-3 x+x^2)-\frac {e^3 (-9-3 x) x \log (3+x)}{-3+x}+e^2 (-9 x+x^3) \log (3+x)}{(-9 x+x^3) \log (3+x)} \, dx\) [2397]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 63, antiderivative size = 21 \[ \int \frac {e^2 \left (-3 x+x^2\right )-\frac {e^3 (-9-3 x) x \log (3+x)}{-3+x}+e^2 \left (-9 x+x^3\right ) \log (3+x)}{\left (-9 x+x^3\right ) \log (3+x)} \, dx=e^2 \left (x+\frac {e x}{3-x}+\log (\log (3+x))\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.27 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.29, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {1607, 6820, 12, 2437, 2339, 29} \[ \int \frac {e^2 \left (-3 x+x^2\right )-\frac {e^3 (-9-3 x) x \log (3+x)}{-3+x}+e^2 \left (-9 x+x^3\right ) \log (3+x)}{\left (-9 x+x^3\right ) \log (3+x)} \, dx=e^2 x+\frac {3 e^3}{3-x}+e^2 \log (\log (x+3)) \]

[In]

Int[(E^2*(-3*x + x^2) - (E^3*(-9 - 3*x)*x*Log[3 + x])/(-3 + x) + E^2*(-9*x + x^3)*Log[3 + x])/((-9*x + x^3)*Lo
g[3 + x]),x]

[Out]

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

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

Rule 1607

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 2339

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 2437

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_) + (g_.)*(x_))^(q_.), x_Symbol] :> Dist[1/
e, Subst[Int[(f*(x/d))^q*(a + b*Log[c*x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p, q}, x]
 && EqQ[e*f - d*g, 0]

Rule 6820

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

Rubi steps \begin{align*} \text {integral}& = \int \frac {e^2 \left (-3 x+x^2\right )-\frac {e^3 (-9-3 x) x \log (3+x)}{-3+x}+e^2 \left (-9 x+x^3\right ) \log (3+x)}{x \left (-9+x^2\right ) \log (3+x)} \, dx \\ & = \int e^2 \left (1+\frac {3 e}{(-3+x)^2}+\frac {1}{(3+x) \log (3+x)}\right ) \, dx \\ & = e^2 \int \left (1+\frac {3 e}{(-3+x)^2}+\frac {1}{(3+x) \log (3+x)}\right ) \, dx \\ & = \frac {3 e^3}{3-x}+e^2 x+e^2 \int \frac {1}{(3+x) \log (3+x)} \, dx \\ & = \frac {3 e^3}{3-x}+e^2 x+e^2 \text {Subst}\left (\int \frac {1}{x \log (x)} \, dx,x,3+x\right ) \\ & = \frac {3 e^3}{3-x}+e^2 x+e^2 \text {Subst}\left (\int \frac {1}{x} \, dx,x,\log (3+x)\right ) \\ & = \frac {3 e^3}{3-x}+e^2 x+e^2 \log (\log (3+x)) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.90 \[ \int \frac {e^2 \left (-3 x+x^2\right )-\frac {e^3 (-9-3 x) x \log (3+x)}{-3+x}+e^2 \left (-9 x+x^3\right ) \log (3+x)}{\left (-9 x+x^3\right ) \log (3+x)} \, dx=e^2 \left (-\frac {3 e}{-3+x}+x+\log (\log (3+x))\right ) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 3.23 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.38

method result size
default \({\mathrm e}^{2} \ln \left (\ln \left (3+x \right )\right )+{\mathrm e}^{2} {\mathrm e}^{\ln \left (-\frac {x}{-3+x}\right )+1}+{\mathrm e}^{2} x\) \(29\)
parts \({\mathrm e}^{2} \ln \left (\ln \left (3+x \right )\right )+{\mathrm e}^{2} {\mathrm e}^{\ln \left (-\frac {x}{-3+x}\right )+1}+{\mathrm e}^{2} x\) \(29\)
norman \(\frac {x^{2} {\mathrm e}^{2}-9 \,{\mathrm e}^{2}-3 \,{\mathrm e} \,{\mathrm e}^{2}}{-3+x}+{\mathrm e}^{2} \ln \left (\ln \left (3+x \right )\right )\) \(33\)
parallelrisch \(\frac {{\mathrm e}^{2} \ln \left (\ln \left (3+x \right )\right ) x^{2}+x^{3} {\mathrm e}^{2}+3 \,{\mathrm e}^{\ln \left (-\frac {x}{-3+x}\right )+1} x \,{\mathrm e}^{2}}{x^{2}}\) \(40\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.52 \[ \int \frac {e^2 \left (-3 x+x^2\right )-\frac {e^3 (-9-3 x) x \log (3+x)}{-3+x}+e^2 \left (-9 x+x^3\right ) \log (3+x)}{\left (-9 x+x^3\right ) \log (3+x)} \, dx=\frac {{\left (x - 3\right )} e^{2} \log \left (\log \left (x + 3\right )\right ) + {\left (x^{2} - 3 \, x\right )} e^{2} - 3 \, e^{3}}{x - 3} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.05 \[ \int \frac {e^2 \left (-3 x+x^2\right )-\frac {e^3 (-9-3 x) x \log (3+x)}{-3+x}+e^2 \left (-9 x+x^3\right ) \log (3+x)}{\left (-9 x+x^3\right ) \log (3+x)} \, dx=x e^{2} + e^{2} \log {\left (\log {\left (x + 3 \right )} \right )} - \frac {3 e^{3}}{x - 3} \]

[In]

integrate(((-3*x-9)*exp(2)*ln(3+x)*exp(ln(-x/(-3+x))+1)+(x**3-9*x)*exp(2)*ln(3+x)+(x**2-3*x)*exp(2))/(x**3-9*x
)/ln(3+x),x)

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.48 \[ \int \frac {e^2 \left (-3 x+x^2\right )-\frac {e^3 (-9-3 x) x \log (3+x)}{-3+x}+e^2 \left (-9 x+x^3\right ) \log (3+x)}{\left (-9 x+x^3\right ) \log (3+x)} \, dx=e^{2} \log \left (\log \left (x + 3\right )\right ) + \frac {x^{2} e^{2} - 3 \, x e^{2} - 3 \, e^{3}}{x - 3} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.90 \[ \int \frac {e^2 \left (-3 x+x^2\right )-\frac {e^3 (-9-3 x) x \log (3+x)}{-3+x}+e^2 \left (-9 x+x^3\right ) \log (3+x)}{\left (-9 x+x^3\right ) \log (3+x)} \, dx=\frac {x^{2} e^{2} + x e^{2} \log \left (\log \left (x + 3\right )\right ) - 3 \, x e^{2} - 3 \, e^{2} \log \left (\log \left (x + 3\right )\right ) - 3 \, e^{3}}{x - 3} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 9.44 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.95 \[ \int \frac {e^2 \left (-3 x+x^2\right )-\frac {e^3 (-9-3 x) x \log (3+x)}{-3+x}+e^2 \left (-9 x+x^3\right ) \log (3+x)}{\left (-9 x+x^3\right ) \log (3+x)} \, dx={\mathrm {e}}^2\,\left (x+\ln \left (\ln \left (x+3\right )\right )\right )-\frac {3\,{\mathrm {e}}^3}{x-3} \]

[In]

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

[Out]

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