3.1.26 \(\int (2 \log (x)+\log ^2(x)) \, dx\) [26]

Optimal. Leaf size=6 \[ x \log ^2(x) \]

[Out]

x*ln(x)^2

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 6, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 2, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2332, 2333} \begin {gather*} x \log ^2(x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[2*Log[x] + Log[x]^2,x]

[Out]

x*Log[x]^2

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2333

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rubi steps

\begin {gather*} \begin {aligned} \text {Integral} &=2 \int \log (x) \, dx+\int \log ^2(x) \, dx\\ &=-2 x+2 x \log (x)+x \log ^2(x)-2 \int \log (x) \, dx\\ &=x \log ^2(x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 6, normalized size = 1.00 \begin {gather*} x \log ^2(x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[2*Log[x] + Log[x]^2,x]

[Out]

x*Log[x]^2

________________________________________________________________________________________

Maple [A]
time = 0.01, size = 7, normalized size = 1.17

method result size
default \(x \ln \left (x \right )^{2}\) \(7\)
norman \(x \ln \left (x \right )^{2}\) \(7\)
risch \(x \ln \left (x \right )^{2}\) \(7\)
parallelrisch \(x \ln \left (x \right )^{2}\) \(7\)
parts \(x \ln \left (x \right )^{2}\) \(7\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(2*ln(x)+ln(x)^2,x,method=_RETURNVERBOSE)

[Out]

x*ln(x)^2

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 21 vs. \(2 (6) = 12\).
time = 0.39, size = 21, normalized size = 3.50 \begin {gather*} {\left (\log \left (x\right )^{2} - 2 \, \log \left (x\right ) + 2\right )} x + 2 \, x \log \left (x\right ) - 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(log(x)^2 - 2*log(x) + 2)*x + 2*x*log(x) - 2*x

________________________________________________________________________________________

Fricas [A]
time = 0.57, size = 6, normalized size = 1.00 \begin {gather*} x \log \left (x\right )^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x*log(x)^2

________________________________________________________________________________________

Sympy [A]
time = 0.03, size = 5, normalized size = 0.83 \begin {gather*} x \log {\left (x \right )}^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x*log(x)**2

________________________________________________________________________________________

Giac [A]
time = 0.50, size = 6, normalized size = 1.00 \begin {gather*} x \log \left (x\right )^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x*log(x)^2

________________________________________________________________________________________

Mupad [B]
time = 0.05, size = 6, normalized size = 1.00 \begin {gather*} x\,{\ln \left (x\right )}^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(2*log(x) + log(x)^2,x)

[Out]

x*log(x)^2

________________________________________________________________________________________

Chatgpt [F] Failed to verify
time = 1.00, size = 16, normalized size = 2.67 \begin {gather*} \ln \left (x \right ) \left (2 \ln \left (x \right )+x \right )-2 x \ln \left (x \right )+x \end {gather*}

Warning: Unable to verify antiderivative.

[In]

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

[Out]

ln(x)*(2*ln(x)+x)-2*x*ln(x)+x

________________________________________________________________________________________