3.17.85 \(\int \frac {3-8 x+x^2-2 x^3}{3+x^2} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 15, normalized size of antiderivative = 0.79, number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {1810, 260} \begin {gather*} -x^2-\log \left (x^2+3\right )+x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 1810

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 15, normalized size = 0.79 \begin {gather*} x-x^2-\log \left (3+x^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.81, size = 15, normalized size = 0.79 \begin {gather*} -x^{2} + x - \log \left (x^{2} + 3\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.23, size = 15, normalized size = 0.79 \begin {gather*} -x^{2} + x - \log \left (x^{2} + 3\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.30, size = 16, normalized size = 0.84




method result size



default \(x -x^{2}-\ln \left (x^{2}+3\right )\) \(16\)
norman \(x -x^{2}-\ln \left (x^{2}+3\right )\) \(16\)
risch \(x -x^{2}-\ln \left (x^{2}+3\right )\) \(16\)
meijerg \(\sqrt {3}\, \arctan \left (\frac {x \sqrt {3}}{3}\right )-x^{2}-\ln \left (1+\frac {x^{2}}{3}\right )+\frac {\sqrt {3}\, \left (\frac {2 x \sqrt {3}}{3}-2 \arctan \left (\frac {x \sqrt {3}}{3}\right )\right )}{2}\) \(49\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x-x^2-ln(x^2+3)

________________________________________________________________________________________

maxima [A]  time = 0.37, size = 15, normalized size = 0.79 \begin {gather*} -x^{2} + x - \log \left (x^{2} + 3\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.07, size = 15, normalized size = 0.79 \begin {gather*} x-\ln \left (x^2+3\right )-x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.11, size = 10, normalized size = 0.53 \begin {gather*} - x^{2} + x - \log {\left (x^{2} + 3 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________