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

Optimal. Leaf size=368 $\frac{(d x)^{m+1} \left (\frac{2 A c-b C}{\sqrt{b^2-4 a c}}+C\right ) \, _2F_1\left (1,\frac{m+1}{2};\frac{m+3}{2};-\frac{2 c x^2}{b-\sqrt{b^2-4 a c}}\right )}{d (m+1) \left (b-\sqrt{b^2-4 a c}\right )}+\frac{(d x)^{m+1} \left (C-\frac{2 A c-b C}{\sqrt{b^2-4 a c}}\right ) \, _2F_1\left (1,\frac{m+1}{2};\frac{m+3}{2};-\frac{2 c x^2}{b+\sqrt{b^2-4 a c}}\right )}{d (m+1) \left (\sqrt{b^2-4 a c}+b\right )}+\frac{2 B c (d x)^{m+2} \, _2F_1\left (1,\frac{m+2}{2};\frac{m+4}{2};-\frac{2 c x^2}{b-\sqrt{b^2-4 a c}}\right )}{d^2 (m+2) \sqrt{b^2-4 a c} \left (b-\sqrt{b^2-4 a c}\right )}-\frac{2 B c (d x)^{m+2} \, _2F_1\left (1,\frac{m+2}{2};\frac{m+4}{2};-\frac{2 c x^2}{b+\sqrt{b^2-4 a c}}\right )}{d^2 (m+2) \sqrt{b^2-4 a c} \left (\sqrt{b^2-4 a c}+b\right )}$

[Out]

((C + (2*A*c - b*C)/Sqrt[b^2 - 4*a*c])*(d*x)^(1 + m)*Hypergeometric2F1[1, (1 + m)/2, (3 + m)/2, (-2*c*x^2)/(b
- Sqrt[b^2 - 4*a*c])])/((b - Sqrt[b^2 - 4*a*c])*d*(1 + m)) + ((C - (2*A*c - b*C)/Sqrt[b^2 - 4*a*c])*(d*x)^(1 +
m)*Hypergeometric2F1[1, (1 + m)/2, (3 + m)/2, (-2*c*x^2)/(b + Sqrt[b^2 - 4*a*c])])/((b + Sqrt[b^2 - 4*a*c])*d
*(1 + m)) + (2*B*c*(d*x)^(2 + m)*Hypergeometric2F1[1, (2 + m)/2, (4 + m)/2, (-2*c*x^2)/(b - Sqrt[b^2 - 4*a*c])
])/(Sqrt[b^2 - 4*a*c]*(b - Sqrt[b^2 - 4*a*c])*d^2*(2 + m)) - (2*B*c*(d*x)^(2 + m)*Hypergeometric2F1[1, (2 + m)
/2, (4 + m)/2, (-2*c*x^2)/(b + Sqrt[b^2 - 4*a*c])])/(Sqrt[b^2 - 4*a*c]*(b + Sqrt[b^2 - 4*a*c])*d^2*(2 + m))

________________________________________________________________________________________

Rubi [A]  time = 0.621653, antiderivative size = 368, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 5, integrand size = 30, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.167, Rules used = {1662, 1285, 364, 12, 1131} $\frac{(d x)^{m+1} \left (\frac{2 A c-b C}{\sqrt{b^2-4 a c}}+C\right ) \, _2F_1\left (1,\frac{m+1}{2};\frac{m+3}{2};-\frac{2 c x^2}{b-\sqrt{b^2-4 a c}}\right )}{d (m+1) \left (b-\sqrt{b^2-4 a c}\right )}+\frac{(d x)^{m+1} \left (C-\frac{2 A c-b C}{\sqrt{b^2-4 a c}}\right ) \, _2F_1\left (1,\frac{m+1}{2};\frac{m+3}{2};-\frac{2 c x^2}{b+\sqrt{b^2-4 a c}}\right )}{d (m+1) \left (\sqrt{b^2-4 a c}+b\right )}+\frac{2 B c (d x)^{m+2} \, _2F_1\left (1,\frac{m+2}{2};\frac{m+4}{2};-\frac{2 c x^2}{b-\sqrt{b^2-4 a c}}\right )}{d^2 (m+2) \sqrt{b^2-4 a c} \left (b-\sqrt{b^2-4 a c}\right )}-\frac{2 B c (d x)^{m+2} \, _2F_1\left (1,\frac{m+2}{2};\frac{m+4}{2};-\frac{2 c x^2}{b+\sqrt{b^2-4 a c}}\right )}{d^2 (m+2) \sqrt{b^2-4 a c} \left (\sqrt{b^2-4 a c}+b\right )}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

