3.79.70 \(\int \frac {1+5 x-6 x^2-2 x^3+4 x^4+e^{2 x} (2 x+4 x^2+2 x^3)+e^x (6 x-6 x^3-2 x^4)+(6 x-2 x^2-6 x^3+e^x (4 x+6 x^2+2 x^3)) \log (\frac {x}{1+x})+(2 x+2 x^2) \log ^2(\frac {x}{1+x})}{1+x} \, dx\)

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

________________________________________________________________________________________

Rubi [B]  time = 1.49, antiderivative size = 94, normalized size of antiderivative = 3.92, number of steps used = 68, number of rules used = 14, integrand size = 125, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.112, Rules used = {6742, 43, 2196, 2176, 2194, 2514, 2486, 31, 2447, 2492, 6688, 2199, 2178, 2554} \begin {gather*} x^4-2 e^x x^3-2 x^3-2 x^3 \log \left (\frac {x}{x+1}\right )+2 e^x x^2+e^{2 x} x^2+x^2+x^2 \log ^2\left (\frac {x}{x+1}\right )+2 e^x x^2 \log \left (\frac {x}{x+1}\right )+2 x^2 \log \left (\frac {x}{x+1}\right )+x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, 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 2176

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((c + d*x)^m
*(b*F^(g*(e + f*x)))^n)/(f*g*n*Log[F]), x] - Dist[(d*m)/(f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*(b*F^(g*(e + f*x
)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && GtQ[m, 0] && IntegerQ[2*m] &&  !$UseGamma === True

Rule 2178

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - (c*f)/d))*ExpIntegral
Ei[(f*g*(c + d*x)*Log[F])/d])/d, x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !$UseGamma === True

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 2196

Int[(F_)^((c_.)*(v_))*(u_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), u, x], x] /; FreeQ[{F, c
}, x] && PolynomialQ[u, x] && LinearQ[v, x] &&  !$UseGamma === True

Rule 2199

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), w*NormalizePo
werOfLinear[u, x]^m, x], x] /; FreeQ[{F, c}, x] && PolynomialQ[w, x] && LinearQ[v, x] && PowerOfLinearQ[u, x]
&& IntegerQ[m] &&  !$UseGamma === True

Rule 2447

Int[Log[u_]*(Pq_)^(m_.), x_Symbol] :> With[{C = FullSimplify[(Pq^m*(1 - u))/D[u, x]]}, Simp[C*PolyLog[2, 1 - u
], x] /; FreeQ[C, x]] /; IntegerQ[m] && PolyQ[Pq, x] && RationalFunctionQ[u, x] && LeQ[RationalFunctionExponen
ts[u, x][[2]], Expon[Pq, x]]

Rule 2486

Int[Log[(e_.)*((f_.)*((a_.) + (b_.)*(x_))^(p_.)*((c_.) + (d_.)*(x_))^(q_.))^(r_.)]^(s_.), x_Symbol] :> Simp[((
a + b*x)*Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^s)/b, x] + Dist[(q*r*s*(b*c - a*d))/b, Int[Log[e*(f*(a + b*x)^p*
(c + d*x)^q)^r]^(s - 1)/(c + d*x), x], x] /; FreeQ[{a, b, c, d, e, f, p, q, r, s}, x] && NeQ[b*c - a*d, 0] &&
EqQ[p + q, 0] && IGtQ[s, 0]

Rule 2492

