### 3.32 $$\int \frac{x (A+B x+C x^2)}{(a+b x^2+c x^4)^2} \, dx$$

Optimal. Leaf size=317 $-\frac{-2 a C+x^2 (2 A c-b C)+A b}{2 \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{(2 A c-b C) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{\left (b^2-4 a c\right )^{3/2}}-\frac{B x \left (b+2 c x^2\right )}{2 \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{B \sqrt{c} \left (2 b-\sqrt{b^2-4 a c}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{2} \left (b^2-4 a c\right )^{3/2} \sqrt{b-\sqrt{b^2-4 a c}}}-\frac{B \sqrt{c} \left (\sqrt{b^2-4 a c}+2 b\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{\sqrt{2} \left (b^2-4 a c\right )^{3/2} \sqrt{\sqrt{b^2-4 a c}+b}}$

[Out]

-(B*x*(b + 2*c*x^2))/(2*(b^2 - 4*a*c)*(a + b*x^2 + c*x^4)) - (A*b - 2*a*C + (2*A*c - b*C)*x^2)/(2*(b^2 - 4*a*c
)*(a + b*x^2 + c*x^4)) + (B*Sqrt[c]*(2*b - Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[b^2 - 4
*a*c]]])/(Sqrt[2]*(b^2 - 4*a*c)^(3/2)*Sqrt[b - Sqrt[b^2 - 4*a*c]]) - (B*Sqrt[c]*(2*b + Sqrt[b^2 - 4*a*c])*ArcT
an[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*(b^2 - 4*a*c)^(3/2)*Sqrt[b + Sqrt[b^2 - 4*a*c]])
+ ((2*A*c - b*C)*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 - 4*a*c]])/(b^2 - 4*a*c)^(3/2)

________________________________________________________________________________________

Rubi [A]  time = 0.41535, antiderivative size = 317, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 9, integrand size = 26, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.346, Rules used = {1662, 1247, 638, 618, 206, 12, 1119, 1166, 205} $-\frac{-2 a C+x^2 (2 A c-b C)+A b}{2 \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{(2 A c-b C) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{\left (b^2-4 a c\right )^{3/2}}-\frac{B x \left (b+2 c x^2\right )}{2 \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{B \sqrt{c} \left (2 b-\sqrt{b^2-4 a c}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{2} \left (b^2-4 a c\right )^{3/2} \sqrt{b-\sqrt{b^2-4 a c}}}-\frac{B \sqrt{c} \left (\sqrt{b^2-4 a c}+2 b\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{\sqrt{2} \left (b^2-4 a c\right )^{3/2} \sqrt{\sqrt{b^2-4 a c}+b}}$

Antiderivative was successfully veriﬁed.

[In]

Int[(x*(A + B*x + C*x^2))/(a + b*x^2 + c*x^4)^2,x]

[Out]

-(B*x*(b + 2*c*x^2))/(2*(b^2 - 4*a*c)*(a + b*x^2 + c*x^4)) - (A*b - 2*a*C + (2*A*c - b*C)*x^2)/(2*(b^2 - 4*a*c
)*(a + b*x^2 + c*x^4)) + (B*Sqrt[c]*(2*b - Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[b^2 - 4
*a*c]]])/(Sqrt[2]*(b^2 - 4*a*c)^(3/2)*Sqrt[b - Sqrt[b^2 - 4*a*c]]) - (B*Sqrt[c]*(2*b + Sqrt[b^2 - 4*a*c])*ArcT
an[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*(b^2 - 4*a*c)^(3/2)*Sqrt[b + Sqrt[b^2 - 4*a*c]])
+ ((2*A*c - b*C)*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 - 4*a*c]])/(b^2 - 4*a*c)^(3/2)

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]

Rule 1247

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

Rule 638

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

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 12

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

Rule 1119

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

Rule 1166

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

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

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

Mathematica [A]  time = 1.41088, size = 335, normalized size = 1.06 $\frac{1}{2} \left (\frac{2 a C-A \left (b+2 c x^2\right )+x \left (-b B+b C x-2 B c x^2\right )}{\left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{(b C-2 A c) \log \left (\sqrt{b^2-4 a c}-b-2 c x^2\right )}{\left (b^2-4 a c\right )^{3/2}}+\frac{(2 A c-b C) \log \left (\sqrt{b^2-4 a c}+b+2 c x^2\right )}{\left (b^2-4 a c\right )^{3/2}}-\frac{\sqrt{2} B \sqrt{c} \left (\sqrt{b^2-4 a c}-2 b\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\left (b^2-4 a c\right )^{3/2} \sqrt{b-\sqrt{b^2-4 a c}}}-\frac{\sqrt{2} B \sqrt{c} \left (\sqrt{b^2-4 a c}+2 b\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{\left (b^2-4 a c\right )^{3/2} \sqrt{\sqrt{b^2-4 a c}+b}}\right )$

Antiderivative was successfully veriﬁed.

[In]

Integrate[(x*(A + B*x + C*x^2))/(a + b*x^2 + c*x^4)^2,x]

[Out]

((2*a*C - A*(b + 2*c*x^2) + x*(-(b*B) + b*C*x - 2*B*c*x^2))/((b^2 - 4*a*c)*(a + b*x^2 + c*x^4)) - (Sqrt[2]*B*S
qrt[c]*(-2*b + Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[b^2 - 4*a*c]]])/((b^2 - 4*a*c)^(3/2
)*Sqrt[b - Sqrt[b^2 - 4*a*c]]) - (Sqrt[2]*B*Sqrt[c]*(2*b + Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[
b + Sqrt[b^2 - 4*a*c]]])/((b^2 - 4*a*c)^(3/2)*Sqrt[b + Sqrt[b^2 - 4*a*c]]) + ((-2*A*c + b*C)*Log[-b + Sqrt[b^2
- 4*a*c] - 2*c*x^2])/(b^2 - 4*a*c)^(3/2) + ((2*A*c - b*C)*Log[b + Sqrt[b^2 - 4*a*c] + 2*c*x^2])/(b^2 - 4*a*c)
^(3/2))/2

________________________________________________________________________________________

Maple [B]  time = 0.117, size = 1344, normalized size = 4.2 \begin{align*} \text{result too large to display} \end{align*}

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

[In]

int(x*(C*x^2+B*x+A)/(c*x^4+b*x^2+a)^2,x)

[Out]

-1/2/(4*a*c-b^2)^2/(x^2+1/2*(-4*a*c+b^2)^(1/2)/c+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________________________________________________________

Maxima [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

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

[In]

integrate(x*(C*x^2+B*x+A)/(c*x^4+b*x^2+a)^2,x, algorithm="maxima")

[Out]

Timed out

________________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

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

[In]

integrate(x*(C*x^2+B*x+A)/(c*x^4+b*x^2+a)^2,x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

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

[In]

integrate(x*(C*x**2+B*x+A)/(c*x**4+b*x**2+a)**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

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

[In]

integrate(x*(C*x^2+B*x+A)/(c*x^4+b*x^2+a)^2,x, algorithm="giac")

[Out]

Timed out