((C + (2*A*c - b*C)/Sqrt[b^2 - 4*a*c])*(d*x)^(1 + m)*Hypergeometric2F1[1, (1 + m)/2, (3 + m)/2, (-2*c*x^2)/(b
- Sqrt[b^2 - 4*a*c])])/((b - Sqrt[b^2 - 4*a*c])*d*(1 + m)) + ((C - (2*A*c - b*C)/Sqrt[b^2 - 4*a*c])*(d*x)^(1 +
m)*Hypergeometric2F1[1, (1 + m)/2, (3 + m)/2, (-2*c*x^2)/(b + Sqrt[b^2 - 4*a*c])])/((b + Sqrt[b^2 - 4*a*c])*d
*(1 + m)) + (2*B*c*(d*x)^(2 + m)*Hypergeometric2F1[1, (2 + m)/2, (4 + m)/2, (-2*c*x^2)/(b - Sqrt[b^2 - 4*a*c])
])/(Sqrt[b^2 - 4*a*c]*(b - Sqrt[b^2 - 4*a*c])*d^2*(2 + m)) - (2*B*c*(d*x)^(2 + m)*Hypergeometric2F1[1, (2 + m)
/2, (4 + m)/2, (-2*c*x^2)/(b + Sqrt[b^2 - 4*a*c])])/(Sqrt[b^2 - 4*a*c]*(b + Sqrt[b^2 - 4*a*c])*d^2*(2 + m))

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 1285

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

