3.73.47 \(\int \frac {2-x-x^2+e^4 (-15 x^2+3 x^3)-3 e^4 x^2 \log (x)+(e^4 (-36 x-6 x^2+6 x^3)+e^4 (-6 x-3 x^2) \log (x)) \log (2+x)}{2 x+x^2} \, dx\)

Optimal. Leaf size=20 \[ (5-x+\log (x)) \left (1-3 e^4 x \log (2+x)\right ) \]

________________________________________________________________________________________

Rubi [B]  time = 0.83, antiderivative size = 90, normalized size of antiderivative = 4.50, number of steps used = 27, number of rules used = 14, integrand size = 84, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {1593, 6742, 1620, 43, 2351, 2295, 2317, 2391, 2389, 2395, 2370, 2411, 2316, 2315} \begin {gather*} 3 e^4 x^2 \log (x+2)-\left (1+21 e^4\right ) x+21 e^4 x+6 e^4 \log \left (\frac {x}{2}+1\right ) \log (x)+6 e^4 \log (2) \log (x)+\log (x)-15 e^4 (x+2) \log (x+2)-3 e^4 (x+2) \log (x) \log (x+2)+30 e^4 \log (x+2) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

21*E^4*x - (1 + 21*E^4)*x + Log[x] + 6*E^4*Log[2]*Log[x] + 6*E^4*Log[1 + x/2]*Log[x] + 30*E^4*Log[2 + x] + 3*E
^4*x^2*Log[2 + x] - 15*E^4*(2 + x)*Log[2 + x] - 3*E^4*(2 + x)*Log[x]*Log[2 + 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 1620

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[Px*(a + b*x)
^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && PolyQ[Px, x] && (IntegersQ[m, n] || IGtQ[m, -2]) &&
GtQ[Expon[Px, x], 2]

Rule 2295

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

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rule 2316

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

Rule 2317

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

Rule 2351

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> Wit
h[{u = ExpandIntegrand[a + b*Log[c*x^n], (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c,
d, e, f, m, n, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IntegerQ[m] && IntegerQ[r]))

Rule 2370

Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> With[
{u = IntHide[Log[d*(e + f*x^m)^r], x]}, Dist[(a + b*Log[c*x^n])^p, u, x] - Dist[b*n*p, Int[Dist[(a + b*Log[c*x
^n])^(p - 1)/x, u, x], x], x]] /; FreeQ[{a, b, c, d, e, f, r, m, n}, x] && IGtQ[p, 0] && RationalQ[m] && (EqQ[
p, 1] || (FractionQ[m] && IntegerQ[1/m]) || (EqQ[r, 1] && EqQ[m, 1] && EqQ[d*e, 1]))

Rule 2389

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 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2395

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

Rule 2411

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

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-x-x^2+e^4 \left (-15 x^2+3 x^3\right )-3 e^4 x^2 \log (x)+\left (e^4 \left (-36 x-6 x^2+6 x^3\right )+e^4 \left (-6 x-3 x^2\right ) \log (x)\right ) \log (2+x)}{x (2+x)} \, dx\\ &=\int \left (\frac {2-x-\left (1+15 e^4\right ) x^2+3 e^4 x^3-3 e^4 x^2 \log (x)}{x (2+x)}+3 e^4 (-6+2 x-\log (x)) \log (2+x)\right ) \, dx\\ &=\left (3 e^4\right ) \int (-6+2 x-\log (x)) \log (2+x) \, dx+\int \frac {2-x-\left (1+15 e^4\right ) x^2+3 e^4 x^3-3 e^4 x^2 \log (x)}{x (2+x)} \, dx\\ &=\left (3 e^4\right ) \int (-6 \log (2+x)+2 x \log (2+x)-\log (x) \log (2+x)) \, dx+\int \left (\frac {2-x-\left (1+15 e^4\right ) x^2+3 e^4 x^3}{x (2+x)}-\frac {3 e^4 x \log (x)}{2+x}\right ) \, dx\\ &=-\left (\left (3 e^4\right ) \int \frac {x \log (x)}{2+x} \, dx\right )-\left (3 e^4\right ) \int \log (x) \log (2+x) \, dx+\left (6 e^4\right ) \int x \log (2+x) \, dx-\left (18 e^4\right ) \int \log (2+x) \, dx+\int \frac {2-x-\left (1+15 e^4\right ) x^2+3 e^4 x^3}{x (2+x)} \, dx\\ &=3 e^4 x \log (x)+3 e^4 x^2 \log (2+x)-3 e^4 (2+x) \log (x) \log (2+x)-\left (3 e^4\right ) \int \frac {x^2}{2+x} \, dx-\left (3 e^4\right ) \int \left (\log (x)-\frac {2 \log (x)}{2+x}\right ) \, dx+\left (3 e^4\right ) \int \left (-1+\frac {(2+x) \log (2+x)}{x}\right ) \, dx-\left (18 e^4\right ) \operatorname {Subst}(\int \log (x) \, dx,x,2+x)+\int \left (-1-21 e^4+\frac {1}{x}+3 e^4 x+\frac {42 e^4}{2+x}\right ) \, dx\\ &=15 e^4 x-\left (1+21 e^4\right ) x+\frac {3 e^4 x^2}{2}+\log (x)+3 e^4 x \log (x)+42 e^4 \log (2+x)+3 e^4 x^2 \log (2+x)-18 e^4 (2+x) \log (2+x)-3 e^4 (2+x) \log (x) \log (2+x)-\left (3 e^4\right ) \int \left (-2+x+\frac {4}{2+x}\right ) \, dx-\left (3 e^4\right ) \int \log (x) \, dx+\left (3 e^4\right ) \int \frac {(2+x) \log (2+x)}{x} \, dx+\left (6 e^4\right ) \int \frac {\log (x)}{2+x} \, dx\\ &=24 e^4 x-\left (1+21 e^4\right ) x+\log (x)+6 e^4 \log \left (1+\frac {x}{2}\right ) \log (x)+30 e^4 \log (2+x)+3 e^4 x^2 \log (2+x)-18 e^4 (2+x) \log (2+x)-3 e^4 (2+x) \log (x) \log (2+x)+\left (3 e^4\right ) \operatorname {Subst}\left (\int \frac {x \log (x)}{-2+x} \, dx,x,2+x\right )-\left (6 e^4\right ) \int \frac {\log \left (1+\frac {x}{2}\right )}{x} \, dx\\ &=24 e^4 x-\left (1+21 e^4\right ) x+\log (x)+6 e^4 \log \left (1+\frac {x}{2}\right ) \log (x)+30 e^4 \log (2+x)+3 e^4 x^2 \log (2+x)-18 e^4 (2+x) \log (2+x)-3 e^4 (2+x) \log (x) \log (2+x)+6 e^4 \text {Li}_2\left (-\frac {x}{2}\right )+\left (3 e^4\right ) \operatorname {Subst}\left (\int \left (\log (x)+\frac {2 \log (x)}{-2+x}\right ) \, dx,x,2+x\right )\\ &=24 e^4 x-\left (1+21 e^4\right ) x+\log (x)+6 e^4 \log \left (1+\frac {x}{2}\right ) \log (x)+30 e^4 \log (2+x)+3 e^4 x^2 \log (2+x)-18 e^4 (2+x) \log (2+x)-3 e^4 (2+x) \log (x) \log (2+x)+6 e^4 \text {Li}_2\left (-\frac {x}{2}\right )+\left (3 e^4\right ) \operatorname {Subst}(\int \log (x) \, dx,x,2+x)+\left (6 e^4\right ) \operatorname {Subst}\left (\int \frac {\log (x)}{-2+x} \, dx,x,2+x\right )\\ &=21 e^4 x-\left (1+21 e^4\right ) x+\log (x)+6 e^4 \log (2) \log (x)+6 e^4 \log \left (1+\frac {x}{2}\right ) \log (x)+30 e^4 \log (2+x)+3 e^4 x^2 \log (2+x)-15 e^4 (2+x) \log (2+x)-3 e^4 (2+x) \log (x) \log (2+x)+6 e^4 \text {Li}_2\left (-\frac {x}{2}\right )+\left (6 e^4\right ) \operatorname {Subst}\left (\int \frac {\log \left (\frac {x}{2}\right )}{-2+x} \, dx,x,2+x\right )\\ &=21 e^4 x-\left (1+21 e^4\right ) x+\log (x)+6 e^4 \log (2) \log (x)+6 e^4 \log \left (1+\frac {x}{2}\right ) \log (x)+30 e^4 \log (2+x)+3 e^4 x^2 \log (2+x)-15 e^4 (2+x) \log (2+x)-3 e^4 (2+x) \log (x) \log (2+x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.17, size = 23, normalized size = 1.15 \begin {gather*} -x+\log (x)+3 e^4 x (-5+x-\log (x)) \log (2+x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.73, size = 30, normalized size = 1.50 \begin {gather*} -3 \, {\left (x e^{4} \log \relax (x) - {\left (x^{2} - 5 \, x\right )} e^{4}\right )} \log \left (x + 2\right ) - x + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.22, size = 37, normalized size = 1.85 \begin {gather*} 3 \, x^{2} e^{4} \log \left (x + 2\right ) - 3 \, x e^{4} \log \left (x + 2\right ) \log \relax (x) - 15 \, x e^{4} \log \left (x + 2\right ) - x + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.16, size = 32, normalized size = 1.60




method result size



risch \(\left (3 x^{2} {\mathrm e}^{4}-3 x \,{\mathrm e}^{4} \ln \relax (x )-15 x \,{\mathrm e}^{4}\right ) \ln \left (2+x \right )+\ln \relax (x )-x\) \(32\)
default \(-15 x \ln \left (2+x \right ) {\mathrm e}^{4}-3 \ln \relax (x ) {\mathrm e}^{4} \ln \left (2+x \right ) x -x +\ln \relax (x )+3 \,{\mathrm e}^{4} \ln \left (2+x \right ) x^{2}+54 \,{\mathrm e}^{4}\) \(42\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(3*x^2*exp(4)-3*x*exp(4)*ln(x)-15*x*exp(4))*ln(2+x)+ln(x)-x

________________________________________________________________________________________

maxima [B]  time = 0.39, size = 76, normalized size = 3.80 \begin {gather*} -\frac {3}{2} \, x^{2} e^{4} + \frac {3}{2} \, {\left (x^{2} - 4 \, x + 8 \, \log \left (x + 2\right )\right )} e^{4} - 15 \, {\left (x - 2 \, \log \left (x + 2\right )\right )} e^{4} + 21 \, x e^{4} + 3 \, {\left (x^{2} e^{4} - x e^{4} \log \relax (x) - 5 \, x e^{4} - 14 \, e^{4}\right )} \log \left (x + 2\right ) - x + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-3/2*x^2*e^4 + 3/2*(x^2 - 4*x + 8*log(x + 2))*e^4 - 15*(x - 2*log(x + 2))*e^4 + 21*x*e^4 + 3*(x^2*e^4 - x*e^4*
log(x) - 5*x*e^4 - 14*e^4)*log(x + 2) - x + log(x)

________________________________________________________________________________________

mupad [B]  time = 4.68, size = 32, normalized size = 1.60 \begin {gather*} \ln \relax (x)-x-\ln \left (x+2\right )\,\left (15\,x\,{\mathrm {e}}^4-3\,x^2\,{\mathrm {e}}^4+3\,x\,{\mathrm {e}}^4\,\ln \relax (x)\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x) - x - log(x + 2)*(15*x*exp(4) - 3*x^2*exp(4) + 3*x*exp(4)*log(x))

________________________________________________________________________________________

sympy [B]  time = 1.88, size = 65, normalized size = 3.25 \begin {gather*} - x + \left (3 x^{2} e^{4} - 3 x e^{4} \log {\relax (x )} - 15 x e^{4} - \frac {35 e^{4}}{2}\right ) \log {\left (x + 2 \right )} + \log {\relax (x )} + \frac {35 e^{4} \log {\left (x + \frac {-4 + 70 e^{4}}{-2 + 35 e^{4}} \right )}}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________