### 3.63 $$\int \frac{x^3 (d+e x^2+f x^4)}{(a+b x^2+c x^4)^2} \, dx$$

Optimal. Leaf size=165 $\frac{x^2 \left (x^2 \left (-\left (-2 a c f+b^2 f-b c e+2 c^2 d\right )\right )-b (a f+c d)+2 a c e\right )}{2 c \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{\tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right ) \left (-2 b c (3 a f+c d)+4 a c^2 e+b^3 f\right )}{2 c^2 \left (b^2-4 a c\right )^{3/2}}+\frac{f \log \left (a+b x^2+c x^4\right )}{4 c^2}$

[Out]

(x^2*(2*a*c*e - b*(c*d + a*f) - (2*c^2*d - b*c*e + b^2*f - 2*a*c*f)*x^2))/(2*c*(b^2 - 4*a*c)*(a + b*x^2 + c*x^
4)) + ((4*a*c^2*e + b^3*f - 2*b*c*(c*d + 3*a*f))*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 - 4*a*c]])/(2*c^2*(b^2 - 4*a*c
)^(3/2)) + (f*Log[a + b*x^2 + c*x^4])/(4*c^2)

________________________________________________________________________________________

Rubi [A]  time = 0.286901, antiderivative size = 165, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 30, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.2, Rules used = {1663, 1644, 634, 618, 206, 628} $\frac{x^2 \left (x^2 \left (-\left (-2 a c f+b^2 f-b c e+2 c^2 d\right )\right )-b (a f+c d)+2 a c e\right )}{2 c \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{\tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right ) \left (-2 b c (3 a f+c d)+4 a c^2 e+b^3 f\right )}{2 c^2 \left (b^2-4 a c\right )^{3/2}}+\frac{f \log \left (a+b x^2+c x^4\right )}{4 c^2}$

Antiderivative was successfully veriﬁed.

[In]

Int[(x^3*(d + e*x^2 + f*x^4))/(a + b*x^2 + c*x^4)^2,x]

[Out]

