3.329 \(\int \frac {-20 x+4 x^2}{9-10 x^2+x^4} \, dx\)

Optimal. Leaf size=31 \[ \log (1-x)-\frac {1}{2} \log (3-x)+\frac {3}{2} \log (x+1)-2 \log (x+3) \]

[Out]

ln(1-x)-1/2*ln(3-x)+3/2*ln(1+x)-2*ln(3+x)

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 41, normalized size of antiderivative = 1.32, number of steps used = 11, number of rules used = 8, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {1593, 1662, 12, 1107, 616, 31, 1130, 207} \[ \frac {5}{4} \log \left (1-x^2\right )-\frac {5}{4} \log \left (9-x^2\right )-\frac {3}{2} \tanh ^{-1}\left (\frac {x}{3}\right )+\frac {1}{2} \tanh ^{-1}(x) \]

Antiderivative was successfully verified.

[In]

Int[(-20*x + 4*x^2)/(9 - 10*x^2 + x^4),x]

[Out]

(-3*ArcTanh[x/3])/2 + ArcTanh[x]/2 + (5*Log[1 - x^2])/4 - (5*Log[9 - x^2])/4

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 31

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

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

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 1107

Int[(x_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2, Subst[Int[(a + b*x + c*x^2)^p, x],
 x, x^2], x] /; FreeQ[{a, b, c, p}, x]

Rule 1130

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

Rule 1593

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]

Rule 1662

Int[(Pq_)*((d_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Module[{q = Expon[Pq, x],
 k}, Int[(d*x)^m*Sum[Coeff[Pq, x, 2*k]*x^(2*k), {k, 0, q/2 + 1}]*(a + b*x^2 + c*x^4)^p, x] + Dist[1/d, Int[(d*
x)^(m + 1)*Sum[Coeff[Pq, x, 2*k + 1]*x^(2*k), {k, 0, (q - 1)/2 + 1}]*(a + b*x^2 + c*x^4)^p, x], x]] /; FreeQ[{
a, b, c, d, m, p}, x] && PolyQ[Pq, x] &&  !PolyQ[Pq, x^2]

Rubi steps

\begin {align*} \int \frac {-20 x+4 x^2}{9-10 x^2+x^4} \, dx &=\int \frac {x (-20+4 x)}{9-10 x^2+x^4} \, dx\\ &=\int -\frac {20 x}{9-10 x^2+x^4} \, dx+\int \frac {4 x^2}{9-10 x^2+x^4} \, dx\\ &=4 \int \frac {x^2}{9-10 x^2+x^4} \, dx-20 \int \frac {x}{9-10 x^2+x^4} \, dx\\ &=-\left (\frac {1}{2} \int \frac {1}{-1+x^2} \, dx\right )+\frac {9}{2} \int \frac {1}{-9+x^2} \, dx-10 \operatorname {Subst}\left (\int \frac {1}{9-10 x+x^2} \, dx,x,x^2\right )\\ &=-\frac {3}{2} \tanh ^{-1}\left (\frac {x}{3}\right )+\frac {1}{2} \tanh ^{-1}(x)-\frac {5}{4} \operatorname {Subst}\left (\int \frac {1}{-9+x} \, dx,x,x^2\right )+\frac {5}{4} \operatorname {Subst}\left (\int \frac {1}{-1+x} \, dx,x,x^2\right )\\ &=-\frac {3}{2} \tanh ^{-1}\left (\frac {x}{3}\right )+\frac {1}{2} \tanh ^{-1}(x)+\frac {5}{4} \log \left (1-x^2\right )-\frac {5}{4} \log \left (9-x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 39, normalized size = 1.26 \[ 4 \left (\frac {1}{4} \log (1-x)-\frac {1}{8} \log (3-x)+\frac {3}{8} \log (x+1)-\frac {1}{2} \log (x+3)\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(-20*x + 4*x^2)/(9 - 10*x^2 + x^4),x]

[Out]

4*(Log[1 - x]/4 - Log[3 - x]/8 + (3*Log[1 + x])/8 - Log[3 + x]/2)

________________________________________________________________________________________

fricas [A]  time = 0.84, size = 23, normalized size = 0.74 \[ -2 \, \log \left (x + 3\right ) + \frac {3}{2} \, \log \left (x + 1\right ) + \log \left (x - 1\right ) - \frac {1}{2} \, \log \left (x - 3\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((4*x^2-20*x)/(x^4-10*x^2+9),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.31, size = 27, normalized size = 0.87 \[ -2 \, \log \left ({\left | x + 3 \right |}\right ) + \frac {3}{2} \, \log \left ({\left | x + 1 \right |}\right ) + \log \left ({\left | x - 1 \right |}\right ) - \frac {1}{2} \, \log \left ({\left | x - 3 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((4*x^2-20*x)/(x^4-10*x^2+9),x, algorithm="giac")

[Out]

-2*log(abs(x + 3)) + 3/2*log(abs(x + 1)) + log(abs(x - 1)) - 1/2*log(abs(x - 3))

________________________________________________________________________________________

maple [A]  time = 0.01, size = 24, normalized size = 0.77 \[ -\frac {\ln \left (x -3\right )}{2}+\ln \left (x -1\right )+\frac {3 \ln \left (x +1\right )}{2}-2 \ln \left (x +3\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((4*x^2-20*x)/(x^4-10*x^2+9),x)

[Out]

ln(x-1)+3/2*ln(x+1)-2*ln(x+3)-1/2*ln(x-3)

________________________________________________________________________________________

maxima [A]  time = 0.80, size = 23, normalized size = 0.74 \[ -2 \, \log \left (x + 3\right ) + \frac {3}{2} \, \log \left (x + 1\right ) + \log \left (x - 1\right ) - \frac {1}{2} \, \log \left (x - 3\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((4*x^2-20*x)/(x^4-10*x^2+9),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.05, size = 23, normalized size = 0.74 \[ \ln \left (x-1\right )+\frac {3\,\ln \left (x+1\right )}{2}-\frac {\ln \left (x-3\right )}{2}-2\,\ln \left (x+3\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(20*x - 4*x^2)/(x^4 - 10*x^2 + 9),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.19, size = 26, normalized size = 0.84 \[ - \frac {\log {\left (x - 3 \right )}}{2} + \log {\left (x - 1 \right )} + \frac {3 \log {\left (x + 1 \right )}}{2} - 2 \log {\left (x + 3 \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((4*x**2-20*x)/(x**4-10*x**2+9),x)

[Out]

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

________________________________________________________________________________________