Int[Log[(e_.)*((f_.)*((a_.) + (b_.)*(x_))^(p_.)*((c_.) + (d_.)*(x_))^(q_.))^(r_.)]^(s_.)*((g_.) + (h_.)*(x_))^
(m_.), x_Symbol] :> Simp[((g + h*x)^(m + 1)*Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^s)/(h*(m + 1)), x] - Dist[(p*
r*s*(b*c - a*d))/(h*(m + 1)), Int[((g + h*x)^(m + 1)*Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^(s - 1))/((a + b*x)*
(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f, g, h, m, p, q, r, s}, x] && NeQ[b*c - a*d, 0] && EqQ[p + q, 0]
&& IGtQ[s, 0] && NeQ[m, -1]

Rule 2514

Int[Log[(e_.)*((f_.)*((a_.) + (b_.)*(x_))^(p_.)*((c_.) + (d_.)*(x_))^(q_.))^(r_.)]^(s_.)*(RFx_), x_Symbol] :>
With[{u = ExpandIntegrand[Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^s, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a,
 b, c, d, e, f, p, q, r, s}, x] && RationalFunctionQ[RFx, x] && IGtQ[s, 0]

Rule 2554

Int[Log[u_]*(v_), x_Symbol] :> With[{w = IntHide[v, x]}, Dist[Log[u], w, x] - Int[SimplifyIntegrand[(w*D[u, x]
)/u, x], x] /; InverseFunctionFreeQ[w, x]] /; InverseFunctionFreeQ[u, x]

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

________________________________________________________________________________________

Mathematica [B]  time = 0.11, size = 57, normalized size = 2.38 \begin {gather*} x \left (1+\left (1+e^x\right )^2 x-2 \left (1+e^x\right ) x^2+x^3-2 x \left (-1-e^x+x\right ) \log \left (\frac {x}{1+x}\right )+x \log ^2\left (\frac {x}{1+x}\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.56, size = 74, normalized size = 3.08 \begin {gather*} x^{4} + x^{2} \log \left (\frac {x}{x + 1}\right )^{2} - 2 \, x^{3} + x^{2} e^{\left (2 \, x\right )} + x^{2} - 2 \, {\left (x^{3} - x^{2}\right )} e^{x} - 2 \, {\left (x^{3} - x^{2} e^{x} - x^{2}\right )} \log \left (\frac {x}{x + 1}\right ) + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.20, size = 90, normalized size = 3.75 \begin {gather*} x^{4} - 2 \, x^{3} e^{x} - 2 \, x^{3} \log \left (\frac {x}{x + 1}\right ) + 2 \, x^{2} e^{x} \log \left (\frac {x}{x + 1}\right ) + x^{2} \log \left (\frac {x}{x + 1}\right )^{2} - 2 \, x^{3} + x^{2} e^{\left (2 \, x\right )} + 2 \, x^{2} e^{x} + 2 \, x^{2} \log \left (\frac {x}{x + 1}\right ) + x^{2} + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [C]  time = 0.32, size = 909, normalized size = 37.88




method result size



risch \(x +2 x^{2} \ln \relax (x )+2 x^{2} {\mathrm e}^{x} \ln \relax (x )+x^{2} \ln \relax (x )^{2}+x^{4}-2 x^{3}+x^{2}-2 x^{3} \ln \relax (x )+{\mathrm e}^{2 x} x^{2}+2 \,{\mathrm e}^{x} x^{2}-2 \,{\mathrm e}^{x} x^{3}+i \pi \,x^{3} \mathrm {csgn}\left (\frac {i x}{x +1}\right )^{3}-\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (\frac {i x}{x +1}\right )^{4} \mathrm {csgn}\left (\frac {i}{x +1}\right )^{2}}{4}+\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (\frac {i x}{x +1}\right )^{5} \mathrm {csgn}\left (i x \right )}{2}+\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (\frac {i x}{x +1}\right )^{5} \mathrm {csgn}\left (\frac {i}{x +1}\right )}{2}-\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (\frac {i x}{x +1}\right )^{4} \mathrm {csgn}\left (i x \right )^{2}}{4}-i \pi \,x^{2} \mathrm {csgn}\left (\frac {i x}{x +1}\right )^{3}+\left (-2 x^{2} \ln \relax (x )+i \pi \,x^{2} \mathrm {csgn}\left (\frac {i x}{x +1}\right )^{3}-i \pi \,x^{2} \mathrm {csgn}\left (\frac {i x}{x +1}\right )^{2} \mathrm {csgn}\left (i x \right )-i \pi \,x^{2} \mathrm {csgn}\left (\frac {i x}{x +1}\right )^{2} \mathrm {csgn}\left (\frac {i}{x +1}\right )+i \pi \,x^{2} \mathrm {csgn}\left (\frac {i x}{x +1}\right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (\frac {i}{x +1}\right )+2 x^{3}-2 \,{\mathrm e}^{x} x^{2}-2 x^{2}\right ) \ln \left (x +1\right )+\ln \left (x +1\right )^{2} x^{2}+i \pi \,x^{2} \mathrm {csgn}\left (\frac {i x}{x +1}\right )^{2} \mathrm {csgn}\left (i x \right )+i \pi \,x^{2} \mathrm {csgn}\left (\frac {i x}{x +1}\right )^{2} \mathrm {csgn}\left (\frac {i}{x +1}\right )-i \pi \,x^{2} \mathrm {csgn}\left (\frac {i x}{x +1}\right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (\frac {i}{x +1}\right ) {\mathrm e}^{x}-i \pi \,x^{2} \mathrm {csgn}\left (\frac {i x}{x +1}\right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (\frac {i}{x +1}\right ) \ln \relax (x )+i \pi \,x^{3} \mathrm {csgn}\left (\frac {i x}{x +1}\right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (\frac {i}{x +1}\right )-i \pi \,x^{2} \mathrm {csgn}\left (\frac {i x}{x +1}\right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (\frac {i}{x +1}\right )+i \pi \,x^{2} \mathrm {csgn}\left (\frac {i x}{x +1}\right )^{2} \mathrm {csgn}\left (i x \right ) \ln \relax (x )+i \pi \,x^{2} \mathrm {csgn}\left (\frac {i x}{x +1}\right )^{2} \mathrm {csgn}\left (\frac {i}{x +1}\right ) {\mathrm e}^{x}+i \pi \,x^{2} \mathrm {csgn}\left (\frac {i x}{x +1}\right )^{2} \mathrm {csgn}\left (\frac {i}{x +1}\right ) \ln \relax (x )+i \pi \,x^{2} \mathrm {csgn}\left (\frac {i x}{x +1}\right )^{2} \mathrm {csgn}\left (i x \right ) {\mathrm e}^{x}-\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (\frac {i x}{x +1}\right )^{6}}{4}-i \pi \,x^{2} \mathrm {csgn}\left (\frac {i x}{x +1}\right )^{3} \ln \relax (x )-i \pi \,x^{2} \mathrm {csgn}\left (\frac {i x}{x +1}\right )^{3} {\mathrm e}^{x}+\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (\frac {i x}{x +1}\right )^{3} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (\frac {i}{x +1}\right )}{2}+\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (\frac {i x}{x +1}\right )^{3} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (\frac {i}{x +1}\right )^{2}}{2}-\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (\frac {i x}{x +1}\right )^{2} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (\frac {i}{x +1}\right )^{2}}{4}-i \pi \,x^{3} \mathrm {csgn}\left (\frac {i x}{x +1}\right )^{2} \mathrm {csgn}\left (i x \right )-i \pi \,x^{3} \mathrm {csgn}\left (\frac {i x}{x +1}\right )^{2} \mathrm {csgn}\left (\frac {i}{x +1}\right )-\pi ^{2} x^{2} \mathrm {csgn}\left (\frac {i x}{x +1}\right )^{4} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (\frac {i}{x +1}\right )\) \(909\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x+2*x^2*ln(x)+I*Pi*x^3*csgn(I*x/(x+1))*csgn(I*x)*csgn(I/(x+1))-I*Pi*x^2*csgn(I*x/(x+1))*csgn(I*x)*csgn(I/(x+1)
)+2*x^2*exp(x)*ln(x)+x^2*ln(x)^2+x^4-2*x^3+x^2-2*x^3*ln(x)+exp(2*x)*x^2+2*exp(x)*x^2-2*exp(x)*x^3+I*Pi*x^3*csg
n(I*x/(x+1))^3-1/4*Pi^2*x^2*csgn(I*x/(x+1))^4*csgn(I/(x+1))^2+1/2*Pi^2*x^2*csgn(I*x/(x+1))^5*csgn(I*x)+1/2*Pi^
2*x^2*csgn(I*x/(x+1))^5*csgn(I/(x+1))-1/4*Pi^2*x^2*csgn(I*x/(x+1))^4*csgn(I*x)^2-I*Pi*x^2*csgn(I*x/(x+1))^3-1/
4*Pi^2*x^2*csgn(I*x/(x+1))^6+(-2*x^2*ln(x)+I*Pi*x^2*csgn(I*x/(x+1))^3-I*Pi*x^2*csgn(I*x/(x+1))^2*csgn(I*x)-I*P
i*x^2*csgn(I*x/(x+1))^2*csgn(I/(x+1))+I*Pi*x^2*csgn(I*x/(x+1))*csgn(I*x)*csgn(I/(x+1))+2*x^3-2*exp(x)*x^2-2*x^
2)*ln(x+1)+I*Pi*x^2*csgn(I*x/(x+1))^2*csgn(I/(x+1))+ln(x+1)^2*x^2+I*Pi*x^2*csgn(I*x/(x+1))^2*csgn(I*x)*ln(x)+I
*Pi*x^2*csgn(I*x/(x+1))^2*csgn(I/(x+1))*exp(x)+I*Pi*x^2*csgn(I*x/(x+1))^2*csgn(I/(x+1))*ln(x)+I*Pi*x^2*csgn(I*
x/(x+1))^2*csgn(I*x)*exp(x)-I*Pi*x^2*csgn(I*x/(x+1))^3*ln(x)-I*Pi*x^2*csgn(I*x/(x+1))^3*exp(x)+1/2*Pi^2*x^2*cs
gn(I*x/(x+1))^3*csgn(I*x)^2*csgn(I/(x+1))+1/2*Pi^2*x^2*csgn(I*x/(x+1))^3*csgn(I*x)*csgn(I/(x+1))^2-1/4*Pi^2*x^
2*csgn(I*x/(x+1))^2*csgn(I*x)^2*csgn(I/(x+1))^2-I*Pi*x^3*csgn(I*x/(x+1))^2*csgn(I*x)-I*Pi*x^3*csgn(I*x/(x+1))^
2*csgn(I/(x+1))-Pi^2*x^2*csgn(I*x/(x+1))^4*csgn(I*x)*csgn(I/(x+1))+I*Pi*x^2*csgn(I*x/(x+1))^2*csgn(I*x)-I*Pi*x
^2*csgn(I*x/(x+1))*csgn(I*x)*csgn(I/(x+1))*exp(x)-I*Pi*x^2*csgn(I*x/(x+1))*csgn(I*x)*csgn(I/(x+1))*ln(x)

________________________________________________________________________________________

maxima [B]  time = 0.40, size = 108, normalized size = 4.50 \begin {gather*} x^{4} + x^{2} \log \left (x + 1\right )^{2} + x^{2} \log \relax (x)^{2} - 2 \, x^{3} + x^{2} e^{\left (2 \, x\right )} + x^{2} - 2 \, {\left (x^{3} - x^{2} \log \relax (x) - x^{2}\right )} e^{x} + 2 \, {\left (x^{3} - x^{2} e^{x} - x^{2} \log \relax (x) - x^{2} + 2\right )} \log \left (x + 1\right ) - 2 \, {\left (x^{3} - x^{2}\right )} \log \relax (x) + x - 4 \, \log \left (x + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 6.94, size = 76, normalized size = 3.17 \begin {gather*} x+{\mathrm {e}}^x\,\left (2\,x^2-2\,x^3\right )+x^2\,{\ln \left (\frac {x}{x+1}\right )}^2+x^2\,{\mathrm {e}}^{2\,x}+\ln \left (\frac {x}{x+1}\right )\,\left (2\,x^2\,{\mathrm {e}}^x+2\,x^2-2\,x^3\right )+x^2-2\,x^3+x^4 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [B]  time = 0.69, size = 75, normalized size = 3.12 \begin {gather*} x^{4} - 2 x^{3} + x^{2} e^{2 x} + x^{2} \log {\left (\frac {x}{x + 1} \right )}^{2} + x^{2} + x + \left (- 2 x^{3} + 2 x^{2}\right ) \log {\left (\frac {x}{x + 1} \right )} + \left (- 2 x^{3} + 2 x^{2} \log {\left (\frac {x}{x + 1} \right )} + 2 x^{2}\right ) e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________