\(\int (17+2 x-2 \log (x)-\log ^2(x)) \, dx\) [6016]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 15, antiderivative size = 23 \[ \int \left (17+2 x-2 \log (x)-\log ^2(x)\right ) \, dx=-4+11 x+(3+x)^2+\frac {3}{\log (2)}-x \log ^2(x) \]

[Out]

3/ln(2)+11*x+(3+x)^2-x*ln(x)^2-4

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.61, number of steps used = 4, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {2332, 2333} \[ \int \left (17+2 x-2 \log (x)-\log ^2(x)\right ) \, dx=x^2+17 x-x \log ^2(x) \]

[In]

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

[Out]

17*x + x^2 - 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{align*} \text {integral}& = 17 x+x^2-2 \int \log (x) \, dx-\int \log ^2(x) \, dx \\ & = 19 x+x^2-2 x \log (x)-x \log ^2(x)+2 \int \log (x) \, dx \\ & = 17 x+x^2-x \log ^2(x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.61 \[ \int \left (17+2 x-2 \log (x)-\log ^2(x)\right ) \, dx=17 x+x^2-x \log ^2(x) \]

[In]

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

[Out]

17*x + x^2 - x*Log[x]^2

Maple [A] (verified)

Time = 0.06 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.65

method result size
default \(x^{2}+17 x -x \ln \left (x \right )^{2}\) \(15\)
norman \(x^{2}+17 x -x \ln \left (x \right )^{2}\) \(15\)
risch \(x^{2}+17 x -x \ln \left (x \right )^{2}\) \(15\)
parallelrisch \(x^{2}+17 x -x \ln \left (x \right )^{2}\) \(15\)
parts \(x^{2}+17 x -x \ln \left (x \right )^{2}\) \(15\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.61 \[ \int \left (17+2 x-2 \log (x)-\log ^2(x)\right ) \, dx=-x \log \left (x\right )^{2} + x^{2} + 17 \, x \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.52 \[ \int \left (17+2 x-2 \log (x)-\log ^2(x)\right ) \, dx=x^{2} - x \log {\left (x \right )}^{2} + 17 x \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.09 \[ \int \left (17+2 x-2 \log (x)-\log ^2(x)\right ) \, dx=-{\left (\log \left (x\right )^{2} - 2 \, \log \left (x\right ) + 2\right )} x + x^{2} - 2 \, x \log \left (x\right ) + 19 \, x \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.61 \[ \int \left (17+2 x-2 \log (x)-\log ^2(x)\right ) \, dx=-x \log \left (x\right )^{2} + x^{2} + 17 \, x \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 11.40 (sec) , antiderivative size = 11, normalized size of antiderivative = 0.48 \[ \int \left (17+2 x-2 \log (x)-\log ^2(x)\right ) \, dx=x\,\left (-{\ln \left (x\right )}^2+x+17\right ) \]

[In]

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

[Out]

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