Rule 364

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a^p*(c*x)^(m + 1)*Hypergeometric2F1[-
p, (m + 1)/n, (m + 1)/n + 1, -((b*x^n)/a)])/(c*(m + 1)), x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[p, 0] &&
(ILtQ[p, 0] || GtQ[a, 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 1131

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

Rubi steps

\begin{align*} \int \frac{(d x)^m \left (A+B x+C x^2\right )}{a+b x^2+c x^4} \, dx &=\frac{\int \frac{B (d x)^{1+m}}{a+b x^2+c x^4} \, dx}{d}+\int \frac{(d x)^m \left (A+C x^2\right )}{a+b x^2+c x^4} \, dx\\ &=\frac{1}{2} \left (C-\frac{2 A c-b C}{\sqrt{b^2-4 a c}}\right ) \int \frac{(d x)^m}{\frac{b}{2}+\frac{1}{2} \sqrt{b^2-4 a c}+c x^2} \, dx+\frac{1}{2} \left (C+\frac{2 A c-b C}{\sqrt{b^2-4 a c}}\right ) \int \frac{(d x)^m}{\frac{b}{2}-\frac{1}{2} \sqrt{b^2-4 a c}+c x^2} \, dx+\frac{B \int \frac{(d x)^{1+m}}{a+b x^2+c x^4} \, dx}{d}\\ &=\frac{\left (C+\frac{2 A c-b C}{\sqrt{b^2-4 a c}}\right ) (d x)^{1+m} \, _2F_1\left (1,\frac{1+m}{2};\frac{3+m}{2};-\frac{2 c x^2}{b-\sqrt{b^2-4 a c}}\right )}{\left (b-\sqrt{b^2-4 a c}\right ) d (1+m)}+\frac{\left (C-\frac{2 A c-b C}{\sqrt{b^2-4 a c}}\right ) (d x)^{1+m} \, _2F_1\left (1,\frac{1+m}{2};\frac{3+m}{2};-\frac{2 c x^2}{b+\sqrt{b^2-4 a c}}\right )}{\left (b+\sqrt{b^2-4 a c}\right ) d (1+m)}+\frac{(B c) \int \frac{(d x)^{1+m}}{\frac{b}{2}-\frac{1}{2} \sqrt{b^2-4 a c}+c x^2} \, dx}{\sqrt{b^2-4 a c} d}-\frac{(B c) \int \frac{(d x)^{1+m}}{\frac{b}{2}+\frac{1}{2} \sqrt{b^2-4 a c}+c x^2} \, dx}{\sqrt{b^2-4 a c} d}\\ &=\frac{\left (C+\frac{2 A c-b C}{\sqrt{b^2-4 a c}}\right ) (d x)^{1+m} \, _2F_1\left (1,\frac{1+m}{2};\frac{3+m}{2};-\frac{2 c x^2}{b-\sqrt{b^2-4 a c}}\right )}{\left (b-\sqrt{b^2-4 a c}\right ) d (1+m)}+\frac{\left (C-\frac{2 A c-b C}{\sqrt{b^2-4 a c}}\right ) (d x)^{1+m} \, _2F_1\left (1,\frac{1+m}{2};\frac{3+m}{2};-\frac{2 c x^2}{b+\sqrt{b^2-4 a c}}\right )}{\left (b+\sqrt{b^2-4 a c}\right ) d (1+m)}+\frac{2 B c (d x)^{2+m} \, _2F_1\left (1,\frac{2+m}{2};\frac{4+m}{2};-\frac{2 c x^2}{b-\sqrt{b^2-4 a c}}\right )}{\sqrt{b^2-4 a c} \left (b-\sqrt{b^2-4 a c}\right ) d^2 (2+m)}-\frac{2 B c (d x)^{2+m} \, _2F_1\left (1,\frac{2+m}{2};\frac{4+m}{2};-\frac{2 c x^2}{b+\sqrt{b^2-4 a c}}\right )}{\sqrt{b^2-4 a c} \left (b+\sqrt{b^2-4 a c}\right ) d^2 (2+m)}\\ \end{align*}

Mathematica [C]  time = 0.22039, size = 168, normalized size = 0.46 $\frac{1}{2} x (d x)^m \left (\frac{A \text{RootSum}\left [\text{\#1}^2 b+\text{\#1}^4 c+a\& ,\frac{\, _2F_1\left (1,m+1;m+2;\frac{x}{\text{\#1}}\right )}{\text{\#1}^2 b+2 a}\& \right ]}{m+1}+x \left (\frac{B \text{RootSum}\left [\text{\#1}^2 b+\text{\#1}^4 c+a\& ,\frac{\, _2F_1\left (1,m+2;m+3;\frac{x}{\text{\#1}}\right )}{\text{\#1}^2 b+2 a}\& \right ]}{m+2}+\frac{C x \text{RootSum}\left [\text{\#1}^2 b+\text{\#1}^4 c+a\& ,\frac{\, _2F_1\left (1,m+3;m+4;\frac{x}{\text{\#1}}\right )}{\text{\#1}^2 b+2 a}\& \right ]}{m+3}\right )\right )$

Warning: Unable to verify antiderivative.

[In]

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

[Out]

(x*(d*x)^m*((A*RootSum[a + b*#1^2 + c*#1^4 & , Hypergeometric2F1[1, 1 + m, 2 + m, x/#1]/(2*a + b*#1^2) & ])/(1
+ m) + x*((B*RootSum[a + b*#1^2 + c*#1^4 & , Hypergeometric2F1[1, 2 + m, 3 + m, x/#1]/(2*a + b*#1^2) & ])/(2
+ m) + (C*x*RootSum[a + b*#1^2 + c*#1^4 & , Hypergeometric2F1[1, 3 + m, 4 + m, x/#1]/(2*a + b*#1^2) & ])/(3 +
m))))/2

________________________________________________________________________________________

Maple [F]  time = 0.043, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( dx \right ) ^{m} \left ( C{x}^{2}+Bx+A \right ) }{c{x}^{4}+b{x}^{2}+a}}\, dx \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (C x^{2} + B x + A\right )} \left (d x\right )^{m}}{c x^{4} + b x^{2} + a}\,{d x} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{{\left (C x^{2} + B x + A\right )} \left (d x\right )^{m}}{c x^{4} + b x^{2} + a}, x\right ) \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (d x\right )^{m} \left (A + B x + C x^{2}\right )}{a + b x^{2} + c x^{4}}\, dx \end{align*}

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

[In]

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

[Out]

Integral((d*x)**m*(A + B*x + C*x**2)/(a + b*x**2 + c*x**4), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (C x^{2} + B x + A\right )} \left (d x\right )^{m}}{c x^{4} + b x^{2} + a}\,{d x} \end{align*}

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

[In]

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

[Out]

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