\(\int \frac {-5-32 e-2 e^{1+x}+3 x+(6+e^{1+x} (-6-2 x)+2 x) \log (3+x)}{3+x} \, dx\) [7879]

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

Optimal result

Integrand size = 42, antiderivative size = 19 \[ \int \frac {-5-32 e-2 e^{1+x}+3 x+\left (6+e^{1+x} (-6-2 x)+2 x\right ) \log (3+x)}{3+x} \, dx=x+2 \left (-4-e \left (16+e^x\right )+x\right ) \log (3+x) \]

[Out]

x+2*(x-4-exp(1)*(16+exp(x)))*ln(3+x)

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(47\) vs. \(2(19)=38\).

Time = 0.25 (sec) , antiderivative size = 47, normalized size of antiderivative = 2.47, number of steps used = 10, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {6873, 6874, 2326, 45, 2436, 2332} \[ \int \frac {-5-32 e-2 e^{1+x}+3 x+\left (6+e^{1+x} (-6-2 x)+2 x\right ) \log (3+x)}{3+x} \, dx=x+2 (x+3) \log (x+3)-2 (7+16 e) \log (x+3)-\frac {2 e^{x+1} (x \log (x+3)+3 \log (x+3))}{x+3} \]

[In]

Int[(-5 - 32*E - 2*E^(1 + x) + 3*x + (6 + E^(1 + x)*(-6 - 2*x) + 2*x)*Log[3 + x])/(3 + x),x]

[Out]

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

Rule 45

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 2326

Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = v*(y/(Log[F]*D[u, x]))}, Simp[F^u*z, x] /; EqQ[D[z,
x], w*y]] /; FreeQ[F, x]

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2436

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

Rule 6873

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

Rule 6874

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

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

Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.11 \[ \int \frac {-5-32 e-2 e^{1+x}+3 x+\left (6+e^{1+x} (-6-2 x)+2 x\right ) \log (3+x)}{3+x} \, dx=x-2 \left (4+16 e+e^{1+x}-x\right ) \log (3+x) \]

[In]

Integrate[(-5 - 32*E - 2*E^(1 + x) + 3*x + (6 + E^(1 + x)*(-6 - 2*x) + 2*x)*Log[3 + x])/(3 + x),x]

[Out]

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

Maple [A] (verified)

Time = 0.17 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.63

method result size
norman \(x +\left (-8-32 \,{\mathrm e}\right ) \ln \left (3+x \right )+2 x \ln \left (3+x \right )-2 \,{\mathrm e} \,{\mathrm e}^{x} \ln \left (3+x \right )\) \(31\)
risch \(\left (-2 \,{\mathrm e}^{1+x}+2 x \right ) \ln \left (3+x \right )-32 \,{\mathrm e} \ln \left (3+x \right )-8 \ln \left (3+x \right )+x\) \(32\)
default \(-2 \,{\mathrm e} \,{\mathrm e}^{x} \ln \left (3+x \right )+x -\left (14+32 \,{\mathrm e}\right ) \ln \left (3+x \right )+2 \left (3+x \right ) \ln \left (3+x \right )-6\) \(35\)
parallelrisch \(-2 \,{\mathrm e} \,{\mathrm e}^{x} \ln \left (3+x \right )-32 \,{\mathrm e} \ln \left (3+x \right )+2 x \ln \left (3+x \right )+x -8 \ln \left (3+x \right )-6\) \(35\)
parts \(-2 \,{\mathrm e} \,{\mathrm e}^{x} \ln \left (3+x \right )+x -\left (14+32 \,{\mathrm e}\right ) \ln \left (3+x \right )+2 \left (3+x \right ) \ln \left (3+x \right )-6\) \(35\)

[In]

int((((-2*x-6)*exp(1)*exp(x)+2*x+6)*ln(3+x)-2*exp(1)*exp(x)-32*exp(1)+3*x-5)/(3+x),x,method=_RETURNVERBOSE)

[Out]

