Integrand size = 20, antiderivative size = 98 \[ \int \frac {x^2 (c+d x)^2}{\left (a+b x^2\right )^3} \, dx=-\frac {x (c+d x)^2}{4 b \left (a+b x^2\right )^2}-\frac {(3 a d-b c x) (c+d x)}{8 a b^2 \left (a+b x^2\right )}+\frac {\left (b c^2+3 a d^2\right ) \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{8 a^{3/2} b^{5/2}} \] Output:
-1/4*x*(d*x+c)^2/b/(b*x^2+a)^2-1/8*(-b*c*x+3*a*d)*(d*x+c)/a/b^2/(b*x^2+a)+ 1/8*(3*a*d^2+b*c^2)*arctan(b^(1/2)*x/a^(1/2))/a^(3/2)/b^(5/2)
Time = 0.08 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.08 \[ \int \frac {x^2 (c+d x)^2}{\left (a+b x^2\right )^3} \, dx=\frac {\frac {\sqrt {b} \left (b^2 c^2 x^3-a^2 d (4 c+3 d x)-a b x \left (c^2+8 c d x+5 d^2 x^2\right )\right )}{a \left (a+b x^2\right )^2}+\frac {\left (b c^2+3 a d^2\right ) \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{a^{3/2}}}{8 b^{5/2}} \] Input:
Integrate[(x^2*(c + d*x)^2)/(a + b*x^2)^3,x]
Output:
((Sqrt[b]*(b^2*c^2*x^3 - a^2*d*(4*c + 3*d*x) - a*b*x*(c^2 + 8*c*d*x + 5*d^ 2*x^2)))/(a*(a + b*x^2)^2) + ((b*c^2 + 3*a*d^2)*ArcTan[(Sqrt[b]*x)/Sqrt[a] ])/a^(3/2))/(8*b^(5/2))
Time = 0.39 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.22, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {531, 25, 27, 675, 218}
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 (c+d x)^2}{\left (a+b x^2\right )^3} \, dx\) |
\(\Big \downarrow \) 531 |
\(\displaystyle -\frac {\int -\frac {a (c+d x) (c+3 d x)}{\left (b x^2+a\right )^2}dx}{4 a b}-\frac {x (c+d x)^2}{4 b \left (a+b x^2\right )^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {a (c+d x) (c+3 d x)}{\left (b x^2+a\right )^2}dx}{4 a b}-\frac {x (c+d x)^2}{4 b \left (a+b x^2\right )^2}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int \frac {(c+d x) (c+3 d x)}{\left (b x^2+a\right )^2}dx}{4 b}-\frac {x (c+d x)^2}{4 b \left (a+b x^2\right )^2}\) |
\(\Big \downarrow \) 675 |
\(\displaystyle \frac {\frac {\left (3 a d^2+b c^2\right ) \int \frac {1}{b x^2+a}dx}{2 a b}+\frac {x \left (b c^2-3 a d^2\right )}{2 a b \left (a+b x^2\right )}-\frac {2 c d}{b \left (a+b x^2\right )}}{4 b}-\frac {x (c+d x)^2}{4 b \left (a+b x^2\right )^2}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {\frac {\arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \left (3 a d^2+b c^2\right )}{2 a^{3/2} b^{3/2}}+\frac {x \left (b c^2-3 a d^2\right )}{2 a b \left (a+b x^2\right )}-\frac {2 c d}{b \left (a+b x^2\right )}}{4 b}-\frac {x (c+d x)^2}{4 b \left (a+b x^2\right )^2}\) |
Input:
Int[(x^2*(c + d*x)^2)/(a + b*x^2)^3,x]
Output:
-1/4*(x*(c + d*x)^2)/(b*(a + b*x^2)^2) + ((-2*c*d)/(b*(a + b*x^2)) + ((b*c ^2 - 3*a*d^2)*x)/(2*a*b*(a + b*x^2)) + ((b*c^2 + 3*a*d^2)*ArcTan[(Sqrt[b]* x)/Sqrt[a]])/(2*a^(3/2)*b^(3/2)))/(4*b)
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[(x_)^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symb ol] :> With[{Qx = PolynomialQuotient[x^m, a + b*x^2, x], e = Coeff[Polynomi alRemainder[x^m, a + b*x^2, x], x, 0], f = Coeff[PolynomialRemainder[x^m, a + b*x^2, x], x, 1]}, Simp[(c + d*x)^n*(a*f - b*e*x)*((a + b*x^2)^(p + 1)/( 2*a*b*(p + 1))), x] + Simp[1/(2*a*b*(p + 1)) Int[(c + d*x)^(n - 1)*(a + b *x^2)^(p + 1)*ExpandToSum[2*a*b*(p + 1)*(c + d*x)*Qx - a*d*f*n + b*c*e*(2*p + 3) + b*d*e*(n + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, b, c, d}, x] && IGt Q[n, 0] && IGtQ[m, 0] && LtQ[p, -1] && GtQ[n, 1] && IntegerQ[2*p]
Int[((d_) + (e_.)*(x_))*((f_) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x_S ymbol] :> Simp[a*(e*f + d*g)*((a + c*x^2)^(p + 1)/(2*a*c*(p + 1))), x] + (- Simp[(c*d*f - a*e*g)*x*((a + c*x^2)^(p + 1)/(2*a*c*(p + 1))), x] - Simp[(a* e*g - c*d*f*(2*p + 3))/(2*a*c*(p + 1)) Int[(a + c*x^2)^(p + 1), x], x]) / ; FreeQ[{a, c, d, e, f, g}, x] && LtQ[p, -1] && !(IntegerQ[p] && NiceSqrtQ [(-a)*c])
Time = 0.24 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.09
method | result | size |
default | \(\frac {-\frac {\left (5 a \,d^{2}-b \,c^{2}\right ) x^{3}}{8 a b}-\frac {c d \,x^{2}}{b}-\frac {\left (3 a \,d^{2}+b \,c^{2}\right ) x}{8 b^{2}}-\frac {a c d}{2 b^{2}}}{\left (b \,x^{2}+a \right )^{2}}+\frac {\left (3 a \,d^{2}+b \,c^{2}\right ) \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{8 b^{2} a \sqrt {a b}}\) | \(107\) |
risch | \(\frac {-\frac {\left (5 a \,d^{2}-b \,c^{2}\right ) x^{3}}{8 a b}-\frac {c d \,x^{2}}{b}-\frac {\left (3 a \,d^{2}+b \,c^{2}\right ) x}{8 b^{2}}-\frac {a c d}{2 b^{2}}}{\left (b \,x^{2}+a \right )^{2}}-\frac {3 \ln \left (b x +\sqrt {-a b}\right ) d^{2}}{16 \sqrt {-a b}\, b^{2}}-\frac {\ln \left (b x +\sqrt {-a b}\right ) c^{2}}{16 \sqrt {-a b}\, b a}+\frac {3 \ln \left (-b x +\sqrt {-a b}\right ) d^{2}}{16 \sqrt {-a b}\, b^{2}}+\frac {\ln \left (-b x +\sqrt {-a b}\right ) c^{2}}{16 \sqrt {-a b}\, b a}\) | \(181\) |
Input:
int(x^2*(d*x+c)^2/(b*x^2+a)^3,x,method=_RETURNVERBOSE)
Output:
(-1/8*(5*a*d^2-b*c^2)/a/b*x^3-c*d*x^2/b-1/8*(3*a*d^2+b*c^2)/b^2*x-1/2*a*c* d/b^2)/(b*x^2+a)^2+1/8*(3*a*d^2+b*c^2)/b^2/a/(a*b)^(1/2)*arctan(b*x/(a*b)^ (1/2))
Leaf count of result is larger than twice the leaf count of optimal. 181 vs. \(2 (83) = 166\).
Time = 0.10 (sec) , antiderivative size = 382, normalized size of antiderivative = 3.90 \[ \int \frac {x^2 (c+d x)^2}{\left (a+b x^2\right )^3} \, dx=\left [-\frac {16 \, a^{2} b^{2} c d x^{2} + 8 \, a^{3} b c d - 2 \, {\left (a b^{3} c^{2} - 5 \, a^{2} b^{2} d^{2}\right )} x^{3} + {\left (a^{2} b c^{2} + 3 \, a^{3} d^{2} + {\left (b^{3} c^{2} + 3 \, a b^{2} d^{2}\right )} x^{4} + 2 \, {\left (a b^{2} c^{2} + 3 \, a^{2} b d^{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 (a^{2} b^{2} c^{2} + 3 \, a^{3} b d^{2}\right )} x}{16 \, {\left (a^{2} b^{5} x^{4} + 2 \, a^{3} b^{4} x^{2} + a^{4} b^{3}\right )}}, -\frac {8 \, a^{2} b^{2} c d x^{2} + 4 \, a^{3} b c d - {\left (a b^{3} c^{2} - 5 \, a^{2} b^{2} d^{2}\right )} x^{3} - {\left (a^{2} b c^{2} + 3 \, a^{3} d^{2} + {\left (b^{3} c^{2} + 3 \, a b^{2} d^{2}\right )} x^{4} + 2 \, {\left (a b^{2} c^{2} + 3 \, a^{2} b d^{2}\right )} x^{2}\right )} \sqrt {a b} \arctan \left (\frac {\sqrt {a b} x}{a}\right ) + {\left (a^{2} b^{2} c^{2} + 3 \, a^{3} b d^{2}\right )} x}{8 \, {\left (a^{2} b^{5} x^{4} + 2 \, a^{3} b^{4} x^{2} + a^{4} b^{3}\right )}}\right ] \] Input:
integrate(x^2*(d*x+c)^2/(b*x^2+a)^3,x, algorithm="fricas")
Output:
[-1/16*(16*a^2*b^2*c*d*x^2 + 8*a^3*b*c*d - 2*(a*b^3*c^2 - 5*a^2*b^2*d^2)*x ^3 + (a^2*b*c^2 + 3*a^3*d^2 + (b^3*c^2 + 3*a*b^2*d^2)*x^4 + 2*(a*b^2*c^2 + 3*a^2*b*d^2)*x^2)*sqrt(-a*b)*log((b*x^2 - 2*sqrt(-a*b)*x - a)/(b*x^2 + a) ) + 2*(a^2*b^2*c^2 + 3*a^3*b*d^2)*x)/(a^2*b^5*x^4 + 2*a^3*b^4*x^2 + a^4*b^ 3), -1/8*(8*a^2*b^2*c*d*x^2 + 4*a^3*b*c*d - (a*b^3*c^2 - 5*a^2*b^2*d^2)*x^ 3 - (a^2*b*c^2 + 3*a^3*d^2 + (b^3*c^2 + 3*a*b^2*d^2)*x^4 + 2*(a*b^2*c^2 + 3*a^2*b*d^2)*x^2)*sqrt(a*b)*arctan(sqrt(a*b)*x/a) + (a^2*b^2*c^2 + 3*a^3*b *d^2)*x)/(a^2*b^5*x^4 + 2*a^3*b^4*x^2 + a^4*b^3)]
Leaf count of result is larger than twice the leaf count of optimal. 189 vs. \(2 (88) = 176\).
Time = 0.78 (sec) , antiderivative size = 189, normalized size of antiderivative = 1.93 \[ \int \frac {x^2 (c+d x)^2}{\left (a+b x^2\right )^3} \, dx=- \frac {\sqrt {- \frac {1}{a^{3} b^{5}}} \cdot \left (3 a d^{2} + b c^{2}\right ) \log {\left (- a^{2} b^{2} \sqrt {- \frac {1}{a^{3} b^{5}}} + x \right )}}{16} + \frac {\sqrt {- \frac {1}{a^{3} b^{5}}} \cdot \left (3 a d^{2} + b c^{2}\right ) \log {\left (a^{2} b^{2} \sqrt {- \frac {1}{a^{3} b^{5}}} + x \right )}}{16} + \frac {- 4 a^{2} c d - 8 a b c d x^{2} + x^{3} \left (- 5 a b d^{2} + b^{2} c^{2}\right ) + x \left (- 3 a^{2} d^{2} - a b c^{2}\right )}{8 a^{3} b^{2} + 16 a^{2} b^{3} x^{2} + 8 a b^{4} x^{4}} \] Input:
integrate(x**2*(d*x+c)**2/(b*x**2+a)**3,x)
Output:
-sqrt(-1/(a**3*b**5))*(3*a*d**2 + b*c**2)*log(-a**2*b**2*sqrt(-1/(a**3*b** 5)) + x)/16 + sqrt(-1/(a**3*b**5))*(3*a*d**2 + b*c**2)*log(a**2*b**2*sqrt( -1/(a**3*b**5)) + x)/16 + (-4*a**2*c*d - 8*a*b*c*d*x**2 + x**3*(-5*a*b*d** 2 + b**2*c**2) + x*(-3*a**2*d**2 - a*b*c**2))/(8*a**3*b**2 + 16*a**2*b**3* x**2 + 8*a*b**4*x**4)
Time = 0.11 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.22 \[ \int \frac {x^2 (c+d x)^2}{\left (a+b x^2\right )^3} \, dx=-\frac {8 \, a b c d x^{2} + 4 \, a^{2} c d - {\left (b^{2} c^{2} - 5 \, a b d^{2}\right )} x^{3} + {\left (a b c^{2} + 3 \, a^{2} d^{2}\right )} x}{8 \, {\left (a b^{4} x^{4} + 2 \, a^{2} b^{3} x^{2} + a^{3} b^{2}\right )}} + \frac {{\left (b c^{2} + 3 \, a d^{2}\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{8 \, \sqrt {a b} a b^{2}} \] Input:
integrate(x^2*(d*x+c)^2/(b*x^2+a)^3,x, algorithm="maxima")
Output:
-1/8*(8*a*b*c*d*x^2 + 4*a^2*c*d - (b^2*c^2 - 5*a*b*d^2)*x^3 + (a*b*c^2 + 3 *a^2*d^2)*x)/(a*b^4*x^4 + 2*a^2*b^3*x^2 + a^3*b^2) + 1/8*(b*c^2 + 3*a*d^2) *arctan(b*x/sqrt(a*b))/(sqrt(a*b)*a*b^2)
Time = 0.12 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.08 \[ \int \frac {x^2 (c+d x)^2}{\left (a+b x^2\right )^3} \, dx=\frac {{\left (b c^{2} + 3 \, a d^{2}\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{8 \, \sqrt {a b} a b^{2}} + \frac {b^{2} c^{2} x^{3} - 5 \, a b d^{2} x^{3} - 8 \, a b c d x^{2} - a b c^{2} x - 3 \, a^{2} d^{2} x - 4 \, a^{2} c d}{8 \, {\left (b x^{2} + a\right )}^{2} a b^{2}} \] Input:
integrate(x^2*(d*x+c)^2/(b*x^2+a)^3,x, algorithm="giac")
Output:
1/8*(b*c^2 + 3*a*d^2)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*a*b^2) + 1/8*(b^2*c ^2*x^3 - 5*a*b*d^2*x^3 - 8*a*b*c*d*x^2 - a*b*c^2*x - 3*a^2*d^2*x - 4*a^2*c *d)/((b*x^2 + a)^2*a*b^2)
Time = 7.15 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.14 \[ \int \frac {x^2 (c+d x)^2}{\left (a+b x^2\right )^3} \, dx=\frac {\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )\,\left (b\,c^2+3\,a\,d^2\right )}{8\,a^{3/2}\,b^{5/2}}-\frac {\frac {x\,\left (b\,c^2+3\,a\,d^2\right )}{8\,b^2}+\frac {x^3\,\left (5\,a\,d^2-b\,c^2\right )}{8\,a\,b}+\frac {a\,c\,d}{2\,b^2}+\frac {c\,d\,x^2}{b}}{a^2+2\,a\,b\,x^2+b^2\,x^4} \] Input:
int((x^2*(c + d*x)^2)/(a + b*x^2)^3,x)
Output:
(atan((b^(1/2)*x)/a^(1/2))*(3*a*d^2 + b*c^2))/(8*a^(3/2)*b^(5/2)) - ((x*(3 *a*d^2 + b*c^2))/(8*b^2) + (x^3*(5*a*d^2 - b*c^2))/(8*a*b) + (a*c*d)/(2*b^ 2) + (c*d*x^2)/b)/(a^2 + b^2*x^4 + 2*a*b*x^2)
Time = 0.20 (sec) , antiderivative size = 245, normalized size of antiderivative = 2.50 \[ \int \frac {x^2 (c+d x)^2}{\left (a+b x^2\right )^3} \, dx=\frac {3 \sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {b x}{\sqrt {b}\, \sqrt {a}}\right ) a^{3} d^{2}+\sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {b x}{\sqrt {b}\, \sqrt {a}}\right ) a^{2} b \,c^{2}+6 \sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {b x}{\sqrt {b}\, \sqrt {a}}\right ) a^{2} b \,d^{2} x^{2}+2 \sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {b x}{\sqrt {b}\, \sqrt {a}}\right ) a \,b^{2} c^{2} x^{2}+3 \sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {b x}{\sqrt {b}\, \sqrt {a}}\right ) a \,b^{2} d^{2} x^{4}+\sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {b x}{\sqrt {b}\, \sqrt {a}}\right ) b^{3} c^{2} x^{4}-3 a^{3} b \,d^{2} x -a^{2} b^{2} c^{2} x -5 a^{2} b^{2} d^{2} x^{3}+a \,b^{3} c^{2} x^{3}+4 a \,b^{3} c d \,x^{4}}{8 a^{2} b^{3} \left (b^{2} x^{4}+2 a b \,x^{2}+a^{2}\right )} \] Input:
int(x^2*(d*x+c)^2/(b*x^2+a)^3,x)
Output:
(3*sqrt(b)*sqrt(a)*atan((b*x)/(sqrt(b)*sqrt(a)))*a**3*d**2 + sqrt(b)*sqrt( a)*atan((b*x)/(sqrt(b)*sqrt(a)))*a**2*b*c**2 + 6*sqrt(b)*sqrt(a)*atan((b*x )/(sqrt(b)*sqrt(a)))*a**2*b*d**2*x**2 + 2*sqrt(b)*sqrt(a)*atan((b*x)/(sqrt (b)*sqrt(a)))*a*b**2*c**2*x**2 + 3*sqrt(b)*sqrt(a)*atan((b*x)/(sqrt(b)*sqr t(a)))*a*b**2*d**2*x**4 + sqrt(b)*sqrt(a)*atan((b*x)/(sqrt(b)*sqrt(a)))*b* *3*c**2*x**4 - 3*a**3*b*d**2*x - a**2*b**2*c**2*x - 5*a**2*b**2*d**2*x**3 + a*b**3*c**2*x**3 + 4*a*b**3*c*d*x**4)/(8*a**2*b**3*(a**2 + 2*a*b*x**2 + b**2*x**4))