3.2.63 \(\int \frac {1}{(-3-2 x+x^2)^3} \, dx\) [163]

Optimal. Leaf size=61 \[ \frac {1-x}{16 \left (3+2 x-x^2\right )^2}+\frac {3 (1-x)}{128 \left (3+2 x-x^2\right )}+\frac {3}{512} \log (3-x)-\frac {3}{512} \log (1+x) \]

[Out]

1/16*(1-x)/(-x^2+2*x+3)^2+3/128*(1-x)/(-x^2+2*x+3)+3/512*ln(3-x)-3/512*ln(1+x)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {628, 630, 31} \begin {gather*} \frac {3 (1-x)}{128 \left (-x^2+2 x+3\right )}+\frac {1-x}{16 \left (-x^2+2 x+3\right )^2}+\frac {3}{512} \log (3-x)-\frac {3}{512} \log (x+1) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(1 - x)/(16*(3 + 2*x - x^2)^2) + (3*(1 - x))/(128*(3 + 2*x - x^2)) + (3*Log[3 - x])/512 - (3*Log[1 + x])/512

Rule 31

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

Rule 628

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(b + 2*c*x)*((a + b*x + c*x^2)^(p + 1)/((p + 1
)*(b^2 - 4*a*c))), x] - Dist[2*c*((2*p + 3)/((p + 1)*(b^2 - 4*a*c))), Int[(a + b*x + c*x^2)^(p + 1), x], x] /;
 FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0] && LtQ[p, -1] && NeQ[p, -3/2] && IntegerQ[4*p]

Rule 630

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

Rubi steps

