Integrand size = 10, antiderivative size = 80 \[ \int x^2 \cot ^{-1}(a+b x) \, dx=-\frac {a x}{b^2}+\frac {(a+b x)^2}{6 b^3}+\frac {1}{3} x^3 \cot ^{-1}(a+b x)+\frac {a \left (3-a^2\right ) \arctan (a+b x)}{3 b^3}-\frac {\left (1-3 a^2\right ) \log \left (1+(a+b x)^2\right )}{6 b^3} \]
-a*x/b^2+1/6*(b*x+a)^2/b^3+1/3*x^3*arccot(b*x+a)+1/3*a*(-a^2+3)*arctan(b*x +a)/b^3-1/6*(-3*a^2+1)*ln(1+(b*x+a)^2)/b^3
Result contains complex when optimal does not.
Time = 0.03 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.42 \[ \int x^2 \cot ^{-1}(a+b x) \, dx=\frac {\frac {1}{3} b \left (-\frac {a}{b}+\frac {a+b x}{b}\right )^3 \cot ^{-1}(a+b x)+\frac {1}{3} b \left (-\frac {3 a x}{b^2}+\frac {(a+b x)^2}{2 b^3}-\frac {(1+i a)^3 \log (i-a-b x)}{2 b^3}-\frac {(1-i a)^3 \log (i+a+b x)}{2 b^3}\right )}{b} \]
((b*(-(a/b) + (a + b*x)/b)^3*ArcCot[a + b*x])/3 + (b*((-3*a*x)/b^2 + (a + b*x)^2/(2*b^3) - ((1 + I*a)^3*Log[I - a - b*x])/(2*b^3) - ((1 - I*a)^3*Log [I + a + b*x])/(2*b^3)))/3)/b
Time = 0.30 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.01, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {5571, 27, 5388, 478, 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 x^2 \cot ^{-1}(a+b x) \, dx\) |
\(\Big \downarrow \) 5571 |
\(\displaystyle \frac {\int x^2 \cot ^{-1}(a+b x)d(a+b x)}{b}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int b^2 x^2 \cot ^{-1}(a+b x)d(a+b x)}{b^3}\) |
\(\Big \downarrow \) 5388 |
\(\displaystyle \frac {\frac {1}{3} b^3 x^3 \cot ^{-1}(a+b x)-\frac {1}{3} \int -\frac {b^3 x^3}{(a+b x)^2+1}d(a+b x)}{b^3}\) |
\(\Big \downarrow \) 478 |
\(\displaystyle \frac {\frac {1}{3} b^3 x^3 \cot ^{-1}(a+b x)-\frac {1}{3} \int \left (2 a-b x-\frac {a \left (3-a^2\right )-\left (1-3 a^2\right ) (a+b x)}{(a+b x)^2+1}\right )d(a+b x)}{b^3}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {1}{3} \left (a \left (3-a^2\right ) \arctan (a+b x)-\frac {1}{2} \left (1-3 a^2\right ) \log \left ((a+b x)^2+1\right )+\frac {1}{2} (a+b x)^2-3 a (a+b x)\right )+\frac {1}{3} b^3 x^3 \cot ^{-1}(a+b x)}{b^3}\) |
((b^3*x^3*ArcCot[a + b*x])/3 + (-3*a*(a + b*x) + (a + b*x)^2/2 + a*(3 - a^ 2)*ArcTan[a + b*x] - ((1 - 3*a^2)*Log[1 + (a + b*x)^2])/2)/3)/b^3
3.1.100.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((c_) + (d_.)*(x_))^(n_)/((a_) + (b_.)*(x_)^2), x_Symbol] :> Int[Expand Integrand[(c + d*x)^n/(a + b*x^2), x], x] /; FreeQ[{a, b, c, d}, x] && IGtQ [n, 1]
Int[((a_.) + ArcCot[(c_.)*(x_)]*(b_.))*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[(d + e*x)^(q + 1)*((a + b*ArcCot[c*x])/(e*(q + 1))), x] + Simp[b*( c/(e*(q + 1))) Int[(d + e*x)^(q + 1)/(1 + c^2*x^2), x], x] /; FreeQ[{a, b , c, d, e, q}, x] && NeQ[q, -1]
Int[((a_.) + ArcCot[(c_) + (d_.)*(x_)]*(b_.))^(p_.)*((e_.) + (f_.)*(x_))^(m _.), x_Symbol] :> Simp[1/d Subst[Int[((d*e - c*f)/d + f*(x/d))^m*(a + b*A rcCot[x])^p, x], x, c + d*x], x] /; FreeQ[{a, b, c, d, e, f, m, p}, x] && I GtQ[p, 0]
Time = 0.24 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.28
method | result | size |
parallelrisch | \(\frac {2 \,\operatorname {arccot}\left (b x +a \right ) x^{3} b^{3}+b^{2} x^{2}+2 \,\operatorname {arccot}\left (b x +a \right ) a^{3}+3 a^{2} \ln \left (b^{2} x^{2}+2 a b x +a^{2}+1\right )-4 a b x -6 a \,\operatorname {arccot}\left (b x +a \right )+7 a^{2}-1-\ln \left (b^{2} x^{2}+2 a b x +a^{2}+1\right )}{6 b^{3}}\) | \(102\) |
derivativedivides | \(\frac {-\frac {\operatorname {arccot}\left (b x +a \right ) a^{3}}{3}+\operatorname {arccot}\left (b x +a \right ) a^{2} \left (b x +a \right )-\operatorname {arccot}\left (b x +a \right ) a \left (b x +a \right )^{2}+\frac {\operatorname {arccot}\left (b x +a \right ) \left (b x +a \right )^{3}}{3}-\left (b x +a \right ) a +\frac {\left (b x +a \right )^{2}}{6}-\frac {\left (-3 a^{2}+1\right ) \ln \left (1+\left (b x +a \right )^{2}\right )}{6}-\frac {\left (a^{3}-3 a \right ) \arctan \left (b x +a \right )}{3}}{b^{3}}\) | \(114\) |
default | \(\frac {-\frac {\operatorname {arccot}\left (b x +a \right ) a^{3}}{3}+\operatorname {arccot}\left (b x +a \right ) a^{2} \left (b x +a \right )-\operatorname {arccot}\left (b x +a \right ) a \left (b x +a \right )^{2}+\frac {\operatorname {arccot}\left (b x +a \right ) \left (b x +a \right )^{3}}{3}-\left (b x +a \right ) a +\frac {\left (b x +a \right )^{2}}{6}-\frac {\left (-3 a^{2}+1\right ) \ln \left (1+\left (b x +a \right )^{2}\right )}{6}-\frac {\left (a^{3}-3 a \right ) \arctan \left (b x +a \right )}{3}}{b^{3}}\) | \(114\) |
parts | \(\frac {x^{3} \operatorname {arccot}\left (b x +a \right )}{3}+\frac {b \left (-\frac {-\frac {1}{2} x^{2} b +2 a x}{b^{3}}+\frac {\frac {\left (3 a^{2} b -b \right ) \ln \left (b^{2} x^{2}+2 a b x +a^{2}+1\right )}{2 b^{2}}+\frac {\left (2 a^{3}+2 a -\frac {\left (3 a^{2} b -b \right ) a}{b}\right ) \arctan \left (\frac {2 b^{2} x +2 a b}{2 b}\right )}{b}}{b^{3}}\right )}{3}\) | \(117\) |
risch | \(\frac {i x^{3} \ln \left (1+i \left (b x +a \right )\right )}{6}-\frac {i x^{3} \ln \left (1-i \left (b x +a \right )\right )}{6}+\frac {\pi \,x^{3}}{6}-\frac {a^{3} \arctan \left (b x +a \right )}{3 b^{3}}+\frac {x^{2}}{6 b}+\frac {a^{2} \ln \left (b^{2} x^{2}+2 a b x +a^{2}+1\right )}{2 b^{3}}-\frac {2 a x}{3 b^{2}}+\frac {a \arctan \left (b x +a \right )}{b^{3}}-\frac {\ln \left (b^{2} x^{2}+2 a b x +a^{2}+1\right )}{6 b^{3}}\) | \(131\) |
1/6*(2*arccot(b*x+a)*x^3*b^3+b^2*x^2+2*arccot(b*x+a)*a^3+3*a^2*ln(b^2*x^2+ 2*a*b*x+a^2+1)-4*a*b*x-6*a*arccot(b*x+a)+7*a^2-1-ln(b^2*x^2+2*a*b*x+a^2+1) )/b^3
Time = 0.27 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.91 \[ \int x^2 \cot ^{-1}(a+b x) \, dx=\frac {2 \, b^{3} x^{3} \operatorname {arccot}\left (b x + a\right ) + b^{2} x^{2} - 4 \, a b x - 2 \, {\left (a^{3} - 3 \, a\right )} \arctan \left (b x + a\right ) + {\left (3 \, a^{2} - 1\right )} \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + 1\right )}{6 \, b^{3}} \]
1/6*(2*b^3*x^3*arccot(b*x + a) + b^2*x^2 - 4*a*b*x - 2*(a^3 - 3*a)*arctan( b*x + a) + (3*a^2 - 1)*log(b^2*x^2 + 2*a*b*x + a^2 + 1))/b^3
Time = 0.31 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.46 \[ \int x^2 \cot ^{-1}(a+b x) \, dx=\begin {cases} \frac {a^{3} \operatorname {acot}{\left (a + b x \right )}}{3 b^{3}} + \frac {a^{2} \log {\left (a^{2} + 2 a b x + b^{2} x^{2} + 1 \right )}}{2 b^{3}} - \frac {2 a x}{3 b^{2}} - \frac {a \operatorname {acot}{\left (a + b x \right )}}{b^{3}} + \frac {x^{3} \operatorname {acot}{\left (a + b x \right )}}{3} + \frac {x^{2}}{6 b} - \frac {\log {\left (a^{2} + 2 a b x + b^{2} x^{2} + 1 \right )}}{6 b^{3}} & \text {for}\: b \neq 0 \\\frac {x^{3} \operatorname {acot}{\left (a \right )}}{3} & \text {otherwise} \end {cases} \]
Piecewise((a**3*acot(a + b*x)/(3*b**3) + a**2*log(a**2 + 2*a*b*x + b**2*x* *2 + 1)/(2*b**3) - 2*a*x/(3*b**2) - a*acot(a + b*x)/b**3 + x**3*acot(a + b *x)/3 + x**2/(6*b) - log(a**2 + 2*a*b*x + b**2*x**2 + 1)/(6*b**3), Ne(b, 0 )), (x**3*acot(a)/3, True))
Time = 0.31 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.06 \[ \int x^2 \cot ^{-1}(a+b x) \, dx=\frac {1}{3} \, x^{3} \operatorname {arccot}\left (b x + a\right ) + \frac {1}{6} \, b {\left (\frac {b x^{2} - 4 \, a x}{b^{3}} - \frac {2 \, {\left (a^{3} - 3 \, a\right )} \arctan \left (\frac {b^{2} x + a b}{b}\right )}{b^{4}} + \frac {{\left (3 \, a^{2} - 1\right )} \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + 1\right )}{b^{4}}\right )} \]
1/3*x^3*arccot(b*x + a) + 1/6*b*((b*x^2 - 4*a*x)/b^3 - 2*(a^3 - 3*a)*arcta n((b^2*x + a*b)/b)/b^4 + (3*a^2 - 1)*log(b^2*x^2 + 2*a*b*x + a^2 + 1)/b^4)
Leaf count of result is larger than twice the leaf count of optimal. 423 vs. \(2 (70) = 140\).
Time = 0.63 (sec) , antiderivative size = 423, normalized size of antiderivative = 5.29 \[ \int x^2 \cot ^{-1}(a+b x) \, dx=-\frac {12 \, a^{2} \arctan \left (\frac {1}{b x + a}\right ) \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{4} + 6 \, a \arctan \left (\frac {1}{b x + a}\right ) \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{5} + \arctan \left (\frac {1}{b x + a}\right ) \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{6} + 12 \, a^{2} \log \left (\frac {16 \, \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{2}}{\tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{4} + 2 \, \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{2} + 1}\right ) \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{3} - 12 \, a^{2} \arctan \left (\frac {1}{b x + a}\right ) \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{2} + 12 \, a \arctan \left (\frac {1}{b x + a}\right ) \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{3} - 12 \, a \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{4} - 3 \, \arctan \left (\frac {1}{b x + a}\right ) \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{4} - \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{5} - 4 \, \log \left (\frac {16 \, \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{2}}{\tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{4} + 2 \, \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{2} + 1}\right ) \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{3} + 6 \, a \arctan \left (\frac {1}{b x + a}\right ) \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right ) + 12 \, a \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{2} + 3 \, \arctan \left (\frac {1}{b x + a}\right ) \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{2} - 2 \, \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{3} - \arctan \left (\frac {1}{b x + a}\right ) - \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )}{24 \, b^{3} \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{3}} \]
-1/24*(12*a^2*arctan(1/(b*x + a))*tan(1/2*arctan(1/(b*x + a)))^4 + 6*a*arc tan(1/(b*x + a))*tan(1/2*arctan(1/(b*x + a)))^5 + arctan(1/(b*x + a))*tan( 1/2*arctan(1/(b*x + a)))^6 + 12*a^2*log(16*tan(1/2*arctan(1/(b*x + a)))^2/ (tan(1/2*arctan(1/(b*x + a)))^4 + 2*tan(1/2*arctan(1/(b*x + a)))^2 + 1))*t an(1/2*arctan(1/(b*x + a)))^3 - 12*a^2*arctan(1/(b*x + a))*tan(1/2*arctan( 1/(b*x + a)))^2 + 12*a*arctan(1/(b*x + a))*tan(1/2*arctan(1/(b*x + a)))^3 - 12*a*tan(1/2*arctan(1/(b*x + a)))^4 - 3*arctan(1/(b*x + a))*tan(1/2*arct an(1/(b*x + a)))^4 - tan(1/2*arctan(1/(b*x + a)))^5 - 4*log(16*tan(1/2*arc tan(1/(b*x + a)))^2/(tan(1/2*arctan(1/(b*x + a)))^4 + 2*tan(1/2*arctan(1/( b*x + a)))^2 + 1))*tan(1/2*arctan(1/(b*x + a)))^3 + 6*a*arctan(1/(b*x + a) )*tan(1/2*arctan(1/(b*x + a))) + 12*a*tan(1/2*arctan(1/(b*x + a)))^2 + 3*a rctan(1/(b*x + a))*tan(1/2*arctan(1/(b*x + a)))^2 - 2*tan(1/2*arctan(1/(b* x + a)))^3 - arctan(1/(b*x + a)) - tan(1/2*arctan(1/(b*x + a))))/(b^3*tan( 1/2*arctan(1/(b*x + a)))^3)
Time = 1.53 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.26 \[ \int x^2 \cot ^{-1}(a+b x) \, dx=\frac {x^3\,\mathrm {acot}\left (a+b\,x\right )}{3}-\frac {\ln \left (a^2+2\,a\,b\,x+b^2\,x^2+1\right )}{6\,b^3}+\frac {x^2}{6\,b}+\frac {a^2\,\ln \left (a^2+2\,a\,b\,x+b^2\,x^2+1\right )}{2\,b^3}-\frac {a^3\,\mathrm {atan}\left (a+b\,x\right )}{3\,b^3}+\frac {a\,\mathrm {atan}\left (a+b\,x\right )}{b^3}-\frac {2\,a\,x}{3\,b^2} \]