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

Optimal. Leaf size=23 \[ x+\log (3)-\log (x)+\log \left (-4+x^2\right )-\log \left (\log \left (\frac {x}{3}\right )\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.32, antiderivative size = 25, normalized size of antiderivative = 1.09, number of steps used = 7, number of rules used = 5, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.116, Rules used = {1593, 6725, 1802, 2302, 29} \begin {gather*} x+\log (2-x)-\log (x)+\log (x+2)-\log \left (\log \left (\frac {x}{3}\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x + Log[2 - x] - Log[x] + Log[2 + x] - Log[Log[x/3]]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

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 1802

Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*Pq*(a + b*x
^2)^p, x], x] /; FreeQ[{a, b, c, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 2302

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

Rule 6725

Int[(u_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> With[{v = RationalFunctionExpand[u/(a + b*x^n), x]}, Int[v, x]
 /; SumQ[v]] /; FreeQ[{a, b}, x] && IGtQ[n, 0]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 23, normalized size = 1.00 \begin {gather*} x-\log (x)+\log \left (4-x^2\right )-\log \left (\log \left (\frac {x}{3}\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x - Log[x] + Log[4 - x^2] - Log[Log[x/3]]

________________________________________________________________________________________

fricas [A]  time = 0.60, size = 19, normalized size = 0.83 \begin {gather*} x + \log \left (x^{2} - 4\right ) - \log \relax (x) - \log \left (\log \left (\frac {1}{3} \, x\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.22, size = 19, normalized size = 0.83 \begin {gather*} x + \log \left (x^{2} - 4\right ) - \log \relax (x) - \log \left (\log \left (\frac {1}{3} \, x\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.19, size = 20, normalized size = 0.87




method result size



risch \(x -\ln \relax (x )+\ln \left (x^{2}-4\right )-\ln \left (\ln \left (\frac {x}{3}\right )\right )\) \(20\)
derivativedivides \(x +\ln \left (2+x \right )-\ln \left (\frac {x}{3}\right )+\ln \left (x -2\right )-\ln \left (\ln \left (\frac {x}{3}\right )\right )\) \(24\)
default \(x +\ln \left (2+x \right )-\ln \left (\frac {x}{3}\right )+\ln \left (x -2\right )-\ln \left (\ln \left (\frac {x}{3}\right )\right )\) \(24\)
norman \(x +\ln \left (2+x \right )-\ln \left (\frac {x}{3}\right )+\ln \left (x -2\right )-\ln \left (\ln \left (\frac {x}{3}\right )\right )\) \(24\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.53, size = 24, normalized size = 1.04 \begin {gather*} x + \log \left (x + 2\right ) + \log \left (x - 2\right ) - \log \relax (x) - \log \left (-\log \relax (3) + \log \relax (x)\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + log(x + 2) + log(x - 2) - log(x) - log(-log(3) + log(x))

________________________________________________________________________________________

mupad [B]  time = 3.54, size = 21, normalized size = 0.91 \begin {gather*} x+\ln \left (x+2\right )+\ln \left (\frac {x-2}{x}\right )-\ln \left (\ln \left (\frac {x}{3}\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + log(x + 2) + log((x - 2)/x) - log(log(x/3))

________________________________________________________________________________________

sympy [A]  time = 0.14, size = 17, normalized size = 0.74 \begin {gather*} x - \log {\relax (x )} + \log {\left (x^{2} - 4 \right )} - \log {\left (\log {\left (\frac {x}{3} \right )} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________