Integrand size = 22, antiderivative size = 84 \[ \int \frac {x^2 \left (c+d x^2\right )^2}{a+b x^2} \, dx=\frac {(b c-a d)^2 x}{b^3}+\frac {d (2 b c-a d) x^3}{3 b^2}+\frac {d^2 x^5}{5 b}-\frac {\sqrt {a} (b c-a d)^2 \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{b^{7/2}} \] Output:
(-a*d+b*c)^2*x/b^3+1/3*d*(-a*d+2*b*c)*x^3/b^2+1/5*d^2*x^5/b-a^(1/2)*(-a*d+ b*c)^2*arctan(b^(1/2)*x/a^(1/2))/b^(7/2)
Time = 0.05 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.00 \[ \int \frac {x^2 \left (c+d x^2\right )^2}{a+b x^2} \, dx=\frac {(b c-a d)^2 x}{b^3}+\frac {d (2 b c-a d) x^3}{3 b^2}+\frac {d^2 x^5}{5 b}-\frac {\sqrt {a} (-b c+a d)^2 \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{b^{7/2}} \] Input:
Integrate[(x^2*(c + d*x^2)^2)/(a + b*x^2),x]
Output:
((b*c - a*d)^2*x)/b^3 + (d*(2*b*c - a*d)*x^3)/(3*b^2) + (d^2*x^5)/(5*b) - (Sqrt[a]*(-(b*c) + a*d)^2*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/b^(7/2)
Time = 0.23 (sec) , antiderivative size = 84, 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^2 \left (c+d x^2\right )^2}{a+b x^2} \, dx\) |
\(\Big \downarrow \) 364 |
\(\displaystyle \int \left (\frac {a^3 \left (-d^2\right )+2 a^2 b c d-a b^2 c^2}{b^3 \left (a+b x^2\right )}+\frac {(b c-a d)^2}{b^3}+\frac {d x^2 (2 b c-a d)}{b^2}+\frac {d^2 x^4}{b}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {\sqrt {a} \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) (b c-a d)^2}{b^{7/2}}+\frac {x (b c-a d)^2}{b^3}+\frac {d x^3 (2 b c-a d)}{3 b^2}+\frac {d^2 x^5}{5 b}\) |
Input:
Int[(x^2*(c + d*x^2)^2)/(a + b*x^2),x]
Output:
((b*c - a*d)^2*x)/b^3 + (d*(2*b*c - a*d)*x^3)/(3*b^2) + (d^2*x^5)/(5*b) - (Sqrt[a]*(b*c - a*d)^2*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/b^(7/2)
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])
Time = 0.50 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.21
method | result | size |
default | \(\frac {\frac {1}{5} b^{2} d^{2} x^{5}-\frac {1}{3} x^{3} a b \,d^{2}+\frac {2}{3} x^{3} b^{2} c d +a^{2} d^{2} x -2 a b c d x +b^{2} c^{2} x}{b^{3}}-\frac {a \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{b^{3} \sqrt {a b}}\) | \(102\) |
risch | \(\frac {d^{2} x^{5}}{5 b}-\frac {x^{3} a \,d^{2}}{3 b^{2}}+\frac {2 x^{3} c d}{3 b}+\frac {a^{2} d^{2} x}{b^{3}}-\frac {2 a c d x}{b^{2}}+\frac {c^{2} x}{b}+\frac {\sqrt {-a b}\, \ln \left (-\sqrt {-a b}\, x -a \right ) a^{2} d^{2}}{2 b^{4}}-\frac {\sqrt {-a b}\, \ln \left (-\sqrt {-a b}\, x -a \right ) a c d}{b^{3}}+\frac {\sqrt {-a b}\, \ln \left (-\sqrt {-a b}\, x -a \right ) c^{2}}{2 b^{2}}-\frac {\sqrt {-a b}\, \ln \left (\sqrt {-a b}\, x -a \right ) a^{2} d^{2}}{2 b^{4}}+\frac {\sqrt {-a b}\, \ln \left (\sqrt {-a b}\, x -a \right ) a c d}{b^{3}}-\frac {\sqrt {-a b}\, \ln \left (\sqrt {-a b}\, x -a \right ) c^{2}}{2 b^{2}}\) | \(233\) |
Input:
int(x^2*(d*x^2+c)^2/(b*x^2+a),x,method=_RETURNVERBOSE)
Output:
1/b^3*(1/5*b^2*d^2*x^5-1/3*x^3*a*b*d^2+2/3*x^3*b^2*c*d+a^2*d^2*x-2*a*b*c*d *x+b^2*c^2*x)-a*(a^2*d^2-2*a*b*c*d+b^2*c^2)/b^3/(a*b)^(1/2)*arctan(b*x/(a* b)^(1/2))
Time = 0.08 (sec) , antiderivative size = 230, normalized size of antiderivative = 2.74 \[ \int \frac {x^2 \left (c+d x^2\right )^2}{a+b x^2} \, dx=\left [\frac {6 \, b^{2} d^{2} x^{5} + 10 \, {\left (2 \, b^{2} c d - a b d^{2}\right )} x^{3} + 15 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt {-\frac {a}{b}} \log \left (\frac {b x^{2} - 2 \, b x \sqrt {-\frac {a}{b}} - a}{b x^{2} + a}\right ) + 30 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} x}{30 \, b^{3}}, \frac {3 \, b^{2} d^{2} x^{5} + 5 \, {\left (2 \, b^{2} c d - a b d^{2}\right )} x^{3} - 15 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt {\frac {a}{b}} \arctan \left (\frac {b x \sqrt {\frac {a}{b}}}{a}\right ) + 15 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} x}{15 \, b^{3}}\right ] \] Input:
integrate(x^2*(d*x^2+c)^2/(b*x^2+a),x, algorithm="fricas")
Output:
[1/30*(6*b^2*d^2*x^5 + 10*(2*b^2*c*d - a*b*d^2)*x^3 + 15*(b^2*c^2 - 2*a*b* c*d + a^2*d^2)*sqrt(-a/b)*log((b*x^2 - 2*b*x*sqrt(-a/b) - a)/(b*x^2 + a)) + 30*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*x)/b^3, 1/15*(3*b^2*d^2*x^5 + 5*(2*b^ 2*c*d - a*b*d^2)*x^3 - 15*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*sqrt(a/b)*arctan (b*x*sqrt(a/b)/a) + 15*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*x)/b^3]
Leaf count of result is larger than twice the leaf count of optimal. 194 vs. \(2 (73) = 146\).
Time = 0.24 (sec) , antiderivative size = 194, normalized size of antiderivative = 2.31 \[ \int \frac {x^2 \left (c+d x^2\right )^2}{a+b x^2} \, dx=x^{3} \left (- \frac {a d^{2}}{3 b^{2}} + \frac {2 c d}{3 b}\right ) + x \left (\frac {a^{2} d^{2}}{b^{3}} - \frac {2 a c d}{b^{2}} + \frac {c^{2}}{b}\right ) + \frac {\sqrt {- \frac {a}{b^{7}}} \left (a d - b c\right )^{2} \log {\left (- \frac {b^{3} \sqrt {- \frac {a}{b^{7}}} \left (a d - b c\right )^{2}}{a^{2} d^{2} - 2 a b c d + b^{2} c^{2}} + x \right )}}{2} - \frac {\sqrt {- \frac {a}{b^{7}}} \left (a d - b c\right )^{2} \log {\left (\frac {b^{3} \sqrt {- \frac {a}{b^{7}}} \left (a d - b c\right )^{2}}{a^{2} d^{2} - 2 a b c d + b^{2} c^{2}} + x \right )}}{2} + \frac {d^{2} x^{5}}{5 b} \] Input:
integrate(x**2*(d*x**2+c)**2/(b*x**2+a),x)
Output:
x**3*(-a*d**2/(3*b**2) + 2*c*d/(3*b)) + x*(a**2*d**2/b**3 - 2*a*c*d/b**2 + c**2/b) + sqrt(-a/b**7)*(a*d - b*c)**2*log(-b**3*sqrt(-a/b**7)*(a*d - b*c )**2/(a**2*d**2 - 2*a*b*c*d + b**2*c**2) + x)/2 - sqrt(-a/b**7)*(a*d - b*c )**2*log(b**3*sqrt(-a/b**7)*(a*d - b*c)**2/(a**2*d**2 - 2*a*b*c*d + b**2*c **2) + x)/2 + d**2*x**5/(5*b)
Time = 0.14 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.25 \[ \int \frac {x^2 \left (c+d x^2\right )^2}{a+b x^2} \, dx=-\frac {{\left (a b^{2} c^{2} - 2 \, a^{2} b c d + a^{3} d^{2}\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} b^{3}} + \frac {3 \, b^{2} d^{2} x^{5} + 5 \, {\left (2 \, b^{2} c d - a b d^{2}\right )} x^{3} + 15 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} x}{15 \, b^{3}} \] Input:
integrate(x^2*(d*x^2+c)^2/(b*x^2+a),x, algorithm="maxima")
Output:
-(a*b^2*c^2 - 2*a^2*b*c*d + a^3*d^2)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*b^3) + 1/15*(3*b^2*d^2*x^5 + 5*(2*b^2*c*d - a*b*d^2)*x^3 + 15*(b^2*c^2 - 2*a*b *c*d + a^2*d^2)*x)/b^3
Time = 0.12 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.35 \[ \int \frac {x^2 \left (c+d x^2\right )^2}{a+b x^2} \, dx=-\frac {{\left (a b^{2} c^{2} - 2 \, a^{2} b c d + a^{3} d^{2}\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} b^{3}} + \frac {3 \, b^{4} d^{2} x^{5} + 10 \, b^{4} c d x^{3} - 5 \, a b^{3} d^{2} x^{3} + 15 \, b^{4} c^{2} x - 30 \, a b^{3} c d x + 15 \, a^{2} b^{2} d^{2} x}{15 \, b^{5}} \] Input:
integrate(x^2*(d*x^2+c)^2/(b*x^2+a),x, algorithm="giac")
Output:
-(a*b^2*c^2 - 2*a^2*b*c*d + a^3*d^2)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*b^3) + 1/15*(3*b^4*d^2*x^5 + 10*b^4*c*d*x^3 - 5*a*b^3*d^2*x^3 + 15*b^4*c^2*x - 30*a*b^3*c*d*x + 15*a^2*b^2*d^2*x)/b^5
Time = 0.07 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.52 \[ \int \frac {x^2 \left (c+d x^2\right )^2}{a+b x^2} \, dx=x\,\left (\frac {c^2}{b}+\frac {a\,\left (\frac {a\,d^2}{b^2}-\frac {2\,c\,d}{b}\right )}{b}\right )-x^3\,\left (\frac {a\,d^2}{3\,b^2}-\frac {2\,c\,d}{3\,b}\right )+\frac {d^2\,x^5}{5\,b}-\frac {\sqrt {a}\,\mathrm {atan}\left (\frac {\sqrt {a}\,\sqrt {b}\,x\,{\left (a\,d-b\,c\right )}^2}{a^3\,d^2-2\,a^2\,b\,c\,d+a\,b^2\,c^2}\right )\,{\left (a\,d-b\,c\right )}^2}{b^{7/2}} \] Input:
int((x^2*(c + d*x^2)^2)/(a + b*x^2),x)
Output:
x*(c^2/b + (a*((a*d^2)/b^2 - (2*c*d)/b))/b) - x^3*((a*d^2)/(3*b^2) - (2*c* d)/(3*b)) + (d^2*x^5)/(5*b) - (a^(1/2)*atan((a^(1/2)*b^(1/2)*x*(a*d - b*c) ^2)/(a^3*d^2 + a*b^2*c^2 - 2*a^2*b*c*d))*(a*d - b*c)^2)/b^(7/2)
Time = 0.19 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.63 \[ \int \frac {x^2 \left (c+d x^2\right )^2}{a+b x^2} \, dx=\frac {-15 \sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {b x}{\sqrt {b}\, \sqrt {a}}\right ) a^{2} d^{2}+30 \sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {b x}{\sqrt {b}\, \sqrt {a}}\right ) a b c d -15 \sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {b x}{\sqrt {b}\, \sqrt {a}}\right ) b^{2} c^{2}+15 a^{2} b \,d^{2} x -30 a \,b^{2} c d x -5 a \,b^{2} d^{2} x^{3}+15 b^{3} c^{2} x +10 b^{3} c d \,x^{3}+3 b^{3} d^{2} x^{5}}{15 b^{4}} \] Input:
int(x^2*(d*x^2+c)^2/(b*x^2+a),x)
Output:
( - 15*sqrt(b)*sqrt(a)*atan((b*x)/(sqrt(b)*sqrt(a)))*a**2*d**2 + 30*sqrt(b )*sqrt(a)*atan((b*x)/(sqrt(b)*sqrt(a)))*a*b*c*d - 15*sqrt(b)*sqrt(a)*atan( (b*x)/(sqrt(b)*sqrt(a)))*b**2*c**2 + 15*a**2*b*d**2*x - 30*a*b**2*c*d*x - 5*a*b**2*d**2*x**3 + 15*b**3*c**2*x + 10*b**3*c*d*x**3 + 3*b**3*d**2*x**5) /(15*b**4)