3.28.53 \(\int \frac {-21+63 x-63 x^2+19 x^3+(2-6 x+6 x^2-2 x^3) \log (9)}{-x^3+3 x^4-3 x^5+x^6} \, dx\) [2753]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 19, normalized size of antiderivative = 0.90, number of steps used = 2, number of rules used = 1, integrand size = 55, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.018, Rules used = {2099} \begin {gather*} \frac {1}{(x-1)^2}-\frac {21-\log (81)}{2 x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-21 + 63*x - 63*x^2 + 19*x^3 + (2 - 6*x + 6*x^2 - 2*x^3)*Log[9])/(-x^3 + 3*x^4 - 3*x^5 + x^6),x]

[Out]

(-1 + x)^(-2) - (21 - Log[81])/(2*x^2)

Rule 2099

Int[(P_)^(p_)*(Q_)^(q_.), x_Symbol] :> With[{PP = Factor[P]}, Int[ExpandIntegrand[PP^p*Q^q, x], x] /;  !SumQ[N
onfreeFactors[PP, x]]] /; FreeQ[q, x] && PolyQ[P, x] && PolyQ[Q, x] && IntegerQ[p] && NeQ[P, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 31, normalized size = 1.48 \begin {gather*} \frac {-21+x^2 (-19+\log (81))+\log (81)-x (-42+\log (6561))}{2 (-1+x)^2 x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-21 + 63*x - 63*x^2 + 19*x^3 + (2 - 6*x + 6*x^2 - 2*x^3)*Log[9])/(-x^3 + 3*x^4 - 3*x^5 + x^6),x]

[Out]

(-21 + x^2*(-19 + Log[81]) + Log[81] - x*(-42 + Log[6561]))/(2*(-1 + x)^2*x^2)

________________________________________________________________________________________

Maple [A]
time = 0.07, size = 18, normalized size = 0.86

method result size
default \(-\frac {-4 \ln \left (3\right )+21}{2 x^{2}}+\frac {1}{\left (x -1\right )^{2}}\) \(18\)
norman \(\frac {\left (-4 \ln \left (3\right )+21\right ) x +\left (2 \ln \left (3\right )-\frac {19}{2}\right ) x^{2}-\frac {21}{2}+2 \ln \left (3\right )}{x^{2} \left (x -1\right )^{2}}\) \(34\)
risch \(\frac {\left (-4 \ln \left (3\right )+21\right ) x +\left (2 \ln \left (3\right )-\frac {19}{2}\right ) x^{2}-\frac {21}{2}+2 \ln \left (3\right )}{x^{2} \left (x^{2}-2 x +1\right )}\) \(39\)
gosper \(\frac {4 x^{2} \ln \left (3\right )-8 x \ln \left (3\right )-19 x^{2}+4 \ln \left (3\right )+42 x -21}{2 x^{2} \left (x^{2}-2 x +1\right )}\) \(42\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*(-2*x^3+6*x^2-6*x+2)*ln(3)+19*x^3-63*x^2+63*x-21)/(x^6-3*x^5+3*x^4-x^3),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 41, normalized size = 1.95 \begin {gather*} \frac {x^{2} {\left (4 \, \log \left (3\right ) - 19\right )} - 2 \, x {\left (4 \, \log \left (3\right ) - 21\right )} + 4 \, \log \left (3\right ) - 21}{2 \, {\left (x^{4} - 2 \, x^{3} + x^{2}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*(-2*x^3+6*x^2-6*x+2)*log(3)+19*x^3-63*x^2+63*x-21)/(x^6-3*x^5+3*x^4-x^3),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 38, normalized size = 1.81 \begin {gather*} -\frac {19 \, x^{2} - 4 \, {\left (x^{2} - 2 \, x + 1\right )} \log \left (3\right ) - 42 \, x + 21}{2 \, {\left (x^{4} - 2 \, x^{3} + x^{2}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*(-2*x^3+6*x^2-6*x+2)*log(3)+19*x^3-63*x^2+63*x-21)/(x^6-3*x^5+3*x^4-x^3),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 39 vs. \(2 (19) = 38\).
time = 0.39, size = 39, normalized size = 1.86 \begin {gather*} \frac {x^{2} \left (-19 + 4 \log {\left (3 \right )}\right ) + x \left (42 - 8 \log {\left (3 \right )}\right ) - 21 + 4 \log {\left (3 \right )}}{2 x^{4} - 4 x^{3} + 2 x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*(-2*x**3+6*x**2-6*x+2)*ln(3)+19*x**3-63*x**2+63*x-21)/(x**6-3*x**5+3*x**4-x**3),x)

[Out]

(x**2*(-19 + 4*log(3)) + x*(42 - 8*log(3)) - 21 + 4*log(3))/(2*x**4 - 4*x**3 + 2*x**2)

________________________________________________________________________________________

Giac [A]
time = 0.41, size = 37, normalized size = 1.76 \begin {gather*} \frac {4 \, x^{2} \log \left (3\right ) - 19 \, x^{2} - 8 \, x \log \left (3\right ) + 42 \, x + 4 \, \log \left (3\right ) - 21}{2 \, {\left (x^{2} - x\right )}^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*(-2*x^3+6*x^2-6*x+2)*log(3)+19*x^3-63*x^2+63*x-21)/(x^6-3*x^5+3*x^4-x^3),x, algorithm="giac")

[Out]

1/2*(4*x^2*log(3) - 19*x^2 - 8*x*log(3) + 42*x + 4*log(3) - 21)/(x^2 - x)^2

________________________________________________________________________________________

Mupad [B]
time = 1.81, size = 101, normalized size = 4.81 \begin {gather*} \mathrm {atanh}\left (\frac {2\,\left (2\,x-1\right )\,\left (24\,\ln \left (3\right )-6\,\ln \left (81\right )\right )}{48\,\ln \left (3\right )-12\,\ln \left (81\right )}\right )\,\left (48\,\ln \left (3\right )-12\,\ln \left (81\right )\right )-\frac {\left (24\,\ln \left (3\right )-6\,\ln \left (81\right )\right )\,x^3+\left (\frac {17\,\ln \left (81\right )}{2}-36\,\ln \left (3\right )+\frac {19}{2}\right )\,x^2+\left (12\,\ln \left (3\right )-2\,\ln \left (81\right )-21\right )\,x-\frac {\ln \left (81\right )}{2}+\frac {21}{2}}{x^4-2\,x^3+x^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*log(3)*(6*x - 6*x^2 + 2*x^3 - 2) - 63*x + 63*x^2 - 19*x^3 + 21)/(x^3 - 3*x^4 + 3*x^5 - x^6),x)

[Out]

atanh((2*(2*x - 1)*(24*log(3) - 6*log(81)))/(48*log(3) - 12*log(81)))*(48*log(3) - 12*log(81)) - (x^3*(24*log(
3) - 6*log(81)) - log(81)/2 + x^2*((17*log(81))/2 - 36*log(3) + 19/2) - x*(2*log(81) - 12*log(3) + 21) + 21/2)
/(x^2 - 2*x^3 + x^4)

________________________________________________________________________________________