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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.014721, antiderivative size = 36, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 10, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.3, Rules used = {2495, 30, 43} $\frac{x^2}{4}+\frac{1}{2} x^2 \log \left (\frac{x+1}{x^2}\right )+\frac{x}{2}-\frac{1}{2} \log (x+1)$

Antiderivative was successfully veriﬁed.

[In]

Int[x*Log[(1 + x)/x^2],x]

[Out]

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

Rule 2495

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

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

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

Rubi steps

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

Mathematica [A]  time = 0.0094705, size = 27, normalized size = 0.75 $\frac{1}{4} \left (x \left (2 x \log \left (\frac{x+1}{x^2}\right )+x+2\right )-2 \log (x+1)\right )$

Antiderivative was successfully veriﬁed.

[In]

Integrate[x*Log[(1 + x)/x^2],x]

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.014, size = 39, normalized size = 1.1 \begin{align*}{\frac{{x}^{2}}{2}\ln \left ({\frac{1+{x}^{-1}}{x}} \right ) }+{\frac{{x}^{2}}{4}}+{\frac{x}{2}}+{\frac{\ln \left ({x}^{-1} \right ) }{2}}-{\frac{\ln \left ( 1+{x}^{-1} \right ) }{2}} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.10115, size = 38, normalized size = 1.06 \begin{align*} \frac{1}{2} \, x^{2} \log \left (\frac{x + 1}{x^{2}}\right ) + \frac{1}{4} \, x^{2} + \frac{1}{2} \, x - \frac{1}{2} \, \log \left (x + 1\right ) \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.79942, size = 82, normalized size = 2.28 \begin{align*} \frac{1}{2} \, x^{2} \log \left (\frac{x + 1}{x^{2}}\right ) + \frac{1}{4} \, x^{2} + \frac{1}{2} \, x - \frac{1}{2} \, \log \left (x + 1\right ) \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.131197, size = 27, normalized size = 0.75 \begin{align*} \frac{x^{2} \log{\left (\frac{x + 1}{x^{2}} \right )}}{2} + \frac{x^{2}}{4} + \frac{x}{2} - \frac{\log{\left (x + 1 \right )}}{2} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.33758, size = 39, normalized size = 1.08 \begin{align*} \frac{1}{2} \, x^{2} \log \left (\frac{x + 1}{x^{2}}\right ) + \frac{1}{4} \, x^{2} + \frac{1}{2} \, x - \frac{1}{2} \, \log \left ({\left | x + 1 \right |}\right ) \end{align*}

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

[In]

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

[Out]

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