\(\int \frac {-x+x^3}{6+2 x} \, dx\) [427]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 15, antiderivative size = 24 \[ \int \frac {-x+x^3}{6+2 x} \, dx=4 x-\frac {3 x^2}{4}+\frac {x^3}{6}-12 \log (3+x) \]

[Out]

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

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {1607, 786} \[ \int \frac {-x+x^3}{6+2 x} \, dx=\frac {x^3}{6}-\frac {3 x^2}{4}+4 x-12 \log (x+3) \]

[In]

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

[Out]

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

Rule 786

Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegr
and[(d + e*x)^m*(f + g*x)*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g, m}, x] && IGtQ[p, 0]

Rule 1607

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]

Rubi steps \begin{align*} \text {integral}& = \int \frac {x \left (-1+x^2\right )}{6+2 x} \, dx \\ & = \int \left (4-\frac {3 x}{2}+\frac {x^2}{2}-\frac {12}{3+x}\right ) \, dx \\ & = 4 x-\frac {3 x^2}{4}+\frac {x^3}{6}-12 \log (3+x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.29 \[ \int \frac {-x+x^3}{6+2 x} \, dx=\frac {1}{2} \left (\frac {93}{2}+8 x-\frac {3 x^2}{2}+\frac {x^3}{3}-24 \log (3+x)\right ) \]

[In]

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

[Out]

(93/2 + 8*x - (3*x^2)/2 + x^3/3 - 24*Log[3 + x])/2

Maple [A] (verified)

Time = 0.78 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.88

method result size
default \(4 x -\frac {3 x^{2}}{4}+\frac {x^{3}}{6}-12 \ln \left (3+x \right )\) \(21\)
risch \(4 x -\frac {3 x^{2}}{4}+\frac {x^{3}}{6}-12 \ln \left (3+x \right )\) \(21\)
parallelrisch \(4 x -\frac {3 x^{2}}{4}+\frac {x^{3}}{6}-12 \ln \left (3+x \right )\) \(21\)
norman \(4 x -\frac {3 x^{2}}{4}+\frac {x^{3}}{6}-12 \ln \left (6+2 x \right )\) \(23\)
meijerg \(\frac {3 x \left (\frac {4}{9} x^{2}-2 x +12\right )}{8}-12 \ln \left (1+\frac {x}{3}\right )-\frac {x}{2}\) \(26\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.83 \[ \int \frac {-x+x^3}{6+2 x} \, dx=\frac {1}{6} \, x^{3} - \frac {3}{4} \, x^{2} + 4 \, x - 12 \, \log \left (x + 3\right ) \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.83 \[ \int \frac {-x+x^3}{6+2 x} \, dx=\frac {x^{3}}{6} - \frac {3 x^{2}}{4} + 4 x - 12 \log {\left (x + 3 \right )} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.83 \[ \int \frac {-x+x^3}{6+2 x} \, dx=\frac {1}{6} \, x^{3} - \frac {3}{4} \, x^{2} + 4 \, x - 12 \, \log \left (x + 3\right ) \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.88 \[ \int \frac {-x+x^3}{6+2 x} \, dx=\frac {1}{6} \, x^{3} - \frac {3}{4} \, x^{2} + 4 \, x - 12 \, \log \left ({\left | x + 3 \right |}\right ) \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.02 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.83 \[ \int \frac {-x+x^3}{6+2 x} \, dx=4\,x-12\,\ln \left (x+3\right )-\frac {3\,x^2}{4}+\frac {x^3}{6} \]

[In]

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

[Out]

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