3.364 \(\int \frac {-3+x^3}{-7-6 x+x^2} \, dx\)

Optimal. Leaf size=29 \[ \frac {x^2}{2}+6 x+\frac {85}{2} \log (7-x)+\frac {1}{2} \log (x+1) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {1657, 632, 31} \[ \frac {x^2}{2}+6 x+\frac {85}{2} \log (7-x)+\frac {1}{2} \log (x+1) \]

Antiderivative was successfully verified.

[In]

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

[Out]

6*x + x^2/2 + (85*Log[7 - x])/2 + Log[1 + x]/2

Rule 31

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

Rule 632

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[
(c*d - e*(b/2 - q/2))/q, Int[1/(b/2 - q/2 + c*x), x], x] - Dist[(c*d - e*(b/2 + q/2))/q, Int[1/(b/2 + q/2 + c*
x), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] && NiceSqrtQ[b^2 - 4*a*
c]

Rule 1657

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

Rubi steps

\begin {align*} \int \frac {-3+x^3}{-7-6 x+x^2} \, dx &=\int \left (6+x+\frac {39+43 x}{-7-6 x+x^2}\right ) \, dx\\ &=6 x+\frac {x^2}{2}+\int \frac {39+43 x}{-7-6 x+x^2} \, dx\\ &=6 x+\frac {x^2}{2}+\frac {1}{2} \int \frac {1}{1+x} \, dx+\frac {85}{2} \int \frac {1}{-7+x} \, dx\\ &=6 x+\frac {x^2}{2}+\frac {85}{2} \log (7-x)+\frac {1}{2} \log (1+x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 29, normalized size = 1.00 \[ \frac {x^2}{2}+6 x+\frac {85}{2} \log (7-x)+\frac {1}{2} \log (x+1) \]

Antiderivative was successfully verified.

[In]

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

[Out]

6*x + x^2/2 + (85*Log[7 - x])/2 + Log[1 + x]/2

________________________________________________________________________________________

fricas [A]  time = 0.62, size = 21, normalized size = 0.72 \[ \frac {1}{2} \, x^{2} + 6 \, x + \frac {1}{2} \, \log \left (x + 1\right ) + \frac {85}{2} \, \log \left (x - 7\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.35, size = 23, normalized size = 0.79 \[ \frac {1}{2} \, x^{2} + 6 \, x + \frac {1}{2} \, \log \left ({\left | x + 1 \right |}\right ) + \frac {85}{2} \, \log \left ({\left | x - 7 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.00, size = 22, normalized size = 0.76 \[ \frac {x^{2}}{2}+6 x +\frac {\ln \left (x +1\right )}{2}+\frac {85 \ln \left (x -7\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 1.10, size = 21, normalized size = 0.72 \[ \frac {1}{2} \, x^{2} + 6 \, x + \frac {1}{2} \, \log \left (x + 1\right ) + \frac {85}{2} \, \log \left (x - 7\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 2.12, size = 21, normalized size = 0.72 \[ 6\,x+\frac {\ln \left (x+1\right )}{2}+\frac {85\,\ln \left (x-7\right )}{2}+\frac {x^2}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.11, size = 22, normalized size = 0.76 \[ \frac {x^{2}}{2} + 6 x + \frac {85 \log {\left (x - 7 \right )}}{2} + \frac {\log {\left (x + 1 \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x**2/2 + 6*x + 85*log(x - 7)/2 + log(x + 1)/2

________________________________________________________________________________________