3.231 \(\int \frac{9-40 x-18 x^2+174 x^4+24 x^5+26 x^6-39 x^8}{(3+2 x^2+x^4)^3} \, dx\)

Optimal. Leaf size=59 \[ \frac{13 x}{x^4+2 x^2+3}-\frac{2 \left (13 x^2+18\right ) x}{\left (x^4+2 x^2+3\right )^2}+\frac{2 \left (1-2 x^2\right )}{\left (x^4+2 x^2+3\right )^2} \]

[Out]

(2*(1 - 2*x^2))/(3 + 2*x^2 + x^4)^2 - (2*x*(18 + 13*x^2))/(3 + 2*x^2 + x^4)^2 + (13*x)/(3 + 2*x^2 + x^4)

________________________________________________________________________________________

Rubi [A]  time = 0.0906975, antiderivative size = 59, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 43, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.14, Rules used = {1673, 1678, 1588, 1663, 1660, 8} \[ \frac{13 x}{x^4+2 x^2+3}-\frac{2 \left (13 x^2+18\right ) x}{\left (x^4+2 x^2+3\right )^2}+\frac{2 \left (1-2 x^2\right )}{\left (x^4+2 x^2+3\right )^2} \]

Antiderivative was successfully verified.

[In]

Int[(9 - 40*x - 18*x^2 + 174*x^4 + 24*x^5 + 26*x^6 - 39*x^8)/(3 + 2*x^2 + x^4)^3,x]

[Out]

(2*(1 - 2*x^2))/(3 + 2*x^2 + x^4)^2 - (2*x*(18 + 13*x^2))/(3 + 2*x^2 + x^4)^2 + (13*x)/(3 + 2*x^2 + x^4)

Rule 1673

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

Rule 1678

