3.100.87 \(\int \frac {-8 x^4-2 x^5+(x+x^2) \log (1+x)+(-2-3 x-x^2) \log ^2(1+x)}{2 x^5} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.48, antiderivative size = 47, normalized size of antiderivative = 1.68, number of steps used = 51, number of rules used = 17, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.378, Rules used = {12, 14, 43, 2411, 2350, 77, 2418, 2398, 2410, 2395, 44, 36, 29, 31, 2391, 2390, 2301} \begin {gather*} \frac {\log ^2(x+1)}{4 x^4}+\frac {\log ^2(x+1)}{2 x^3}+\frac {\log ^2(x+1)}{4 x^2}-x-4 \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 29

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

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

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

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 44

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}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[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 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 2350

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

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

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

Rule 2410

Int[(Log[(c_.)*((d_) + (e_.)*(x_))]*(x_)^(m_.))/((f_) + (g_.)*(x_)), x_Symbol] :> Int[ExpandIntegrand[Log[c*(d
 + e*x)], x^m/(f + g*x), x], x] /; FreeQ[{c, d, e, f, g}, x] && EqQ[e*f - d*g, 0] && EqQ[c*d, 1] && IntegerQ[m
]

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{2} \int \frac {-8 x^4-2 x^5+\left (x+x^2\right ) \log (1+x)+\left (-2-3 x-x^2\right ) \log ^2(1+x)}{x^5} \, dx\\ &=\frac {1}{2} \int \left (-\frac {2 (4+x)}{x}+\frac {(1+x) \log (1+x)}{x^4}-\frac {(1+x) (2+x) \log ^2(1+x)}{x^5}\right ) \, dx\\ &=\frac {1}{2} \int \frac {(1+x) \log (1+x)}{x^4} \, dx-\frac {1}{2} \int \frac {(1+x) (2+x) \log ^2(1+x)}{x^5} \, dx-\int \frac {4+x}{x} \, dx\\ &=-\left (\frac {1}{2} \int \left (\frac {2 \log ^2(1+x)}{x^5}+\frac {3 \log ^2(1+x)}{x^4}+\frac {\log ^2(1+x)}{x^3}\right ) \, dx\right )+\frac {1}{2} \operatorname {Subst}\left (\int \frac {x \log (x)}{(-1+x)^4} \, dx,x,1+x\right )-\int \left (1+\frac {4}{x}\right ) \, dx\\ &=-x-4 \log (x)-\frac {\log (1+x)}{6 x^3}-\frac {\log (1+x)}{4 x^2}-\frac {1}{2} \int \frac {\log ^2(1+x)}{x^3} \, dx-\frac {1}{2} \operatorname {Subst}\left (\int \frac {-1+3 x}{6 (1-x)^3 x} \, dx,x,1+x\right )-\frac {3}{2} \int \frac {\log ^2(1+x)}{x^4} \, dx-\int \frac {\log ^2(1+x)}{x^5} \, dx\\ &=-x-4 \log (x)-\frac {\log (1+x)}{6 x^3}-\frac {\log (1+x)}{4 x^2}+\frac {\log ^2(1+x)}{4 x^4}+\frac {\log ^2(1+x)}{2 x^3}+\frac {\log ^2(1+x)}{4 x^2}-\frac {1}{12} \operatorname {Subst}\left (\int \frac {-1+3 x}{(1-x)^3 x} \, dx,x,1+x\right )-\frac {1}{2} \int \frac {\log (1+x)}{x^4 (1+x)} \, dx-\frac {1}{2} \int \frac {\log (1+x)}{x^2 (1+x)} \, dx-\int \frac {\log (1+x)}{x^3 (1+x)} \, dx\\ &=-x-4 \log (x)-\frac {\log (1+x)}{6 x^3}-\frac {\log (1+x)}{4 x^2}+\frac {\log ^2(1+x)}{4 x^4}+\frac {\log ^2(1+x)}{2 x^3}+\frac {\log ^2(1+x)}{4 x^2}-\frac {1}{12} \operatorname {Subst}\left (\int \left (-\frac {2}{(-1+x)^3}-\frac {1}{(-1+x)^2}+\frac {1}{-1+x}-\frac {1}{x}\right ) \, dx,x,1+x\right )-\frac {1}{2} \int \left (\frac {\log (1+x)}{x^2}-\frac {\log (1+x)}{x}+\frac {\log (1+x)}{1+x}\right ) \, dx-\frac {1}{2} \int \left (\frac {\log (1+x)}{x^4}-\frac {\log (1+x)}{x^3}+\frac {\log (1+x)}{x^2}-\frac {\log (1+x)}{x}+\frac {\log (1+x)}{1+x}\right ) \, dx-\int \left (\frac {\log (1+x)}{-1-x}+\frac {\log (1+x)}{x^3}-\frac {\log (1+x)}{x^2}+\frac {\log (1+x)}{x}\right ) \, dx\\ &=-\frac {1}{12 x^2}-\frac {1}{12 x}-x-\frac {49 \log (x)}{12}+\frac {1}{12} \log (1+x)-\frac {\log (1+x)}{6 x^3}-\frac {\log (1+x)}{4 x^2}+\frac {\log ^2(1+x)}{4 x^4}+\frac {\log ^2(1+x)}{2 x^3}+\frac {\log ^2(1+x)}{4 x^2}-\frac {1}{2} \int \frac {\log (1+x)}{x^4} \, dx+\frac {1}{2} \int \frac {\log (1+x)}{x^3} \, dx-2 \left (\frac {1}{2} \int \frac {\log (1+x)}{x^2} \, dx\right )+2 \left (\frac {1}{2} \int \frac {\log (1+x)}{x} \, dx\right )-2 \left (\frac {1}{2} \int \frac {\log (1+x)}{1+x} \, dx\right )-\int \frac {\log (1+x)}{-1-x} \, dx-\int \frac {\log (1+x)}{x^3} \, dx+\int \frac {\log (1+x)}{x^2} \, dx-\int \frac {\log (1+x)}{x} \, dx\\ &=-\frac {1}{12 x^2}-\frac {1}{12 x}-x-\frac {49 \log (x)}{12}+\frac {1}{12} \log (1+x)-\frac {\log (1+x)}{x}+\frac {\log ^2(1+x)}{4 x^4}+\frac {\log ^2(1+x)}{2 x^3}+\frac {\log ^2(1+x)}{4 x^2}-\frac {1}{6} \int \frac {1}{x^3 (1+x)} \, dx+\frac {1}{4} \int \frac {1}{x^2 (1+x)} \, dx-\frac {1}{2} \int \frac {1}{x^2 (1+x)} \, dx-2 \left (-\frac {\log (1+x)}{2 x}+\frac {1}{2} \int \frac {1}{x (1+x)} \, dx\right )-2 \left (\frac {1}{2} \operatorname {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,1+x\right )\right )+\int \frac {1}{x (1+x)} \, dx+\operatorname {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,1+x\right )\\ &=-\frac {1}{12 x^2}-\frac {1}{12 x}-x-\frac {49 \log (x)}{12}+\frac {1}{12} \log (1+x)-\frac {\log (1+x)}{x}+\frac {\log ^2(1+x)}{4 x^4}+\frac {\log ^2(1+x)}{2 x^3}+\frac {\log ^2(1+x)}{4 x^2}-\frac {1}{6} \int \left (\frac {1}{-1-x}+\frac {1}{x^3}-\frac {1}{x^2}+\frac {1}{x}\right ) \, dx+\frac {1}{4} \int \left (\frac {1}{x^2}-\frac {1}{x}+\frac {1}{1+x}\right ) \, dx-2 \left (-\frac {\log (1+x)}{2 x}+\frac {1}{2} \int \frac {1}{x} \, dx-\frac {1}{2} \int \frac {1}{1+x} \, dx\right )-\frac {1}{2} \int \left (\frac {1}{x^2}-\frac {1}{x}+\frac {1}{1+x}\right ) \, dx+\int \frac {1}{x} \, dx-\int \frac {1}{1+x} \, dx\\ &=-x-3 \log (x)-\log (1+x)-\frac {\log (1+x)}{x}+\frac {\log ^2(1+x)}{4 x^4}+\frac {\log ^2(1+x)}{2 x^3}+\frac {\log ^2(1+x)}{4 x^2}-2 \left (\frac {\log (x)}{2}-\frac {1}{2} \log (1+x)-\frac {\log (1+x)}{2 x}\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 32, normalized size = 1.14 \begin {gather*} \frac {-4 x^5-16 x^4 \log (x)+(1+x)^2 \log ^2(1+x)}{4 x^4} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-4*x^5 - 16*x^4*Log[x] + (1 + x)^2*Log[1 + x]^2)/(4*x^4)

________________________________________________________________________________________

fricas [A]  time = 3.05, size = 34, normalized size = 1.21 \begin {gather*} -\frac {4 \, x^{5} + 16 \, x^{4} \log \relax (x) - {\left (x^{2} + 2 \, x + 1\right )} \log \left (x + 1\right )^{2}}{4 \, x^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/4*(4*x^5 + 16*x^4*log(x) - (x^2 + 2*x + 1)*log(x + 1)^2)/x^4

________________________________________________________________________________________

giac [A]  time = 0.22, size = 27, normalized size = 0.96 \begin {gather*} -x + \frac {{\left (x^{2} + 2 \, x + 1\right )} \log \left (x + 1\right )^{2}}{4 \, x^{4}} - 4 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.07, size = 28, normalized size = 1.00




method result size



risch \(\frac {\left (x^{2}+2 x +1\right ) \ln \left (x +1\right )^{2}}{4 x^{4}}-x -4 \ln \relax (x )\) \(28\)
norman \(\frac {-x^{5}+\frac {\ln \left (x +1\right )^{2}}{4}+\frac {\ln \left (x +1\right )^{2} x}{2}+\frac {\ln \left (x +1\right )^{2} x^{2}}{4}}{x^{4}}-4 \ln \relax (x )\) \(44\)
derivativedivides \(-4 \ln \relax (x )-\frac {1}{12 x}-\frac {1}{12 x^{2}}-\frac {\ln \left (x +1\right ) \left (x +1\right ) \left (\left (x +1\right )^{2}-3 x \right )}{6 x^{3}}+\frac {\ln \left (x +1\right ) \left (x +1\right ) \left (x -1\right )}{4 x^{2}}-x -1+\frac {\frac {x}{6}+\frac {1}{6}+\frac {\left (x +1\right )^{3}}{6}-\frac {\left (x +1\right )^{2}}{3}+\frac {2 \left (x +1\right )^{3} \ln \left (x +1\right )}{3}-\frac {\left (x +1\right )^{4} \ln \left (x +1\right )}{6}-\frac {\ln \left (x +1\right ) \left (x +1\right )^{2}}{2}+\frac {\ln \left (x +1\right )^{2} \left (x +1\right )^{2}}{2}}{2 x^{4}}\) \(126\)
default \(-4 \ln \relax (x )-\frac {1}{12 x}-\frac {1}{12 x^{2}}-\frac {\ln \left (x +1\right ) \left (x +1\right ) \left (\left (x +1\right )^{2}-3 x \right )}{6 x^{3}}+\frac {\ln \left (x +1\right ) \left (x +1\right ) \left (x -1\right )}{4 x^{2}}-x -1+\frac {\frac {x}{6}+\frac {1}{6}+\frac {\left (x +1\right )^{3}}{6}-\frac {\left (x +1\right )^{2}}{3}+\frac {2 \left (x +1\right )^{3} \ln \left (x +1\right )}{3}-\frac {\left (x +1\right )^{4} \ln \left (x +1\right )}{6}-\frac {\ln \left (x +1\right ) \left (x +1\right )^{2}}{2}+\frac {\ln \left (x +1\right )^{2} \left (x +1\right )^{2}}{2}}{2 x^{4}}\) \(126\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*(x^2+2*x+1)/x^4*ln(x+1)^2-x-4*ln(x)

________________________________________________________________________________________

maxima [B]  time = 0.42, size = 93, normalized size = 3.32 \begin {gather*} -x + \frac {2 \, x - 1}{12 \, x^{2}} - \frac {1}{4 \, x} - \frac {\log \left (x + 1\right )}{4 \, x^{2}} - \frac {\log \left (x + 1\right )}{6 \, x^{3}} + \frac {x^{3} + 3 \, {\left (x^{2} + 2 \, x + 1\right )} \log \left (x + 1\right )^{2} + x^{2} - {\left (x^{4} - 3 \, x^{2} - 2 \, x\right )} \log \left (x + 1\right )}{12 \, x^{4}} + \frac {1}{12} \, \log \left (x + 1\right ) - 4 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 9.36, size = 41, normalized size = 1.46 \begin {gather*} \frac {\frac {x^2\,{\ln \left (x+1\right )}^2}{4}+\frac {x\,{\ln \left (x+1\right )}^2}{2}+\frac {{\ln \left (x+1\right )}^2}{4}}{x^4}-4\,\ln \relax (x)-x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.17, size = 26, normalized size = 0.93 \begin {gather*} - x - 4 \log {\relax (x )} + \frac {\left (x^{2} + 2 x + 1\right ) \log {\left (x + 1 \right )}^{2}}{4 x^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________