3.97.27 \(\int \frac {54-27 x-9 x^2+3 x^3+x^4}{-27 x+3 x^3} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 23, normalized size of antiderivative = 0.85, number of steps used = 3, number of rules used = 2, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {1593, 1802} \begin {gather*} \frac {x^2}{6}+x+\log (3-x)-2 \log (x)+\log (x+3) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(54 - 27*x - 9*x^2 + 3*x^3 + x^4)/(-27*x + 3*x^3),x]

[Out]

x + x^2/6 + Log[3 - x] - 2*Log[x] + Log[3 + 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]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 21, normalized size = 0.78 \begin {gather*} x+\frac {x^2}{6}-2 \log (x)+\log \left (9-x^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(54 - 27*x - 9*x^2 + 3*x^3 + x^4)/(-27*x + 3*x^3),x]

[Out]

x + x^2/6 - 2*Log[x] + Log[9 - x^2]

________________________________________________________________________________________

fricas [A]  time = 0.55, size = 17, normalized size = 0.63 \begin {gather*} \frac {1}{6} \, x^{2} + x + \log \left (x^{2} - 9\right ) - 2 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^4+3*x^3-9*x^2-27*x+54)/(3*x^3-27*x),x, algorithm="fricas")

[Out]

1/6*x^2 + x + log(x^2 - 9) - 2*log(x)

________________________________________________________________________________________

giac [A]  time = 0.18, size = 22, normalized size = 0.81 \begin {gather*} \frac {1}{6} \, x^{2} + x + \log \left ({\left | x + 3 \right |}\right ) + \log \left ({\left | x - 3 \right |}\right ) - 2 \, \log \left ({\left | x \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^4+3*x^3-9*x^2-27*x+54)/(3*x^3-27*x),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.10, size = 18, normalized size = 0.67




method result size



risch \(x +\frac {x^{2}}{6}-2 \ln \relax (x )+\ln \left (x^{2}-9\right )\) \(18\)
default \(x +\frac {x^{2}}{6}-2 \ln \relax (x )+\ln \left (x -3\right )+\ln \left (3+x \right )\) \(20\)
norman \(x +\frac {x^{2}}{6}-2 \ln \relax (x )+\ln \left (x -3\right )+\ln \left (3+x \right )\) \(20\)
meijerg \(-2 \ln \relax (x )+2 \ln \relax (3)-i \pi +\ln \left (1-\frac {x^{2}}{9}\right )+\frac {x^{2}}{6}-\frac {3 i \left (\frac {2 i x}{3}-2 i \arctanh \left (\frac {x}{3}\right )\right )}{2}+3 \arctanh \left (\frac {x}{3}\right )\) \(48\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^4+3*x^3-9*x^2-27*x+54)/(3*x^3-27*x),x,method=_RETURNVERBOSE)

[Out]

x+1/6*x^2-2*ln(x)+ln(x^2-9)

________________________________________________________________________________________

maxima [A]  time = 0.36, size = 19, normalized size = 0.70 \begin {gather*} \frac {1}{6} \, x^{2} + x + \log \left (x + 3\right ) + \log \left (x - 3\right ) - 2 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^4+3*x^3-9*x^2-27*x+54)/(3*x^3-27*x),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 5.46, size = 17, normalized size = 0.63 \begin {gather*} x+\ln \left (x^2-9\right )-2\,\ln \relax (x)+\frac {x^2}{6} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(3*x^3 - 9*x^2 - 27*x + x^4 + 54)/(27*x - 3*x^3),x)

[Out]

x + log(x^2 - 9) - 2*log(x) + x^2/6

________________________________________________________________________________________

sympy [A]  time = 0.09, size = 17, normalized size = 0.63 \begin {gather*} \frac {x^{2}}{6} + x - 2 \log {\relax (x )} + \log {\left (x^{2} - 9 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x**4+3*x**3-9*x**2-27*x+54)/(3*x**3-27*x),x)

[Out]

x**2/6 + x - 2*log(x) + log(x**2 - 9)

________________________________________________________________________________________