x+(-8-32*exp(1))*ln(3+x)+2*x*ln(3+x)-2*exp(1)*exp(x)*ln(3+x)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.11 \[ \int \frac {-5-32 e-2 e^{1+x}+3 x+\left (6+e^{1+x} (-6-2 x)+2 x\right ) \log (3+x)}{3+x} \, dx=2 \, {\left (x - 16 \, e - e^{\left (x + 1\right )} - 4\right )} \log \left (x + 3\right ) + x \]

[In]

integrate((((-2*x-6)*exp(1)*exp(x)+2*x+6)*log(3+x)-2*exp(1)*exp(x)-32*exp(1)+3*x-5)/(3+x),x, algorithm="fricas
")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.89 \[ \int \frac {-5-32 e-2 e^{1+x}+3 x+\left (6+e^{1+x} (-6-2 x)+2 x\right ) \log (3+x)}{3+x} \, dx=2 x \log {\left (x + 3 \right )} + x - 2 e e^{x} \log {\left (x + 3 \right )} - 8 \cdot \left (1 + 4 e\right ) \log {\left (x + 3 \right )} \]

[In]

integrate((((-2*x-6)*exp(1)*exp(x)+2*x+6)*ln(3+x)-2*exp(1)*exp(x)-32*exp(1)+3*x-5)/(3+x),x)

[Out]

2*x*log(x + 3) + x - 2*E*exp(x)*log(x + 3) - 8*(1 + 4*E)*log(x + 3)

Maxima [F]

\[ \int \frac {-5-32 e-2 e^{1+x}+3 x+\left (6+e^{1+x} (-6-2 x)+2 x\right ) \log (3+x)}{3+x} \, dx=\int { -\frac {2 \, {\left ({\left (x + 3\right )} e^{\left (x + 1\right )} - x - 3\right )} \log \left (x + 3\right ) - 3 \, x + 32 \, e + 2 \, e^{\left (x + 1\right )} + 5}{x + 3} \,d x } \]

[In]

integrate((((-2*x-6)*exp(1)*exp(x)+2*x+6)*log(3+x)-2*exp(1)*exp(x)-32*exp(1)+3*x-5)/(3+x),x, algorithm="maxima
")

[Out]

2*e^(-2)*exp_integral_e(1, -x - 3) + 2*(x - 3*log(x + 3))*log(x + 3) - 32*e*log(x + 3) - 2*e^(x + 1)*log(x + 3
) + 6*log(x + 3)^2 + x + 2*integrate(e^(x + 1)/(x + 3), x) - 8*log(x + 3)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.74 \[ \int \frac {-5-32 e-2 e^{1+x}+3 x+\left (6+e^{1+x} (-6-2 x)+2 x\right ) \log (3+x)}{3+x} \, dx=2 \, x \log \left (x + 3\right ) - 32 \, e \log \left (x + 3\right ) - 2 \, e^{\left (x + 1\right )} \log \left (x + 3\right ) + x - 8 \, \log \left (x + 3\right ) \]

[In]

integrate((((-2*x-6)*exp(1)*exp(x)+2*x+6)*log(3+x)-2*exp(1)*exp(x)-32*exp(1)+3*x-5)/(3+x),x, algorithm="giac")

[Out]

2*x*log(x + 3) - 32*e*log(x + 3) - 2*e^(x + 1)*log(x + 3) + x - 8*log(x + 3)

Mupad [B] (verification not implemented)

Time = 11.90 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.74 \[ \int \frac {-5-32 e-2 e^{1+x}+3 x+\left (6+e^{1+x} (-6-2 x)+2 x\right ) \log (3+x)}{3+x} \, dx=x-8\,\ln \left (x+3\right )-32\,\ln \left (x+3\right )\,\mathrm {e}+2\,x\,\ln \left (x+3\right )-2\,\ln \left (x+3\right )\,{\mathrm {e}}^{x+1} \]

[In]

int(-(32*exp(1) - 3*x + 2*exp(1)*exp(x) - log(x + 3)*(2*x - exp(1)*exp(x)*(2*x + 6) + 6) + 5)/(x + 3),x)

[Out]

x - 8*log(x + 3) - 32*log(x + 3)*exp(1) + 2*x*log(x + 3) - 2*log(x + 3)*exp(x + 1)