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

Optimal. Leaf size=16 \[ x \left (x-\log \left (e^2+2 x\right )\right )^2 \]

________________________________________________________________________________________

Rubi [B]  time = 0.35, antiderivative size = 55, normalized size of antiderivative = 3.44, number of steps used = 18, number of rules used = 12, integrand size = 71, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.169, Rules used = {6, 6688, 6742, 77, 2418, 2389, 2295, 2395, 43, 2390, 2301, 2296} \begin {gather*} x^3-2 x^2 \log \left (2 x+e^2\right )+\frac {1}{2} \left (2 x+e^2\right ) \log ^2\left (2 x+e^2\right )-\frac {1}{2} e^2 \log ^2\left (2 x+e^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 6

Int[(u_.)*((w_.) + (a_.)*(v_) + (b_.)*(v_))^(p_.), x_Symbol] :> Int[u*((a + b)*v + w)^p, x] /; FreeQ[{a, b}, x
] &&  !FreeQ[v, 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 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

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 2296

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rule 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

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 2390

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

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[
(a + b*Log[c*(d + e*x)^n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n}, x] && RationalFunct
ionQ[RFx, x] && IntegerQ[p]

Rule 6688

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

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 {\left (-4+3 e^2\right ) x^2+6 x^3+\left (4 x-4 e^2 x-8 x^2\right ) \log \left (e^2+2 x\right )+\left (e^2+2 x\right ) \log ^2\left (e^2+2 x\right )}{e^2+2 x} \, dx\\ &=\int \frac {\left (x-\log \left (e^2+2 x\right )\right ) \left (x \left (-4+3 e^2+6 x\right )-\left (e^2+2 x\right ) \log \left (e^2+2 x\right )\right )}{e^2+2 x} \, dx\\ &=\int \left (\frac {x^2 \left (-4+3 e^2+6 x\right )}{e^2+2 x}-\frac {4 x \left (-1+e^2+2 x\right ) \log \left (e^2+2 x\right )}{e^2+2 x}+\log ^2\left (e^2+2 x\right )\right ) \, dx\\ &=-\left (4 \int \frac {x \left (-1+e^2+2 x\right ) \log \left (e^2+2 x\right )}{e^2+2 x} \, dx\right )+\int \frac {x^2 \left (-4+3 e^2+6 x\right )}{e^2+2 x} \, dx+\int \log ^2\left (e^2+2 x\right ) \, dx\\ &=\frac {1}{2} \operatorname {Subst}\left (\int \log ^2(x) \, dx,x,e^2+2 x\right )-4 \int \left (-\frac {1}{2} \log \left (e^2+2 x\right )+x \log \left (e^2+2 x\right )+\frac {e^2 \log \left (e^2+2 x\right )}{2 \left (e^2+2 x\right )}\right ) \, dx+\int \left (e^2-2 x+3 x^2-\frac {e^4}{e^2+2 x}\right ) \, dx\\ &=e^2 x-x^2+x^3-\frac {1}{2} e^4 \log \left (e^2+2 x\right )+\frac {1}{2} \left (e^2+2 x\right ) \log ^2\left (e^2+2 x\right )+2 \int \log \left (e^2+2 x\right ) \, dx-4 \int x \log \left (e^2+2 x\right ) \, dx-\left (2 e^2\right ) \int \frac {\log \left (e^2+2 x\right )}{e^2+2 x} \, dx-\operatorname {Subst}\left (\int \log (x) \, dx,x,e^2+2 x\right )\\ &=2 x+e^2 x-x^2+x^3-\frac {1}{2} e^4 \log \left (e^2+2 x\right )-2 x^2 \log \left (e^2+2 x\right )-\left (e^2+2 x\right ) \log \left (e^2+2 x\right )+\frac {1}{2} \left (e^2+2 x\right ) \log ^2\left (e^2+2 x\right )+4 \int \frac {x^2}{e^2+2 x} \, dx-e^2 \operatorname {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,e^2+2 x\right )+\operatorname {Subst}\left (\int \log (x) \, dx,x,e^2+2 x\right )\\ &=e^2 x-x^2+x^3-\frac {1}{2} e^4 \log \left (e^2+2 x\right )-2 x^2 \log \left (e^2+2 x\right )-\frac {1}{2} e^2 \log ^2\left (e^2+2 x\right )+\frac {1}{2} \left (e^2+2 x\right ) \log ^2\left (e^2+2 x\right )+4 \int \left (-\frac {e^2}{4}+\frac {x}{2}+\frac {e^4}{4 \left (e^2+2 x\right )}\right ) \, dx\\ &=x^3-2 x^2 \log \left (e^2+2 x\right )-\frac {1}{2} e^2 \log ^2\left (e^2+2 x\right )+\frac {1}{2} \left (e^2+2 x\right ) \log ^2\left (e^2+2 x\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 29, normalized size = 1.81 \begin {gather*} x^3-2 x^2 \log \left (e^2+2 x\right )+x \log ^2\left (e^2+2 x\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x^3 - 2*x^2*Log[E^2 + 2*x] + x*Log[E^2 + 2*x]^2

________________________________________________________________________________________

fricas [A]  time = 0.70, size = 27, normalized size = 1.69 \begin {gather*} x^{3} - 2 \, x^{2} \log \left (2 \, x + e^{2}\right ) + x \log \left (2 \, x + e^{2}\right )^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.63, size = 27, normalized size = 1.69 \begin {gather*} x^{3} - 2 \, x^{2} \log \left (2 \, x + e^{2}\right ) + x \log \left (2 \, x + e^{2}\right )^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.40, size = 28, normalized size = 1.75




method result size



norman \(x^{3}+\ln \left ({\mathrm e}^{2}+2 x \right )^{2} x -2 x^{2} \ln \left ({\mathrm e}^{2}+2 x \right )\) \(28\)
risch \(x^{3}+\ln \left ({\mathrm e}^{2}+2 x \right )^{2} x -2 x^{2} \ln \left ({\mathrm e}^{2}+2 x \right )\) \(28\)
derivativedivides \(\frac {3 \,{\mathrm e}^{4} \left ({\mathrm e}^{2}+2 x \right )}{8}+{\mathrm e}^{2} \left (\ln \left ({\mathrm e}^{2}+2 x \right ) \left ({\mathrm e}^{2}+2 x \right )-{\mathrm e}^{2}-2 x \right )-\frac {3 \,{\mathrm e}^{2} \left ({\mathrm e}^{2}+2 x \right )^{2}}{8}+\frac {\left ({\mathrm e}^{2}+2 x \right ) \ln \left ({\mathrm e}^{2}+2 x \right )^{2}}{2}-\frac {\ln \left ({\mathrm e}^{2}+2 x \right ) \left ({\mathrm e}^{2}+2 x \right )^{2}}{2}+\frac {\left ({\mathrm e}^{2}+2 x \right )^{3}}{8}-\frac {{\mathrm e}^{4} \ln \left ({\mathrm e}^{2}+2 x \right )}{2}-\frac {\ln \left ({\mathrm e}^{2}+2 x \right )^{2} {\mathrm e}^{2}}{2}+{\mathrm e}^{2} \left ({\mathrm e}^{2}+2 x \right )\) \(130\)
default \(\frac {3 \,{\mathrm e}^{4} \left ({\mathrm e}^{2}+2 x \right )}{8}+{\mathrm e}^{2} \left (\ln \left ({\mathrm e}^{2}+2 x \right ) \left ({\mathrm e}^{2}+2 x \right )-{\mathrm e}^{2}-2 x \right )-\frac {3 \,{\mathrm e}^{2} \left ({\mathrm e}^{2}+2 x \right )^{2}}{8}+\frac {\left ({\mathrm e}^{2}+2 x \right ) \ln \left ({\mathrm e}^{2}+2 x \right )^{2}}{2}-\frac {\ln \left ({\mathrm e}^{2}+2 x \right ) \left ({\mathrm e}^{2}+2 x \right )^{2}}{2}+\frac {\left ({\mathrm e}^{2}+2 x \right )^{3}}{8}-\frac {{\mathrm e}^{4} \ln \left ({\mathrm e}^{2}+2 x \right )}{2}-\frac {\ln \left ({\mathrm e}^{2}+2 x \right )^{2} {\mathrm e}^{2}}{2}+{\mathrm e}^{2} \left ({\mathrm e}^{2}+2 x \right )\) \(130\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.62, size = 242, normalized size = 15.12 \begin {gather*} x^{3} - \frac {3}{4} \, x^{2} e^{2} + {\left (e^{2} \log \left (2 \, x + e^{2}\right ) - 2 \, x\right )} e^{2} \log \left (2 \, x + e^{2}\right ) + \frac {1}{2} \, e^{4} \log \left (2 \, x + e^{2}\right )^{2} + \frac {1}{2} \, e^{2} \log \left (2 \, x + e^{2}\right )^{2} + \frac {1}{2} \, {\left (\log \left (2 \, x + e^{2}\right )^{2} - 2 \, \log \left (2 \, x + e^{2}\right ) + 2\right )} {\left (2 \, x + e^{2}\right )} + \frac {3}{4} \, x e^{4} - \frac {1}{2} \, {\left (e^{2} \log \left (2 \, x + e^{2}\right )^{2} + 2 \, e^{2} \log \left (2 \, x + e^{2}\right ) - 4 \, x\right )} e^{2} + \frac {3}{8} \, {\left (2 \, x^{2} - 2 \, x e^{2} + e^{4} \log \left (2 \, x + e^{2}\right )\right )} e^{2} - 2 \, x e^{2} - {\left (2 \, x^{2} - 2 \, x e^{2} + e^{4} \log \left (2 \, x + e^{2}\right )\right )} \log \left (2 \, x + e^{2}\right ) - {\left (e^{2} \log \left (2 \, x + e^{2}\right ) - 2 \, x\right )} \log \left (2 \, x + e^{2}\right ) - \frac {3}{8} \, e^{6} \log \left (2 \, x + e^{2}\right ) + e^{4} \log \left (2 \, x + e^{2}\right ) + e^{2} \log \left (2 \, x + e^{2}\right ) - 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.38, size = 15, normalized size = 0.94 \begin {gather*} x\,{\left (x-\ln \left (2\,x+{\mathrm {e}}^2\right )\right )}^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x*(x - log(2*x + exp(2)))^2

________________________________________________________________________________________

sympy [B]  time = 0.16, size = 27, normalized size = 1.69 \begin {gather*} x^{3} - 2 x^{2} \log {\left (2 x + e^{2} \right )} + x \log {\left (2 x + e^{2} \right )}^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________