3.79 \(\int (\frac{1}{x}+x) \log (x) \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0449937, antiderivative size = 25, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.625, Rules used = {1593, 14, 2351, 2301, 2304} \[ -\frac{x^2}{4}+\frac{1}{2} x^2 \log (x)+\frac{\log ^2(x)}{2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

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 2351

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

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 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rubi steps

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

Mathematica [A]  time = 0.0017662, size = 25, normalized size = 1. \[ -\frac{x^2}{4}+\frac{1}{2} x^2 \log (x)+\frac{\log ^2(x)}{2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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