Int[(Pq_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> With[{d = Coeff[PolynomialRemainder[Pq, a +
b*x^2 + c*x^4, x], x, 0], e = Coeff[PolynomialRemainder[Pq, a + b*x^2 + c*x^4, x], x, 2]}, Simp[(x*(a + b*x^2
+ c*x^4)^(p + 1)*(a*b*e - d*(b^2 - 2*a*c) - c*(b*d - 2*a*e)*x^2))/(2*a*(p + 1)*(b^2 - 4*a*c)), x] + Dist[1/(2*
a*(p + 1)*(b^2 - 4*a*c)), Int[(a + b*x^2 + c*x^4)^(p + 1)*ExpandToSum[2*a*(p + 1)*(b^2 - 4*a*c)*PolynomialQuot
ient[Pq, a + b*x^2 + c*x^4, x] + b^2*d*(2*p + 3) - 2*a*c*d*(4*p + 5) - a*b*e + c*(4*p + 7)*(b*d - 2*a*e)*x^2,
x], x], x]] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x^2] && Expon[Pq, x^2] > 1 && NeQ[b^2 - 4*a*c, 0] && LtQ[p, -1
]

Rule 1588

Int[(Pp_)*(Qq_)^(m_.), x_Symbol] :> With[{p = Expon[Pp, x], q = Expon[Qq, x]}, Simp[(Coeff[Pp, x, p]*x^(p - q
+ 1)*Qq^(m + 1))/((p + m*q + 1)*Coeff[Qq, x, q]), x] /; NeQ[p + m*q + 1, 0] && EqQ[(p + m*q + 1)*Coeff[Qq, x,
q]*Pp, Coeff[Pp, x, p]*x^(p - q)*((p - q + 1)*Qq + (m + 1)*x*D[Qq, x])]] /; FreeQ[m, x] && PolyQ[Pp, x] && Pol
yQ[Qq, x] && NeQ[m, -1]

Rule 1663

Int[(Pq_)*(x_)^(m_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Dist[1/2, Subst[Int[x^((m - 1)/2)
*SubstFor[x^2, Pq, x]*(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x^2] && Inte
gerQ[(m - 1)/2]

Rule 1660

Int[(Pq_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x + c*
x^2, x], f = Coeff[PolynomialRemainder[Pq, a + b*x + c*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b
*x + c*x^2, x], x, 1]}, Simp[((b*f - 2*a*g + (2*c*f - b*g)*x)*(a + b*x + c*x^2)^(p + 1))/((p + 1)*(b^2 - 4*a*c
)), x] + Dist[1/((p + 1)*(b^2 - 4*a*c)), Int[(a + b*x + c*x^2)^(p + 1)*ExpandToSum[(p + 1)*(b^2 - 4*a*c)*Q - (
2*p + 3)*(2*c*f - b*g), x], x], x]] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] && LtQ[p, -1
]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \frac{9-40 x-18 x^2+174 x^4+24 x^5+26 x^6-39 x^8}{\left (3+2 x^2+x^4\right )^3} \, dx &=\int \frac{x \left (-40+24 x^4\right )}{\left (3+2 x^2+x^4\right )^3} \, dx+\int \frac{9-18 x^2+174 x^4+26 x^6-39 x^8}{\left (3+2 x^2+x^4\right )^3} \, dx\\ &=-\frac{2 x \left (18+13 x^2\right )}{\left (3+2 x^2+x^4\right )^2}+\frac{1}{96} \int \frac{3744-2496 x^2-3744 x^4}{\left (3+2 x^2+x^4\right )^2} \, dx+\frac{1}{2} \operatorname{Subst}\left (\int \frac{-40+24 x^2}{\left (3+2 x+x^2\right )^3} \, dx,x,x^2\right )\\ &=\frac{2 \left (1-2 x^2\right )}{\left (3+2 x^2+x^4\right )^2}-\frac{2 x \left (18+13 x^2\right )}{\left (3+2 x^2+x^4\right )^2}+\frac{13 x}{3+2 x^2+x^4}+\frac{1}{32} \operatorname{Subst}\left (\int 0 \, dx,x,x^2\right )\\ &=\frac{2 \left (1-2 x^2\right )}{\left (3+2 x^2+x^4\right )^2}-\frac{2 x \left (18+13 x^2\right )}{\left (3+2 x^2+x^4\right )^2}+\frac{13 x}{3+2 x^2+x^4}\\ \end{align*}

Mathematica [A]  time = 0.0118335, size = 28, normalized size = 0.47 \[ \frac{13 x^5-4 x^2+3 x+2}{\left (x^4+2 x^2+3\right )^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(9 - 40*x - 18*x^2 + 174*x^4 + 24*x^5 + 26*x^6 - 39*x^8)/(3 + 2*x^2 + x^4)^3,x]

[Out]

(2 + 3*x - 4*x^2 + 13*x^5)/(3 + 2*x^2 + x^4)^2

________________________________________________________________________________________

Maple [A]  time = 0.006, size = 30, normalized size = 0.5 \begin{align*} -{\frac{-13\,{x}^{5}+4\,{x}^{2}-3\,x-2}{ \left ({x}^{4}+2\,{x}^{2}+3 \right ) ^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-39*x^8+26*x^6+24*x^5+174*x^4-18*x^2-40*x+9)/(x^4+2*x^2+3)^3,x)

[Out]

-(-13*x^5+4*x^2-3*x-2)/(x^4+2*x^2+3)^2

________________________________________________________________________________________

Maxima [A]  time = 1.01136, size = 51, normalized size = 0.86 \begin{align*} \frac{13 \, x^{5} - 4 \, x^{2} + 3 \, x + 2}{x^{8} + 4 \, x^{6} + 10 \, x^{4} + 12 \, x^{2} + 9} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-39*x^8+26*x^6+24*x^5+174*x^4-18*x^2-40*x+9)/(x^4+2*x^2+3)^3,x, algorithm="maxima")

[Out]

(13*x^5 - 4*x^2 + 3*x + 2)/(x^8 + 4*x^6 + 10*x^4 + 12*x^2 + 9)

________________________________________________________________________________________

Fricas [A]  time = 1.20708, size = 86, normalized size = 1.46 \begin{align*} \frac{13 \, x^{5} - 4 \, x^{2} + 3 \, x + 2}{x^{8} + 4 \, x^{6} + 10 \, x^{4} + 12 \, x^{2} + 9} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-39*x^8+26*x^6+24*x^5+174*x^4-18*x^2-40*x+9)/(x^4+2*x^2+3)^3,x, algorithm="fricas")

[Out]

(13*x^5 - 4*x^2 + 3*x + 2)/(x^8 + 4*x^6 + 10*x^4 + 12*x^2 + 9)

________________________________________________________________________________________

Sympy [A]  time = 0.181473, size = 34, normalized size = 0.58 \begin{align*} \frac{13 x^{5} - 4 x^{2} + 3 x + 2}{x^{8} + 4 x^{6} + 10 x^{4} + 12 x^{2} + 9} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-39*x**8+26*x**6+24*x**5+174*x**4-18*x**2-40*x+9)/(x**4+2*x**2+3)**3,x)

[Out]

(13*x**5 - 4*x**2 + 3*x + 2)/(x**8 + 4*x**6 + 10*x**4 + 12*x**2 + 9)

________________________________________________________________________________________

Giac [A]  time = 1.19465, size = 38, normalized size = 0.64 \begin{align*} \frac{13 \, x^{5} - 4 \, x^{2} + 3 \, x + 2}{{\left (x^{4} + 2 \, x^{2} + 3\right )}^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-39*x^8+26*x^6+24*x^5+174*x^4-18*x^2-40*x+9)/(x^4+2*x^2+3)^3,x, algorithm="giac")

[Out]

(13*x^5 - 4*x^2 + 3*x + 2)/(x^4 + 2*x^2 + 3)^2