### 3.333 $$\int \frac{\log (1+x)}{x^2} \, dx$$

Optimal. Leaf size=18 $\log (x)-\frac{\log (x+1)}{x}-\log (x+1)$

[Out]

Log[x] - Log[1 + x] - Log[1 + x]/x

________________________________________________________________________________________

Rubi [A]  time = 0.0083889, antiderivative size = 18, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 8, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.5, Rules used = {2395, 36, 29, 31} $\log (x)-\frac{\log (x+1)}{x}-\log (x+1)$

Antiderivative was successfully veriﬁed.

[In]

Int[Log[1 + x]/x^2,x]

[Out]

Log[x] - Log[1 + x] - Log[1 + x]/x

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

Rubi steps

\begin{align*} \int \frac{\log (1+x)}{x^2} \, dx &=-\frac{\log (1+x)}{x}+\int \frac{1}{x (1+x)} \, dx\\ &=-\frac{\log (1+x)}{x}+\int \frac{1}{x} \, dx-\int \frac{1}{1+x} \, dx\\ &=\log (x)-\log (1+x)-\frac{\log (1+x)}{x}\\ \end{align*}

Mathematica [A]  time = 0.0033289, size = 18, normalized size = 1. $\log (x)-\frac{\log (x+1)}{x}-\log (x+1)$

Antiderivative was successfully veriﬁed.

[In]

Integrate[Log[1 + x]/x^2,x]

[Out]

Log[x] - Log[1 + x] - Log[1 + x]/x

________________________________________________________________________________________

Maple [A]  time = 0.006, size = 16, normalized size = 0.9 \begin{align*} \ln \left ( x \right ) -{\frac{ \left ( 1+x \right ) \ln \left ( 1+x \right ) }{x}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int(ln(1+x)/x^2,x)

[Out]

ln(x)-ln(1+x)*(1+x)/x

________________________________________________________________________________________

Maxima [A]  time = 0.923736, size = 24, normalized size = 1.33 \begin{align*} -\frac{\log \left (x + 1\right )}{x} - \log \left (x + 1\right ) + \log \left (x\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(1+x)/x^2,x, algorithm="maxima")

[Out]

-log(x + 1)/x - log(x + 1) + log(x)

________________________________________________________________________________________

Fricas [A]  time = 1.81763, size = 49, normalized size = 2.72 \begin{align*} -\frac{{\left (x + 1\right )} \log \left (x + 1\right ) - x \log \left (x\right )}{x} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(1+x)/x^2,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.120995, size = 14, normalized size = 0.78 \begin{align*} \log{\left (x \right )} - \log{\left (x + 1 \right )} - \frac{\log{\left (x + 1 \right )}}{x} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln(1+x)/x**2,x)

[Out]

log(x) - log(x + 1) - log(x + 1)/x

________________________________________________________________________________________

Giac [A]  time = 1.0526, size = 27, normalized size = 1.5 \begin{align*} -\frac{\log \left (x + 1\right )}{x} - \log \left ({\left | x + 1 \right |}\right ) + \log \left ({\left | x \right |}\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(1+x)/x^2,x, algorithm="giac")

[Out]

-log(x + 1)/x - log(abs(x + 1)) + log(abs(x))