Integrand size = 28, antiderivative size = 115 \[ \int \frac {x^2 \left (A+B x+C x^2+D x^3\right )}{\left (a+b x^2\right )^2} \, dx=\frac {C x}{b^2}+\frac {D x^2}{2 b^2}+\frac {a (b B-a D)-b (A b-a C) x}{2 b^3 \left (a+b x^2\right )}+\frac {(A b-3 a C) \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 \sqrt {a} b^{5/2}}+\frac {(b B-2 a D) \log \left (a+b x^2\right )}{2 b^3} \] Output:
C*x/b^2+1/2*D*x^2/b^2+1/2*(a*(B*b-D*a)-b*(A*b-C*a)*x)/b^3/(b*x^2+a)+1/2*(A *b-3*C*a)*arctan(b^(1/2)*x/a^(1/2))/a^(1/2)/b^(5/2)+1/2*(B*b-2*D*a)*ln(b*x ^2+a)/b^3
Time = 0.08 (sec) , antiderivative size = 100, normalized size of antiderivative = 0.87 \[ \int \frac {x^2 \left (A+B x+C x^2+D x^3\right )}{\left (a+b x^2\right )^2} \, dx=\frac {2 b C x+b D x^2+\frac {-a^2 D-A b^2 x+a b (B+C x)}{a+b x^2}+\frac {\sqrt {b} (A b-3 a C) \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {a}}+(b B-2 a D) \log \left (a+b x^2\right )}{2 b^3} \] Input:
Integrate[(x^2*(A + B*x + C*x^2 + D*x^3))/(a + b*x^2)^2,x]
Output:
(2*b*C*x + b*D*x^2 + (-(a^2*D) - A*b^2*x + a*b*(B + C*x))/(a + b*x^2) + (S qrt[b]*(A*b - 3*a*C)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/Sqrt[a] + (b*B - 2*a*D)* Log[a + b*x^2])/(2*b^3)
Time = 0.51 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.14, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2335, 25, 2333, 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 (A+B x+C x^2+D x^3\right )}{\left (a+b x^2\right )^2} \, dx\) |
\(\Big \downarrow \) 2335 |
\(\displaystyle -\frac {\int -\frac {x \left (2 a D x^2-(A b-3 a C) x+2 a \left (B-\frac {a D}{b}\right )\right )}{b x^2+a}dx}{2 a b}-\frac {x^2 \left (a \left (B-\frac {a D}{b}\right )-x (A b-a C)\right )}{2 a b \left (a+b x^2\right )}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {x \left (2 a D x^2-(A b-3 a C) x+2 a \left (B-\frac {a D}{b}\right )\right )}{b x^2+a}dx}{2 a b}-\frac {x^2 \left (a \left (B-\frac {a D}{b}\right )-x (A b-a C)\right )}{2 a b \left (a+b x^2\right )}\) |
\(\Big \downarrow \) 2333 |
\(\displaystyle \frac {\int \left (-A+\frac {3 a C}{b}+\frac {2 a D x}{b}+\frac {a (A b-3 a C)+2 a (b B-2 a D) x}{b \left (b x^2+a\right )}\right )dx}{2 a b}-\frac {x^2 \left (a \left (B-\frac {a D}{b}\right )-x (A b-a C)\right )}{2 a b \left (a+b x^2\right )}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {\sqrt {a} (A b-3 a C) \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{b^{3/2}}-x \left (A-\frac {3 a C}{b}\right )+\frac {a (b B-2 a D) \log \left (a+b x^2\right )}{b^2}+\frac {a D x^2}{b}}{2 a b}-\frac {x^2 \left (a \left (B-\frac {a D}{b}\right )-x (A b-a C)\right )}{2 a b \left (a+b x^2\right )}\) |
Input:
Int[(x^2*(A + B*x + C*x^2 + D*x^3))/(a + b*x^2)^2,x]
Output:
-1/2*(x^2*(a*(B - (a*D)/b) - (A*b - a*C)*x))/(a*b*(a + b*x^2)) + (-((A - ( 3*a*C)/b)*x) + (a*D*x^2)/b + (Sqrt[a]*(A*b - 3*a*C)*ArcTan[(Sqrt[b]*x)/Sqr t[a]])/b^(3/2) + (a*(b*B - 2*a*D)*Log[a + b*x^2])/b^2)/(2*a*b)
Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ ExpandIntegrand[(c*x)^m*Pq*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]
Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[ {Q = PolynomialQuotient[Pq, a + b*x^2, x], f = Coeff[PolynomialRemainder[Pq , a + b*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b*x^2, x], x, 1]}, Simp[(c*x)^m*(a + b*x^2)^(p + 1)*((a*g - b*f*x)/(2*a*b*(p + 1))), x] + Simp[c/(2*a*b*(p + 1)) Int[(c*x)^(m - 1)*(a + b*x^2)^(p + 1)*ExpandToSu m[2*a*b*(p + 1)*x*Q - a*g*m + b*f*(m + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && LtQ[p, -1] && GtQ[m, 0]
Time = 0.46 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.90
method | result | size |
default | \(\frac {\frac {1}{2} D x^{2}+C x}{b^{2}}+\frac {\frac {\left (-\frac {A b}{2}+\frac {C a}{2}\right ) x +\frac {a \left (B b -D a \right )}{2 b}}{b \,x^{2}+a}+\frac {\left (2 B b -4 D a \right ) \ln \left (b \,x^{2}+a \right )}{4 b}+\frac {\left (A b -3 C a \right ) \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \sqrt {a b}}}{b^{2}}\) | \(103\) |
Input:
int(x^2*(D*x^3+C*x^2+B*x+A)/(b*x^2+a)^2,x,method=_RETURNVERBOSE)
Output:
1/b^2*(1/2*D*x^2+C*x)+1/b^2*(((-1/2*A*b+1/2*C*a)*x+1/2*a*(B*b-D*a)/b)/(b*x ^2+a)+1/4*(2*B*b-4*D*a)/b*ln(b*x^2+a)+1/2*(A*b-3*C*a)/(a*b)^(1/2)*arctan(b *x/(a*b)^(1/2)))
Time = 0.08 (sec) , antiderivative size = 357, normalized size of antiderivative = 3.10 \[ \int \frac {x^2 \left (A+B x+C x^2+D x^3\right )}{\left (a+b x^2\right )^2} \, dx=\left [\frac {2 \, D a b^{2} x^{4} + 4 \, C a b^{2} x^{3} + 2 \, D a^{2} b x^{2} - 2 \, D a^{3} + 2 \, B a^{2} b + {\left (3 \, C a^{2} - A a b + {\left (3 \, C a b - A b^{2}\right )} x^{2}\right )} \sqrt {-a b} \log \left (\frac {b x^{2} - 2 \, \sqrt {-a b} x - a}{b x^{2} + a}\right ) + 2 \, {\left (3 \, C a^{2} b - A a b^{2}\right )} x - 2 \, {\left (2 \, D a^{3} - B a^{2} b + {\left (2 \, D a^{2} b - B a b^{2}\right )} x^{2}\right )} \log \left (b x^{2} + a\right )}{4 \, {\left (a b^{4} x^{2} + a^{2} b^{3}\right )}}, \frac {D a b^{2} x^{4} + 2 \, C a b^{2} x^{3} + D a^{2} b x^{2} - D a^{3} + B a^{2} b - {\left (3 \, C a^{2} - A a b + {\left (3 \, C a b - A b^{2}\right )} x^{2}\right )} \sqrt {a b} \arctan \left (\frac {\sqrt {a b} x}{a}\right ) + {\left (3 \, C a^{2} b - A a b^{2}\right )} x - {\left (2 \, D a^{3} - B a^{2} b + {\left (2 \, D a^{2} b - B a b^{2}\right )} x^{2}\right )} \log \left (b x^{2} + a\right )}{2 \, {\left (a b^{4} x^{2} + a^{2} b^{3}\right )}}\right ] \] Input:
integrate(x^2*(D*x^3+C*x^2+B*x+A)/(b*x^2+a)^2,x, algorithm="fricas")
Output:
[1/4*(2*D*a*b^2*x^4 + 4*C*a*b^2*x^3 + 2*D*a^2*b*x^2 - 2*D*a^3 + 2*B*a^2*b + (3*C*a^2 - A*a*b + (3*C*a*b - A*b^2)*x^2)*sqrt(-a*b)*log((b*x^2 - 2*sqrt (-a*b)*x - a)/(b*x^2 + a)) + 2*(3*C*a^2*b - A*a*b^2)*x - 2*(2*D*a^3 - B*a^ 2*b + (2*D*a^2*b - B*a*b^2)*x^2)*log(b*x^2 + a))/(a*b^4*x^2 + a^2*b^3), 1/ 2*(D*a*b^2*x^4 + 2*C*a*b^2*x^3 + D*a^2*b*x^2 - D*a^3 + B*a^2*b - (3*C*a^2 - A*a*b + (3*C*a*b - A*b^2)*x^2)*sqrt(a*b)*arctan(sqrt(a*b)*x/a) + (3*C*a^ 2*b - A*a*b^2)*x - (2*D*a^3 - B*a^2*b + (2*D*a^2*b - B*a*b^2)*x^2)*log(b*x ^2 + a))/(a*b^4*x^2 + a^2*b^3)]
Leaf count of result is larger than twice the leaf count of optimal. 284 vs. \(2 (104) = 208\).
Time = 2.18 (sec) , antiderivative size = 284, normalized size of antiderivative = 2.47 \[ \int \frac {x^2 \left (A+B x+C x^2+D x^3\right )}{\left (a+b x^2\right )^2} \, dx=\frac {C x}{b^{2}} + \frac {D x^{2}}{2 b^{2}} + \left (- \frac {- B b + 2 D a}{2 b^{3}} - \frac {\sqrt {- a b^{7}} \left (- A b + 3 C a\right )}{4 a b^{6}}\right ) \log {\left (x + \frac {2 B a b - 4 D a^{2} - 4 a b^{3} \left (- \frac {- B b + 2 D a}{2 b^{3}} - \frac {\sqrt {- a b^{7}} \left (- A b + 3 C a\right )}{4 a b^{6}}\right )}{- A b^{2} + 3 C a b} \right )} + \left (- \frac {- B b + 2 D a}{2 b^{3}} + \frac {\sqrt {- a b^{7}} \left (- A b + 3 C a\right )}{4 a b^{6}}\right ) \log {\left (x + \frac {2 B a b - 4 D a^{2} - 4 a b^{3} \left (- \frac {- B b + 2 D a}{2 b^{3}} + \frac {\sqrt {- a b^{7}} \left (- A b + 3 C a\right )}{4 a b^{6}}\right )}{- A b^{2} + 3 C a b} \right )} + \frac {B a b - D a^{2} + x \left (- A b^{2} + C a b\right )}{2 a b^{3} + 2 b^{4} x^{2}} \] Input:
integrate(x**2*(D*x**3+C*x**2+B*x+A)/(b*x**2+a)**2,x)
Output:
C*x/b**2 + D*x**2/(2*b**2) + (-(-B*b + 2*D*a)/(2*b**3) - sqrt(-a*b**7)*(-A *b + 3*C*a)/(4*a*b**6))*log(x + (2*B*a*b - 4*D*a**2 - 4*a*b**3*(-(-B*b + 2 *D*a)/(2*b**3) - sqrt(-a*b**7)*(-A*b + 3*C*a)/(4*a*b**6)))/(-A*b**2 + 3*C* a*b)) + (-(-B*b + 2*D*a)/(2*b**3) + sqrt(-a*b**7)*(-A*b + 3*C*a)/(4*a*b**6 ))*log(x + (2*B*a*b - 4*D*a**2 - 4*a*b**3*(-(-B*b + 2*D*a)/(2*b**3) + sqrt (-a*b**7)*(-A*b + 3*C*a)/(4*a*b**6)))/(-A*b**2 + 3*C*a*b)) + (B*a*b - D*a* *2 + x*(-A*b**2 + C*a*b))/(2*a*b**3 + 2*b**4*x**2)
Time = 0.11 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.94 \[ \int \frac {x^2 \left (A+B x+C x^2+D x^3\right )}{\left (a+b x^2\right )^2} \, dx=-\frac {D a^{2} - B a b - {\left (C a b - A b^{2}\right )} x}{2 \, {\left (b^{4} x^{2} + a b^{3}\right )}} - \frac {{\left (3 \, C a - A b\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} b^{2}} + \frac {D x^{2} + 2 \, C x}{2 \, b^{2}} - \frac {{\left (2 \, D a - B b\right )} \log \left (b x^{2} + a\right )}{2 \, b^{3}} \] Input:
integrate(x^2*(D*x^3+C*x^2+B*x+A)/(b*x^2+a)^2,x, algorithm="maxima")
Output:
-1/2*(D*a^2 - B*a*b - (C*a*b - A*b^2)*x)/(b^4*x^2 + a*b^3) - 1/2*(3*C*a - A*b)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*b^2) + 1/2*(D*x^2 + 2*C*x)/b^2 - 1/2 *(2*D*a - B*b)*log(b*x^2 + a)/b^3
Time = 0.12 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.97 \[ \int \frac {x^2 \left (A+B x+C x^2+D x^3\right )}{\left (a+b x^2\right )^2} \, dx=-\frac {{\left (3 \, C a - A b\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} b^{2}} - \frac {{\left (2 \, D a - B b\right )} \log \left (b x^{2} + a\right )}{2 \, b^{3}} + \frac {D b^{2} x^{2} + 2 \, C b^{2} x}{2 \, b^{4}} - \frac {D a^{2} - B a b - {\left (C a b - A b^{2}\right )} x}{2 \, {\left (b x^{2} + a\right )} b^{3}} \] Input:
integrate(x^2*(D*x^3+C*x^2+B*x+A)/(b*x^2+a)^2,x, algorithm="giac")
Output:
-1/2*(3*C*a - A*b)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*b^2) - 1/2*(2*D*a - B* b)*log(b*x^2 + a)/b^3 + 1/2*(D*b^2*x^2 + 2*C*b^2*x)/b^4 - 1/2*(D*a^2 - B*a *b - (C*a*b - A*b^2)*x)/((b*x^2 + a)*b^3)
Time = 2.35 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.32 \[ \int \frac {x^2 \left (A+B x+C x^2+D x^3\right )}{\left (a+b x^2\right )^2} \, dx=\frac {B\,\ln \left (b\,x^2+a\right )}{2\,b^2}+\frac {x^2\,D}{2\,b^2}+\frac {C\,x}{b^2}-\frac {a^2\,D}{2\,b^3\,\left (b\,x^2+a\right )}+\frac {B\,a}{2\,b^2\,\left (b\,x^2+a\right )}-\frac {A\,x}{2\,b\,\left (b\,x^2+a\right )}+\frac {C\,a\,x}{2\,\left (b^3\,x^2+a\,b^2\right )}+\frac {A\,\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )}{2\,\sqrt {a}\,b^{3/2}}-\frac {3\,C\,\sqrt {a}\,\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )}{2\,b^{5/2}}-\frac {a\,\ln \left (b\,x^2+a\right )\,D}{b^3} \] Input:
int((x^2*(A + B*x + C*x^2 + x^3*D))/(a + b*x^2)^2,x)
Output:
(B*log(a + b*x^2))/(2*b^2) + (x^2*D)/(2*b^2) + (C*x)/b^2 - (a^2*D)/(2*b^3* (a + b*x^2)) + (B*a)/(2*b^2*(a + b*x^2)) - (A*x)/(2*b*(a + b*x^2)) + (C*a* x)/(2*(a*b^2 + b^3*x^2)) + (A*atan((b^(1/2)*x)/a^(1/2)))/(2*a^(1/2)*b^(3/2 )) - (3*C*a^(1/2)*atan((b^(1/2)*x)/a^(1/2)))/(2*b^(5/2)) - (a*log(a + b*x^ 2)*D)/b^3
Time = 0.15 (sec) , antiderivative size = 204, normalized size of antiderivative = 1.77 \[ \int \frac {x^2 \left (A+B x+C x^2+D x^3\right )}{\left (a+b x^2\right )^2} \, dx=\frac {\sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {b x}{\sqrt {b}\, \sqrt {a}}\right ) a b -3 \sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {b x}{\sqrt {b}\, \sqrt {a}}\right ) a c +\sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {b x}{\sqrt {b}\, \sqrt {a}}\right ) b^{2} x^{2}-3 \sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {b x}{\sqrt {b}\, \sqrt {a}}\right ) b c \,x^{2}-2 \,\mathrm {log}\left (b \,x^{2}+a \right ) a^{2} d +\mathrm {log}\left (b \,x^{2}+a \right ) a \,b^{2}-2 \,\mathrm {log}\left (b \,x^{2}+a \right ) a b d \,x^{2}+\mathrm {log}\left (b \,x^{2}+a \right ) b^{3} x^{2}-a \,b^{2} x +3 a b c x +2 a b d \,x^{2}-b^{3} x^{2}+2 b^{2} c \,x^{3}+b^{2} d \,x^{4}}{2 b^{3} \left (b \,x^{2}+a \right )} \] Input:
int(x^2*(D*x^3+C*x^2+B*x+A)/(b*x^2+a)^2,x)
Output:
(sqrt(b)*sqrt(a)*atan((b*x)/(sqrt(b)*sqrt(a)))*a*b - 3*sqrt(b)*sqrt(a)*ata n((b*x)/(sqrt(b)*sqrt(a)))*a*c + sqrt(b)*sqrt(a)*atan((b*x)/(sqrt(b)*sqrt( a)))*b**2*x**2 - 3*sqrt(b)*sqrt(a)*atan((b*x)/(sqrt(b)*sqrt(a)))*b*c*x**2 - 2*log(a + b*x**2)*a**2*d + log(a + b*x**2)*a*b**2 - 2*log(a + b*x**2)*a* b*d*x**2 + log(a + b*x**2)*b**3*x**2 - a*b**2*x + 3*a*b*c*x + 2*a*b*d*x**2 - b**3*x**2 + 2*b**2*c*x**3 + b**2*d*x**4)/(2*b**3*(a + b*x**2))