\begin {align*} \int \frac {1}{\left (-3-2 x+x^2\right )^3} \, dx &=\frac {1-x}{16 \left (3+2 x-x^2\right )^2}-\frac {3}{16} \int \frac {1}{\left (-3-2 x+x^2\right )^2} \, dx\\ &=\frac {1-x}{16 \left (3+2 x-x^2\right )^2}+\frac {3 (1-x)}{128 \left (3+2 x-x^2\right )}+\frac {3}{128} \int \frac {1}{-3-2 x+x^2} \, dx\\ &=\frac {1-x}{16 \left (3+2 x-x^2\right )^2}+\frac {3 (1-x)}{128 \left (3+2 x-x^2\right )}+\frac {3}{512} \int \frac {1}{-3+x} \, dx-\frac {3}{512} \int \frac {1}{1+x} \, dx\\ &=\frac {1-x}{16 \left (3+2 x-x^2\right )^2}+\frac {3 (1-x)}{128 \left (3+2 x-x^2\right )}+\frac {3}{512} \log (3-x)-\frac {3}{512} \log (1+x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 46, normalized size = 0.75 \begin {gather*} \frac {1}{512} \left (\frac {4 \left (17-11 x-9 x^2+3 x^3\right )}{\left (-3-2 x+x^2\right )^2}+3 \log (3-x)-3 \log (1+x)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

((4*(17 - 11*x - 9*x^2 + 3*x^3))/(-3 - 2*x + x^2)^2 + 3*Log[3 - x] - 3*Log[1 + x])/512

________________________________________________________________________________________

Maple [A]
time = 0.07, size = 42, normalized size = 0.69

method result size
norman \(\frac {\frac {3}{128} x^{3}-\frac {9}{128} x^{2}-\frac {11}{128} x +\frac {17}{128}}{\left (x^{2}-2 x -3\right )^{2}}+\frac {3 \ln \left (-3+x \right )}{512}-\frac {3 \ln \left (1+x \right )}{512}\) \(40\)
risch \(\frac {\frac {3}{128} x^{3}-\frac {9}{128} x^{2}-\frac {11}{128} x +\frac {17}{128}}{\left (x^{2}-2 x -3\right )^{2}}+\frac {3 \ln \left (-3+x \right )}{512}-\frac {3 \ln \left (1+x \right )}{512}\) \(40\)
default \(-\frac {1}{128 \left (-3+x \right )^{2}}+\frac {3}{256 \left (-3+x \right )}+\frac {3 \ln \left (-3+x \right )}{512}+\frac {1}{128 \left (1+x \right )^{2}}+\frac {3}{256 \left (1+x \right )}-\frac {3 \ln \left (1+x \right )}{512}\) \(42\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/128/(-3+x)^2+3/256/(-3+x)+3/512*ln(-3+x)+1/128/(1+x)^2+3/256/(1+x)-3/512*ln(1+x)

________________________________________________________________________________________

Maxima [A]
time = 3.44, size = 50, normalized size = 0.82 \begin {gather*} \frac {3 \, x^{3} - 9 \, x^{2} - 11 \, x + 17}{128 \, {\left (x^{4} - 4 \, x^{3} - 2 \, x^{2} + 12 \, x + 9\right )}} - \frac {3}{512} \, \log \left (x + 1\right ) + \frac {3}{512} \, \log \left (x - 3\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/128*(3*x^3 - 9*x^2 - 11*x + 17)/(x^4 - 4*x^3 - 2*x^2 + 12*x + 9) - 3/512*log(x + 1) + 3/512*log(x - 3)

________________________________________________________________________________________

Fricas [A]
time = 0.40, size = 85, normalized size = 1.39 \begin {gather*} \frac {12 \, x^{3} - 36 \, x^{2} - 3 \, {\left (x^{4} - 4 \, x^{3} - 2 \, x^{2} + 12 \, x + 9\right )} \log \left (x + 1\right ) + 3 \, {\left (x^{4} - 4 \, x^{3} - 2 \, x^{2} + 12 \, x + 9\right )} \log \left (x - 3\right ) - 44 \, x + 68}{512 \, {\left (x^{4} - 4 \, x^{3} - 2 \, x^{2} + 12 \, x + 9\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/512*(12*x^3 - 36*x^2 - 3*(x^4 - 4*x^3 - 2*x^2 + 12*x + 9)*log(x + 1) + 3*(x^4 - 4*x^3 - 2*x^2 + 12*x + 9)*lo
g(x - 3) - 44*x + 68)/(x^4 - 4*x^3 - 2*x^2 + 12*x + 9)

________________________________________________________________________________________

Sympy [A]
time = 0.06, size = 51, normalized size = 0.84 \begin {gather*} \frac {3 x^{3} - 9 x^{2} - 11 x + 17}{128 x^{4} - 512 x^{3} - 256 x^{2} + 1536 x + 1152} + \frac {3 \log {\left (x - 3 \right )}}{512} - \frac {3 \log {\left (x + 1 \right )}}{512} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(x**2-2*x-3)**3,x)

[Out]

(3*x**3 - 9*x**2 - 11*x + 17)/(128*x**4 - 512*x**3 - 256*x**2 + 1536*x + 1152) + 3*log(x - 3)/512 - 3*log(x +
1)/512

________________________________________________________________________________________

Giac [A]
time = 0.53, size = 42, normalized size = 0.69 \begin {gather*} \frac {3 \, x^{3} - 9 \, x^{2} - 11 \, x + 17}{128 \, {\left (x^{2} - 2 \, x - 3\right )}^{2}} - \frac {3}{512} \, \log \left ({\left | x + 1 \right |}\right ) + \frac {3}{512} \, \log \left ({\left | x - 3 \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/128*(3*x^3 - 9*x^2 - 11*x + 17)/(x^2 - 2*x - 3)^2 - 3/512*log(abs(x + 1)) + 3/512*log(abs(x - 3))

________________________________________________________________________________________

Mupad [B]
time = 0.12, size = 45, normalized size = 0.74 \begin {gather*} -\frac {3\,\ln \left (\frac {x+1}{x-3}\right )}{512}-6\,\left (\frac {1}{256\,\left (-x^2+2\,x+3\right )}+\frac {1}{96\,{\left (-x^2+2\,x+3\right )}^2}\right )\,\left (x-1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________