3.2.42 \(\int \frac {(2-\log (x)) (3+\log (x))^2}{x} \, dx\) [142]

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

[Out]

5/3*(3+ln(x))^3-1/4*(3+ln(x))^4

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {2412, 45} \begin {gather*} \frac {5}{3} (\log (x)+3)^3-\frac {1}{4} (\log (x)+3)^4 \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 45

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

Rule 2412

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.) + Log[(c_.)*(x_)^(n_.)]*(e_.))^(q_.))/(x_), x_Symbol]
:> Dist[1/n, Subst[Int[(a + b*x)^p*(d + e*x)^q, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, d, e, n, p, q}, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 29, normalized size = 1.38 \begin {gather*} 18 \log (x)+\frac {3 \log ^2(x)}{2}-\frac {4 \log ^3(x)}{3}-\frac {\log ^4(x)}{4} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.01, size = 24, normalized size = 1.14

method result size
derivativedivides \(-\frac {\ln \left (x \right )^{4}}{4}-\frac {4 \ln \left (x \right )^{3}}{3}+\frac {3 \ln \left (x \right )^{2}}{2}+18 \ln \left (x \right )\) \(24\)
default \(-\frac {\ln \left (x \right )^{4}}{4}-\frac {4 \ln \left (x \right )^{3}}{3}+\frac {3 \ln \left (x \right )^{2}}{2}+18 \ln \left (x \right )\) \(24\)
norman \(-\frac {\ln \left (x \right )^{4}}{4}-\frac {4 \ln \left (x \right )^{3}}{3}+\frac {3 \ln \left (x \right )^{2}}{2}+18 \ln \left (x \right )\) \(24\)
risch \(-\frac {\ln \left (x \right )^{4}}{4}-\frac {4 \ln \left (x \right )^{3}}{3}+\frac {3 \ln \left (x \right )^{2}}{2}+18 \ln \left (x \right )\) \(24\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 23, normalized size = 1.10 \begin {gather*} -\frac {1}{4} \, \log \left (x\right )^{4} - \frac {4}{3} \, \log \left (x\right )^{3} + \frac {3}{2} \, \log \left (x\right )^{2} + 18 \, \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 23, normalized size = 1.10 \begin {gather*} -\frac {1}{4} \, \log \left (x\right )^{4} - \frac {4}{3} \, \log \left (x\right )^{3} + \frac {3}{2} \, \log \left (x\right )^{2} + 18 \, \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.12, size = 27, normalized size = 1.29 \begin {gather*} - \frac {\log {\left (x \right )}^{4}}{4} - \frac {4 \log {\left (x \right )}^{3}}{3} + \frac {3 \log {\left (x \right )}^{2}}{2} + 18 \log {\left (x \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2-ln(x))*(3+ln(x))**2/x,x)

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 6.12, size = 23, normalized size = 1.10 \begin {gather*} -\frac {1}{4} \, \log \left (x\right )^{4} - \frac {4}{3} \, \log \left (x\right )^{3} + \frac {3}{2} \, \log \left (x\right )^{2} + 18 \, \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.37, size = 22, normalized size = 1.05 \begin {gather*} \frac {\ln \left (x\right )\,\left (-3\,{\ln \left (x\right )}^3-16\,{\ln \left (x\right )}^2+18\,\ln \left (x\right )+216\right )}{12} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-((log(x) - 2)*(log(x) + 3)^2)/x,x)

[Out]

(log(x)*(18*log(x) - 16*log(x)^2 - 3*log(x)^3 + 216))/12

________________________________________________________________________________________