Integrand size = 22, antiderivative size = 94 \[ \int \frac {x^m \left (c+d x^2\right )^2}{a+b x^2} \, dx=\frac {d (2 b c-a d) x^{1+m}}{b^2 (1+m)}+\frac {d^2 x^{3+m}}{b (3+m)}+\frac {(b c-a d)^2 x^{1+m} \operatorname {Hypergeometric2F1}\left (1,\frac {1+m}{2},\frac {3+m}{2},-\frac {b x^2}{a}\right )}{a b^2 (1+m)} \] Output:
d*(-a*d+2*b*c)*x^(1+m)/b^2/(1+m)+d^2*x^(3+m)/b/(3+m)+(-a*d+b*c)^2*x^(1+m)* hypergeom([1, 1/2+1/2*m],[3/2+1/2*m],-b*x^2/a)/a/b^2/(1+m)
Result contains higher order function than in optimal. Order 9 vs. order 5 in optimal.
Time = 0.55 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.90 \[ \int \frac {x^m \left (c+d x^2\right )^2}{a+b x^2} \, dx=\frac {x^{1+m} \left (c^2 \Phi \left (-\frac {b x^2}{a},1,\frac {1+m}{2}\right )+d x^2 \left (2 c \Phi \left (-\frac {b x^2}{a},1,\frac {3+m}{2}\right )+d x^2 \Phi \left (-\frac {b x^2}{a},1,\frac {5+m}{2}\right )\right )\right )}{2 a} \] Input:
Integrate[(x^m*(c + d*x^2)^2)/(a + b*x^2),x]
Output:
(x^(1 + m)*(c^2*HurwitzLerchPhi[-((b*x^2)/a), 1, (1 + m)/2] + d*x^2*(2*c*H urwitzLerchPhi[-((b*x^2)/a), 1, (3 + m)/2] + d*x^2*HurwitzLerchPhi[-((b*x^ 2)/a), 1, (5 + m)/2])))/(2*a)
Time = 0.24 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {364, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {x^m \left (c+d x^2\right )^2}{a+b x^2} \, dx\) |
\(\Big \downarrow \) 364 |
\(\displaystyle \int \left (\frac {x^m \left (a^2 d^2-2 a b c d+b^2 c^2\right )}{b^2 \left (a+b x^2\right )}+\frac {d x^m (2 b c-a d)}{b^2}+\frac {d^2 x^{m+2}}{b}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {x^{m+1} (b c-a d)^2 \operatorname {Hypergeometric2F1}\left (1,\frac {m+1}{2},\frac {m+3}{2},-\frac {b x^2}{a}\right )}{a b^2 (m+1)}+\frac {d x^{m+1} (2 b c-a d)}{b^2 (m+1)}+\frac {d^2 x^{m+3}}{b (m+3)}\) |
Input:
Int[(x^m*(c + d*x^2)^2)/(a + b*x^2),x]
Output:
(d*(2*b*c - a*d)*x^(1 + m))/(b^2*(1 + m)) + (d^2*x^(3 + m))/(b*(3 + m)) + ((b*c - a*d)^2*x^(1 + m)*Hypergeometric2F1[1, (1 + m)/2, (3 + m)/2, -((b*x ^2)/a)])/(a*b^2*(1 + m))
Int[(((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_))/((c_) + (d_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*((a + b*x^2)^p/(c + d*x^2)), x], x ] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b*c - a*d, 0] && IGtQ[p, 0] && (In tegerQ[m] || IGtQ[2*(m + 1), 0] || !RationalQ[m])
\[\int \frac {x^{m} \left (x^{2} d +c \right )^{2}}{b \,x^{2}+a}d x\]
Input:
int(x^m*(d*x^2+c)^2/(b*x^2+a),x)
Output:
int(x^m*(d*x^2+c)^2/(b*x^2+a),x)
\[ \int \frac {x^m \left (c+d x^2\right )^2}{a+b x^2} \, dx=\int { \frac {{\left (d x^{2} + c\right )}^{2} x^{m}}{b x^{2} + a} \,d x } \] Input:
integrate(x^m*(d*x^2+c)^2/(b*x^2+a),x, algorithm="fricas")
Output:
integral((d^2*x^4 + 2*c*d*x^2 + c^2)*x^m/(b*x^2 + a), x)
Result contains complex when optimal does not.
Time = 2.66 (sec) , antiderivative size = 292, normalized size of antiderivative = 3.11 \[ \int \frac {x^m \left (c+d x^2\right )^2}{a+b x^2} \, dx=\frac {c^{2} m x^{m + 1} \Phi \left (\frac {b x^{2} e^{i \pi }}{a}, 1, \frac {m}{2} + \frac {1}{2}\right ) \Gamma \left (\frac {m}{2} + \frac {1}{2}\right )}{4 a \Gamma \left (\frac {m}{2} + \frac {3}{2}\right )} + \frac {c^{2} x^{m + 1} \Phi \left (\frac {b x^{2} e^{i \pi }}{a}, 1, \frac {m}{2} + \frac {1}{2}\right ) \Gamma \left (\frac {m}{2} + \frac {1}{2}\right )}{4 a \Gamma \left (\frac {m}{2} + \frac {3}{2}\right )} + \frac {c d m x^{m + 3} \Phi \left (\frac {b x^{2} e^{i \pi }}{a}, 1, \frac {m}{2} + \frac {3}{2}\right ) \Gamma \left (\frac {m}{2} + \frac {3}{2}\right )}{2 a \Gamma \left (\frac {m}{2} + \frac {5}{2}\right )} + \frac {3 c d x^{m + 3} \Phi \left (\frac {b x^{2} e^{i \pi }}{a}, 1, \frac {m}{2} + \frac {3}{2}\right ) \Gamma \left (\frac {m}{2} + \frac {3}{2}\right )}{2 a \Gamma \left (\frac {m}{2} + \frac {5}{2}\right )} + \frac {d^{2} m x^{m + 5} \Phi \left (\frac {b x^{2} e^{i \pi }}{a}, 1, \frac {m}{2} + \frac {5}{2}\right ) \Gamma \left (\frac {m}{2} + \frac {5}{2}\right )}{4 a \Gamma \left (\frac {m}{2} + \frac {7}{2}\right )} + \frac {5 d^{2} x^{m + 5} \Phi \left (\frac {b x^{2} e^{i \pi }}{a}, 1, \frac {m}{2} + \frac {5}{2}\right ) \Gamma \left (\frac {m}{2} + \frac {5}{2}\right )}{4 a \Gamma \left (\frac {m}{2} + \frac {7}{2}\right )} \] Input:
integrate(x**m*(d*x**2+c)**2/(b*x**2+a),x)
Output:
c**2*m*x**(m + 1)*lerchphi(b*x**2*exp_polar(I*pi)/a, 1, m/2 + 1/2)*gamma(m /2 + 1/2)/(4*a*gamma(m/2 + 3/2)) + c**2*x**(m + 1)*lerchphi(b*x**2*exp_pol ar(I*pi)/a, 1, m/2 + 1/2)*gamma(m/2 + 1/2)/(4*a*gamma(m/2 + 3/2)) + c*d*m* x**(m + 3)*lerchphi(b*x**2*exp_polar(I*pi)/a, 1, m/2 + 3/2)*gamma(m/2 + 3/ 2)/(2*a*gamma(m/2 + 5/2)) + 3*c*d*x**(m + 3)*lerchphi(b*x**2*exp_polar(I*p i)/a, 1, m/2 + 3/2)*gamma(m/2 + 3/2)/(2*a*gamma(m/2 + 5/2)) + d**2*m*x**(m + 5)*lerchphi(b*x**2*exp_polar(I*pi)/a, 1, m/2 + 5/2)*gamma(m/2 + 5/2)/(4 *a*gamma(m/2 + 7/2)) + 5*d**2*x**(m + 5)*lerchphi(b*x**2*exp_polar(I*pi)/a , 1, m/2 + 5/2)*gamma(m/2 + 5/2)/(4*a*gamma(m/2 + 7/2))
\[ \int \frac {x^m \left (c+d x^2\right )^2}{a+b x^2} \, dx=\int { \frac {{\left (d x^{2} + c\right )}^{2} x^{m}}{b x^{2} + a} \,d x } \] Input:
integrate(x^m*(d*x^2+c)^2/(b*x^2+a),x, algorithm="maxima")
Output:
integrate((d*x^2 + c)^2*x^m/(b*x^2 + a), x)
\[ \int \frac {x^m \left (c+d x^2\right )^2}{a+b x^2} \, dx=\int { \frac {{\left (d x^{2} + c\right )}^{2} x^{m}}{b x^{2} + a} \,d x } \] Input:
integrate(x^m*(d*x^2+c)^2/(b*x^2+a),x, algorithm="giac")
Output:
integrate((d*x^2 + c)^2*x^m/(b*x^2 + a), x)
Timed out. \[ \int \frac {x^m \left (c+d x^2\right )^2}{a+b x^2} \, dx=\int \frac {x^m\,{\left (d\,x^2+c\right )}^2}{b\,x^2+a} \,d x \] Input:
int((x^m*(c + d*x^2)^2)/(a + b*x^2),x)
Output:
int((x^m*(c + d*x^2)^2)/(a + b*x^2), x)
\[ \int \frac {x^m \left (c+d x^2\right )^2}{a+b x^2} \, dx=\frac {-x^{m} a \,d^{2} m x -3 x^{m} a \,d^{2} x +2 x^{m} b c d m x +6 x^{m} b c d x +x^{m} b \,d^{2} m \,x^{3}+x^{m} b \,d^{2} x^{3}+\left (\int \frac {x^{m}}{b \,x^{2}+a}d x \right ) a^{2} d^{2} m^{2}+4 \left (\int \frac {x^{m}}{b \,x^{2}+a}d x \right ) a^{2} d^{2} m +3 \left (\int \frac {x^{m}}{b \,x^{2}+a}d x \right ) a^{2} d^{2}-2 \left (\int \frac {x^{m}}{b \,x^{2}+a}d x \right ) a b c d \,m^{2}-8 \left (\int \frac {x^{m}}{b \,x^{2}+a}d x \right ) a b c d m -6 \left (\int \frac {x^{m}}{b \,x^{2}+a}d x \right ) a b c d +\left (\int \frac {x^{m}}{b \,x^{2}+a}d x \right ) b^{2} c^{2} m^{2}+4 \left (\int \frac {x^{m}}{b \,x^{2}+a}d x \right ) b^{2} c^{2} m +3 \left (\int \frac {x^{m}}{b \,x^{2}+a}d x \right ) b^{2} c^{2}}{b^{2} \left (m^{2}+4 m +3\right )} \] Input:
int(x^m*(d*x^2+c)^2/(b*x^2+a),x)
Output:
( - x**m*a*d**2*m*x - 3*x**m*a*d**2*x + 2*x**m*b*c*d*m*x + 6*x**m*b*c*d*x + x**m*b*d**2*m*x**3 + x**m*b*d**2*x**3 + int(x**m/(a + b*x**2),x)*a**2*d* *2*m**2 + 4*int(x**m/(a + b*x**2),x)*a**2*d**2*m + 3*int(x**m/(a + b*x**2) ,x)*a**2*d**2 - 2*int(x**m/(a + b*x**2),x)*a*b*c*d*m**2 - 8*int(x**m/(a + b*x**2),x)*a*b*c*d*m - 6*int(x**m/(a + b*x**2),x)*a*b*c*d + int(x**m/(a + b*x**2),x)*b**2*c**2*m**2 + 4*int(x**m/(a + b*x**2),x)*b**2*c**2*m + 3*int (x**m/(a + b*x**2),x)*b**2*c**2)/(b**2*(m**2 + 4*m + 3))