3.163 \(\int \frac{1}{(-3-2 x+x^2)^3} \, dx\)

Optimal. Leaf size=61 \[ \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) \]

[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

________________________________________________________________________________________

Rubi [A]  time = 0.012479, antiderivative size = 61, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 3, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.3, Rules used = {614, 616, 31} \[ \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) \]

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 614

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 616

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]

Rule 31

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

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.0224939, size = 46, normalized size = 0.75 \[ \frac{1}{512} \left (\frac{4 \left (3 x^3-9 x^2-11 x+17\right )}{\left (x^2-2 x-3\right )^2}+3 \log (3-x)-3 \log (x+1)\right ) \]

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.009, size = 42, normalized size = 0.7 \begin{align*}{\frac{1}{128\, \left ( 1+x \right ) ^{2}}}+{\frac{3}{256+256\,x}}-{\frac{3\,\ln \left ( 1+x \right ) }{512}}-{\frac{1}{128\, \left ( -3+x \right ) ^{2}}}+{\frac{3}{-768+256\,x}}+{\frac{3\,\ln \left ( -3+x \right ) }{512}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 0.921371, size = 68, normalized size = 1.11 \begin{align*} \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{align*}

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 = 1.94209, size = 224, normalized size = 3.67 \begin{align*} \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{align*}

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.145338, size = 51, normalized size = 0.84 \begin{align*} \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{align*}

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 = 1.06083, size = 57, normalized size = 0.93 \begin{align*} \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{align*}

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))