(x^2*(2*a*c*e - b*(c*d + a*f) - (2*c^2*d - b*c*e + b^2*f - 2*a*c*f)*x^2))/(2*c*(b^2 - 4*a*c)*(a + b*x^2 + c*x^
4)) + ((4*a*c^2*e + b^3*f - 2*b*c*(c*d + 3*a*f))*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 - 4*a*c]])/(2*c^2*(b^2 - 4*a*c
)^(3/2)) + (f*Log[a + b*x^2 + c*x^4])/(4*c^2)

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 1644

Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = Polynomi
alQuotient[Pq, a + b*x + c*x^2, x], f = Coeff[PolynomialRemainder[Pq, a + b*x + c*x^2, x], x, 0], g = Coeff[Po
lynomialRemainder[Pq, a + b*x + c*x^2, x], x, 1]}, Simp[((d + e*x)^m*(a + b*x + c*x^2)^(p + 1)*(f*b - 2*a*g +
(2*c*f - b*g)*x))/((p + 1)*(b^2 - 4*a*c)), x] + Dist[1/((p + 1)*(b^2 - 4*a*c)), Int[(d + e*x)^(m - 1)*(a + b*x
+ c*x^2)^(p + 1)*ExpandToSum[(p + 1)*(b^2 - 4*a*c)*(d + e*x)*Q + g*(2*a*e*m + b*d*(2*p + 3)) - f*(b*e*m + 2*c
*d*(2*p + 3)) - e*(2*c*f - b*g)*(m + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, b, c, d, e}, x] && PolyQ[Pq, x] && N
eQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && LtQ[p, -1] && GtQ[m, 0] && (IntegerQ[p] ||  !IntegerQ[m
] ||  !RationalQ[a, b, c, d, e]) &&  !(IGtQ[m, 0] && RationalQ[a, b, c, d, e] && (IntegerQ[p] || ILtQ[p + 1/2,
0]))

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), 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 618

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

Rule 206

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

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{x^3 \left (d+e x^2+f x^4\right )}{\left (a+b x^2+c x^4\right )^2} \, dx &=\frac{1}{2} \operatorname{Subst}\left (\int \frac{x \left (d+e x+f x^2\right )}{\left (a+b x+c x^2\right )^2} \, dx,x,x^2\right )\\ &=\frac{x^2 \left (2 a c e-b (c d+a f)-\left (2 c^2 d-b c e+b^2 f-2 a c f\right ) x^2\right )}{2 c \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}-\frac{\operatorname{Subst}\left (\int \frac{2 a e-\frac{b (c d+a f)}{c}-\frac{\left (b^2-4 a c\right ) f x}{c}}{a+b x+c x^2} \, dx,x,x^2\right )}{2 \left (b^2-4 a c\right )}\\ &=\frac{x^2 \left (2 a c e-b (c d+a f)-\left (2 c^2 d-b c e+b^2 f-2 a c f\right ) x^2\right )}{2 c \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{f \operatorname{Subst}\left (\int \frac{b+2 c x}{a+b x+c x^2} \, dx,x,x^2\right )}{4 c^2}-\frac{\left (4 a c^2 e+b^3 f-2 b c (c d+3 a f)\right ) \operatorname{Subst}\left (\int \frac{1}{a+b x+c x^2} \, dx,x,x^2\right )}{4 c^2 \left (b^2-4 a c\right )}\\ &=\frac{x^2 \left (2 a c e-b (c d+a f)-\left (2 c^2 d-b c e+b^2 f-2 a c f\right ) x^2\right )}{2 c \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{f \log \left (a+b x^2+c x^4\right )}{4 c^2}+\frac{\left (4 a c^2 e+b^3 f-2 b c (c d+3 a f)\right ) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^2\right )}{2 c^2 \left (b^2-4 a c\right )}\\ &=\frac{x^2 \left (2 a c e-b (c d+a f)-\left (2 c^2 d-b c e+b^2 f-2 a c f\right ) x^2\right )}{2 c \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{\left (4 a c^2 e+b^3 f-2 b c (c d+3 a f)\right ) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 c^2 \left (b^2-4 a c\right )^{3/2}}+\frac{f \log \left (a+b x^2+c x^4\right )}{4 c^2}\\ \end{align*}

Mathematica [A]  time = 0.287673, size = 175, normalized size = 1.06 $\frac{\frac{2 \left (-2 a^2 c f+a \left (b^2 f-b c \left (e+3 f x^2\right )+2 c^2 \left (d+e x^2\right )\right )+b x^2 \left (b^2 f-b c e+c^2 d\right )\right )}{\left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{2 \tan ^{-1}\left (\frac{b+2 c x^2}{\sqrt{4 a c-b^2}}\right ) \left (-2 b c (3 a f+c d)+4 a c^2 e+b^3 f\right )}{\left (4 a c-b^2\right )^{3/2}}+f \log \left (a+b x^2+c x^4\right )}{4 c^2}$

Antiderivative was successfully veriﬁed.

[In]

Integrate[(x^3*(d + e*x^2 + f*x^4))/(a + b*x^2 + c*x^4)^2,x]

[Out]

((2*(-2*a^2*c*f + b*(c^2*d - b*c*e + b^2*f)*x^2 + a*(b^2*f + 2*c^2*(d + e*x^2) - b*c*(e + 3*f*x^2))))/((b^2 -
4*a*c)*(a + b*x^2 + c*x^4)) + (2*(4*a*c^2*e + b^3*f - 2*b*c*(c*d + 3*a*f))*ArcTan[(b + 2*c*x^2)/Sqrt[-b^2 + 4*
a*c]])/(-b^2 + 4*a*c)^(3/2) + f*Log[a + b*x^2 + c*x^4])/(4*c^2)

________________________________________________________________________________________

Maple [B]  time = 0.013, size = 336, normalized size = 2. \begin{align*}{\frac{1}{2\,c{x}^{4}+2\,b{x}^{2}+2\,a} \left ({\frac{ \left ( 3\,abcf-2\,a{c}^{2}e-{b}^{3}f+{b}^{2}ce-b{c}^{2}d \right ){x}^{2}}{ \left ( 4\,ac-{b}^{2} \right ){c}^{2}}}+{\frac{a \left ( 2\,acf-{b}^{2}f+bce-2\,{c}^{2}d \right ) }{ \left ( 4\,ac-{b}^{2} \right ){c}^{2}}} \right ) }+{\frac{\ln \left ( c{x}^{4}+b{x}^{2}+a \right ) af}{ \left ( 4\,ac-{b}^{2} \right ) c}}-{\frac{\ln \left ( c{x}^{4}+b{x}^{2}+a \right ){b}^{2}f}{4\, \left ( 4\,ac-{b}^{2} \right ){c}^{2}}}-3\,{\frac{abf}{c \left ( 4\,ac-{b}^{2} \right ) ^{3/2}}\arctan \left ({\frac{2\,c{x}^{2}+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }+2\,{\frac{ae}{ \left ( 4\,ac-{b}^{2} \right ) ^{3/2}}\arctan \left ({\frac{2\,c{x}^{2}+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }-{bd\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ) \left ( 4\,ac-{b}^{2} \right ) ^{-{\frac{3}{2}}}}+{\frac{{b}^{3}f}{2\,{c}^{2}}\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ) \left ( 4\,ac-{b}^{2} \right ) ^{-{\frac{3}{2}}}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int(x^3*(f*x^4+e*x^2+d)/(c*x^4+b*x^2+a)^2,x)

[Out]

1/2*((3*a*b*c*f-2*a*c^2*e-b^3*f+b^2*c*e-b*c^2*d)/(4*a*c-b^2)/c^2*x^2+a*(2*a*c*f-b^2*f+b*c*e-2*c^2*d)/(4*a*c-b^
2)/c^2)/(c*x^4+b*x^2+a)+1/c/(4*a*c-b^2)*ln(c*x^4+b*x^2+a)*a*f-1/4/c^2/(4*a*c-b^2)*ln(c*x^4+b*x^2+a)*b^2*f-3/c/
(4*a*c-b^2)^(3/2)*arctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2))*a*b*f+2/(4*a*c-b^2)^(3/2)*arctan((2*c*x^2+b)/(4*a*c-b^
2)^(1/2))*e*a-1/(4*a*c-b^2)^(3/2)*arctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2))*b*d+1/2/c^2/(4*a*c-b^2)^(3/2)*arctan((
2*c*x^2+b)/(4*a*c-b^2)^(1/2))*b^3*f

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(f*x^4+e*x^2+d)/(c*x^4+b*x^2+a)^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.69974, size = 2033, normalized size = 12.32 \begin{align*} \text{result too large to display} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(f*x^4+e*x^2+d)/(c*x^4+b*x^2+a)^2,x, algorithm="fricas")

[Out]

[1/4*(2*((b^3*c^2 - 4*a*b*c^3)*d - (b^4*c - 6*a*b^2*c^2 + 8*a^2*c^3)*e + (b^5 - 7*a*b^3*c + 12*a^2*b*c^2)*f)*x
^2 - (2*a*b*c^2*d - 4*a^2*c^2*e + (2*b*c^3*d - 4*a*c^3*e - (b^3*c - 6*a*b*c^2)*f)*x^4 + (2*b^2*c^2*d - 4*a*b*c
^2*e - (b^4 - 6*a*b^2*c)*f)*x^2 - (a*b^3 - 6*a^2*b*c)*f)*sqrt(b^2 - 4*a*c)*log((2*c^2*x^4 + 2*b*c*x^2 + b^2 -
2*a*c + (2*c*x^2 + b)*sqrt(b^2 - 4*a*c))/(c*x^4 + b*x^2 + a)) + 4*(a*b^2*c^2 - 4*a^2*c^3)*d - 2*(a*b^3*c - 4*a
^2*b*c^2)*e + 2*(a*b^4 - 6*a^2*b^2*c + 8*a^3*c^2)*f + ((b^4*c - 8*a*b^2*c^2 + 16*a^2*c^3)*f*x^4 + (b^5 - 8*a*b
^3*c + 16*a^2*b*c^2)*f*x^2 + (a*b^4 - 8*a^2*b^2*c + 16*a^3*c^2)*f)*log(c*x^4 + b*x^2 + a))/(a*b^4*c^2 - 8*a^2*
b^2*c^3 + 16*a^3*c^4 + (b^4*c^3 - 8*a*b^2*c^4 + 16*a^2*c^5)*x^4 + (b^5*c^2 - 8*a*b^3*c^3 + 16*a^2*b*c^4)*x^2),
1/4*(2*((b^3*c^2 - 4*a*b*c^3)*d - (b^4*c - 6*a*b^2*c^2 + 8*a^2*c^3)*e + (b^5 - 7*a*b^3*c + 12*a^2*b*c^2)*f)*x
^2 - 2*(2*a*b*c^2*d - 4*a^2*c^2*e + (2*b*c^3*d - 4*a*c^3*e - (b^3*c - 6*a*b*c^2)*f)*x^4 + (2*b^2*c^2*d - 4*a*b
*c^2*e - (b^4 - 6*a*b^2*c)*f)*x^2 - (a*b^3 - 6*a^2*b*c)*f)*sqrt(-b^2 + 4*a*c)*arctan(-(2*c*x^2 + b)*sqrt(-b^2
+ 4*a*c)/(b^2 - 4*a*c)) + 4*(a*b^2*c^2 - 4*a^2*c^3)*d - 2*(a*b^3*c - 4*a^2*b*c^2)*e + 2*(a*b^4 - 6*a^2*b^2*c +
8*a^3*c^2)*f + ((b^4*c - 8*a*b^2*c^2 + 16*a^2*c^3)*f*x^4 + (b^5 - 8*a*b^3*c + 16*a^2*b*c^2)*f*x^2 + (a*b^4 -
8*a^2*b^2*c + 16*a^3*c^2)*f)*log(c*x^4 + b*x^2 + a))/(a*b^4*c^2 - 8*a^2*b^2*c^3 + 16*a^3*c^4 + (b^4*c^3 - 8*a*
b^2*c^4 + 16*a^2*c^5)*x^4 + (b^5*c^2 - 8*a*b^3*c^3 + 16*a^2*b*c^4)*x^2)]

________________________________________________________________________________________

Sympy [B]  time = 145.522, size = 1030, normalized size = 6.24 \begin{align*} \text{result too large to display} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**3*(f*x**4+e*x**2+d)/(c*x**4+b*x**2+a)**2,x)

[Out]

(f/(4*c**2) - sqrt(-(4*a*c - b**2)**3)*(6*a*b*c*f - 4*a*c**2*e - b**3*f + 2*b*c**2*d)/(4*c**2*(64*a**3*c**3 -
48*a**2*b**2*c**2 + 12*a*b**4*c - b**6)))*log(x**2 + (-32*a**2*c**3*(f/(4*c**2) - sqrt(-(4*a*c - b**2)**3)*(6*
a*b*c*f - 4*a*c**2*e - b**3*f + 2*b*c**2*d)/(4*c**2*(64*a**3*c**3 - 48*a**2*b**2*c**2 + 12*a*b**4*c - b**6)))
+ 8*a**2*c*f + 16*a*b**2*c**2*(f/(4*c**2) - sqrt(-(4*a*c - b**2)**3)*(6*a*b*c*f - 4*a*c**2*e - b**3*f + 2*b*c*
*2*d)/(4*c**2*(64*a**3*c**3 - 48*a**2*b**2*c**2 + 12*a*b**4*c - b**6))) - a*b**2*f - 2*a*b*c*e - 2*b**4*c*(f/(
4*c**2) - sqrt(-(4*a*c - b**2)**3)*(6*a*b*c*f - 4*a*c**2*e - b**3*f + 2*b*c**2*d)/(4*c**2*(64*a**3*c**3 - 48*a
**2*b**2*c**2 + 12*a*b**4*c - b**6))) + b**2*c*d)/(6*a*b*c*f - 4*a*c**2*e - b**3*f + 2*b*c**2*d)) + (f/(4*c**2
) + sqrt(-(4*a*c - b**2)**3)*(6*a*b*c*f - 4*a*c**2*e - b**3*f + 2*b*c**2*d)/(4*c**2*(64*a**3*c**3 - 48*a**2*b*
*2*c**2 + 12*a*b**4*c - b**6)))*log(x**2 + (-32*a**2*c**3*(f/(4*c**2) + sqrt(-(4*a*c - b**2)**3)*(6*a*b*c*f -
4*a*c**2*e - b**3*f + 2*b*c**2*d)/(4*c**2*(64*a**3*c**3 - 48*a**2*b**2*c**2 + 12*a*b**4*c - b**6))) + 8*a**2*c
*f + 16*a*b**2*c**2*(f/(4*c**2) + sqrt(-(4*a*c - b**2)**3)*(6*a*b*c*f - 4*a*c**2*e - b**3*f + 2*b*c**2*d)/(4*c
**2*(64*a**3*c**3 - 48*a**2*b**2*c**2 + 12*a*b**4*c - b**6))) - a*b**2*f - 2*a*b*c*e - 2*b**4*c*(f/(4*c**2) +
sqrt(-(4*a*c - b**2)**3)*(6*a*b*c*f - 4*a*c**2*e - b**3*f + 2*b*c**2*d)/(4*c**2*(64*a**3*c**3 - 48*a**2*b**2*c
**2 + 12*a*b**4*c - b**6))) + b**2*c*d)/(6*a*b*c*f - 4*a*c**2*e - b**3*f + 2*b*c**2*d)) + (2*a**2*c*f - a*b**2
*f + a*b*c*e - 2*a*c**2*d + x**2*(3*a*b*c*f - 2*a*c**2*e - b**3*f + b**2*c*e - b*c**2*d))/(8*a**2*c**3 - 2*a*b
**2*c**2 + x**4*(8*a*c**4 - 2*b**2*c**3) + x**2*(8*a*b*c**3 - 2*b**3*c**2))

________________________________________________________________________________________

Giac [A]  time = 19.6017, size = 263, normalized size = 1.59 \begin{align*} \frac{{\left (2 \, b c^{2} d - b^{3} f + 6 \, a b c f - 4 \, a c^{2} e\right )} \arctan \left (\frac{2 \, c x^{2} + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{2 \,{\left (b^{2} c^{2} - 4 \, a c^{3}\right )} \sqrt{-b^{2} + 4 \, a c}} + \frac{f \log \left (c x^{4} + b x^{2} + a\right )}{4 \, c^{2}} + \frac{2 \, a c^{2} d + a b^{2} f - 2 \, a^{2} c f - a b c e +{\left (b c^{2} d + b^{3} f - 3 \, a b c f - b^{2} c e + 2 \, a c^{2} e\right )} x^{2}}{2 \,{\left (c x^{4} + b x^{2} + a\right )}{\left (b^{2} - 4 \, a c\right )} c^{2}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(f*x^4+e*x^2+d)/(c*x^4+b*x^2+a)^2,x, algorithm="giac")

[Out]

1/2*(2*b*c^2*d - b^3*f + 6*a*b*c*f - 4*a*c^2*e)*arctan((2*c*x^2 + b)/sqrt(-b^2 + 4*a*c))/((b^2*c^2 - 4*a*c^3)*
sqrt(-b^2 + 4*a*c)) + 1/4*f*log(c*x^4 + b*x^2 + a)/c^2 + 1/2*(2*a*c^2*d + a*b^2*f - 2*a^2*c*f - a*b*c*e + (b*c
^2*d + b^3*f - 3*a*b*c*f - b^2*c*e + 2*a*c^2*e)*x^2)/((c*x^4 + b*x^2 + a)*(b^2 - 4*a*c)*c^2)