3.2.3 \(\int \frac {-2+5 x^3}{-27+18 x^2-8 x^3+x^4} \, dx\) [103]

Optimal. Leaf size=41 \[ -\frac {133}{8 (3-x)^2}+\frac {407}{16 (3-x)}+\frac {313}{64} \log (3-x)+\frac {7}{64} \log (1+x) \]

[Out]

-133/8/(3-x)^2+407/16/(3-x)+313/64*ln(3-x)+7/64*ln(1+x)

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 41, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.040, Rules used = {2099} \begin {gather*} \frac {407}{16 (3-x)}-\frac {133}{8 (3-x)^2}+\frac {313}{64} \log (3-x)+\frac {7}{64} \log (x+1) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-2 + 5*x^3)/(-27 + 18*x^2 - 8*x^3 + x^4),x]

[Out]

-133/(8*(3 - x)^2) + 407/(16*(3 - x)) + (313*Log[3 - x])/64 + (7*Log[1 + x])/64

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 {align*} \int \frac {-2+5 x^3}{-27+18 x^2-8 x^3+x^4} \, dx &=\int \left (\frac {133}{4 (-3+x)^3}+\frac {407}{16 (-3+x)^2}+\frac {313}{64 (-3+x)}+\frac {7}{64 (1+x)}\right ) \, dx\\ &=-\frac {133}{8 (3-x)^2}+\frac {407}{16 (3-x)}+\frac {313}{64} \log (3-x)+\frac {7}{64} \log (1+x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 37, normalized size = 0.90 \begin {gather*} -\frac {133}{8 (-3+x)^2}-\frac {407}{16 (-3+x)}+\frac {313}{64} \log (3-x)+\frac {7}{64} \log (1+x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-2 + 5*x^3)/(-27 + 18*x^2 - 8*x^3 + x^4),x]

[Out]

-133/(8*(-3 + x)^2) - 407/(16*(-3 + x)) + (313*Log[3 - x])/64 + (7*Log[1 + x])/64

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 28, normalized size = 0.68

method result size
norman \(\frac {-\frac {407 x}{16}+\frac {955}{16}}{\left (-3+x \right )^{2}}+\frac {313 \ln \left (-3+x \right )}{64}+\frac {7 \ln \left (1+x \right )}{64}\) \(25\)
default \(-\frac {133}{8 \left (-3+x \right )^{2}}-\frac {407}{16 \left (-3+x \right )}+\frac {313 \ln \left (-3+x \right )}{64}+\frac {7 \ln \left (1+x \right )}{64}\) \(28\)
risch \(\frac {-\frac {407 x}{16}+\frac {955}{16}}{x^{2}-6 x +9}+\frac {313 \ln \left (-3+x \right )}{64}+\frac {7 \ln \left (1+x \right )}{64}\) \(30\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((5*x^3-2)/(x^4-8*x^3+18*x^2-27),x,method=_RETURNVERBOSE)

[Out]

-133/8/(-3+x)^2-407/16/(-3+x)+313/64*ln(-3+x)+7/64*ln(1+x)

________________________________________________________________________________________

Maxima [A]
time = 5.26, size = 30, normalized size = 0.73 \begin {gather*} -\frac {407 \, x - 955}{16 \, {\left (x^{2} - 6 \, x + 9\right )}} + \frac {7}{64} \, \log \left (x + 1\right ) + \frac {313}{64} \, \log \left (x - 3\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^3-2)/(x^4-8*x^3+18*x^2-27),x, algorithm="maxima")

[Out]

-1/16*(407*x - 955)/(x^2 - 6*x + 9) + 7/64*log(x + 1) + 313/64*log(x - 3)

________________________________________________________________________________________

Fricas [A]
time = 0.67, size = 45, normalized size = 1.10 \begin {gather*} \frac {7 \, {\left (x^{2} - 6 \, x + 9\right )} \log \left (x + 1\right ) + 313 \, {\left (x^{2} - 6 \, x + 9\right )} \log \left (x - 3\right ) - 1628 \, x + 3820}{64 \, {\left (x^{2} - 6 \, x + 9\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^3-2)/(x^4-8*x^3+18*x^2-27),x, algorithm="fricas")

[Out]

1/64*(7*(x^2 - 6*x + 9)*log(x + 1) + 313*(x^2 - 6*x + 9)*log(x - 3) - 1628*x + 3820)/(x^2 - 6*x + 9)

________________________________________________________________________________________

Sympy [A]
time = 0.05, size = 31, normalized size = 0.76 \begin {gather*} \frac {955 - 407 x}{16 x^{2} - 96 x + 144} + \frac {313 \log {\left (x - 3 \right )}}{64} + \frac {7 \log {\left (x + 1 \right )}}{64} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x**3-2)/(x**4-8*x**3+18*x**2-27),x)

[Out]

(955 - 407*x)/(16*x**2 - 96*x + 144) + 313*log(x - 3)/64 + 7*log(x + 1)/64

________________________________________________________________________________________

Giac [A]
time = 0.54, size = 27, normalized size = 0.66 \begin {gather*} -\frac {407 \, x - 955}{16 \, {\left (x - 3\right )}^{2}} + \frac {7}{64} \, \log \left ({\left | x + 1 \right |}\right ) + \frac {313}{64} \, \log \left ({\left | x - 3 \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^3-2)/(x^4-8*x^3+18*x^2-27),x, algorithm="giac")

[Out]

-1/16*(407*x - 955)/(x - 3)^2 + 7/64*log(abs(x + 1)) + 313/64*log(abs(x - 3))

________________________________________________________________________________________

Mupad [B]
time = 0.06, size = 30, normalized size = 0.73 \begin {gather*} \frac {7\,\ln \left (x+1\right )}{64}+\frac {313\,\ln \left (x-3\right )}{64}-\frac {\frac {407\,x}{16}-\frac {955}{16}}{x^2-6\,x+9} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((5*x^3 - 2)/(18*x^2 - 8*x^3 + x^4 - 27),x)

[Out]

(7*log(x + 1))/64 + (313*log(x - 3))/64 - ((407*x)/16 - 955/16)/(x^2 - 6*x + 9)

________________________________________________________________________________________