3.45.49 \(\int \frac {-4 x+(4-2 e^2) \log (x)}{x} \, dx\)

Optimal. Leaf size=16 \[ 4-4 x-\left (-2+e^2\right ) \log ^2(x) \]

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {14, 2301} \begin {gather*} \left (2-e^2\right ) \log ^2(x)-4 x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-4-\frac {2 \left (-2+e^2\right ) \log (x)}{x}\right ) \, dx\\ &=-4 x+\left (2 \left (2-e^2\right )\right ) \int \frac {\log (x)}{x} \, dx\\ &=-4 x+\left (2-e^2\right ) \log ^2(x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 19, normalized size = 1.19 \begin {gather*} -4 x+2 \log ^2(x)-e^2 \log ^2(x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-4*x + 2*Log[x]^2 - E^2*Log[x]^2

________________________________________________________________________________________

fricas [A]  time = 0.50, size = 14, normalized size = 0.88 \begin {gather*} -{\left (e^{2} - 2\right )} \log \relax (x)^{2} - 4 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*exp(2)+4)*log(x)-4*x)/x,x, algorithm="fricas")

[Out]

-(e^2 - 2)*log(x)^2 - 4*x

________________________________________________________________________________________

giac [A]  time = 0.22, size = 18, normalized size = 1.12 \begin {gather*} -e^{2} \log \relax (x)^{2} + 2 \, \log \relax (x)^{2} - 4 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*exp(2)+4)*log(x)-4*x)/x,x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.03, size = 16, normalized size = 1.00




method result size



norman \(\left (2-{\mathrm e}^{2}\right ) \ln \relax (x )^{2}-4 x\) \(16\)
default \(-{\mathrm e}^{2} \ln \relax (x )^{2}+2 \ln \relax (x )^{2}-4 x\) \(19\)
risch \(-{\mathrm e}^{2} \ln \relax (x )^{2}+2 \ln \relax (x )^{2}-4 x\) \(19\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-2*exp(2)+4)*ln(x)-4*x)/x,x,method=_RETURNVERBOSE)

[Out]

(2-exp(2))*ln(x)^2-4*x

________________________________________________________________________________________

maxima [A]  time = 0.35, size = 18, normalized size = 1.12 \begin {gather*} -e^{2} \log \relax (x)^{2} + 2 \, \log \relax (x)^{2} - 4 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*exp(2)+4)*log(x)-4*x)/x,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 3.14, size = 14, normalized size = 0.88 \begin {gather*} \left (2-{\mathrm {e}}^2\right )\,{\ln \relax (x)}^2-4\,x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(4*x + log(x)*(2*exp(2) - 4))/x,x)

[Out]

- 4*x - log(x)^2*(exp(2) - 2)

________________________________________________________________________________________

sympy [A]  time = 0.13, size = 12, normalized size = 0.75 \begin {gather*} - 4 x + \left (2 - e^{2}\right ) \log {\relax (x )}^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*exp(2)+4)*ln(x)-4*x)/x,x)

[Out]

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

________________________________________________________________________________________