3.100 \(\int x^2 \cot ^{-1}(a+b x) \, dx\)

Optimal. Leaf size=80 \[ -\frac {\left (1-3 a^2\right ) \log \left ((a+b x)^2+1\right )}{6 b^3}+\frac {a \left (3-a^2\right ) \tan ^{-1}(a+b x)}{3 b^3}+\frac {(a+b x)^2}{6 b^3}-\frac {a x}{b^2}+\frac {1}{3} x^3 \cot ^{-1}(a+b x) \]

[Out]

-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

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 80, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.600, Rules used = {5048, 4863, 702, 635, 203, 260} \[ -\frac {\left (1-3 a^2\right ) \log \left ((a+b x)^2+1\right )}{6 b^3}+\frac {a \left (3-a^2\right ) \tan ^{-1}(a+b x)}{3 b^3}-\frac {a x}{b^2}+\frac {(a+b x)^2}{6 b^3}+\frac {1}{3} x^3 \cot ^{-1}(a+b x) \]

Antiderivative was successfully verified.

[In]

Int[x^2*ArcCot[a + b*x],x]

[Out]

-((a*x)/b^2) + (a + b*x)^2/(6*b^3) + (x^3*ArcCot[a + b*x])/3 + (a*(3 - a^2)*ArcTan[a + b*x])/(3*b^3) - ((1 - 3
*a^2)*Log[1 + (a + b*x)^2])/(6*b^3)

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rule 702

Int[((d_) + (e_.)*(x_))^(m_)/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[PolynomialDivide[(d + e*x)^m, a + c*x^2,
x], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[m, 1] && (NeQ[d, 0] || GtQ[m, 2])

Rule 4863

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] + Dist[(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]

Rule 5048

Int[((a_.) + ArcCot[(c_) + (d_.)*(x_)]*(b_.))^(p_.)*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Dist[1/d, Subst[I
nt[((d*e - c*f)/d + (f*x)/d)^m*(a + b*ArcCot[x])^p, x], x, c + d*x], x] /; FreeQ[{a, b, c, d, e, f, m, p}, x]
&& IGtQ[p, 0]

Rubi steps

\begin {align*} \int x^2 \cot ^{-1}(a+b x) \, dx &=\frac {\operatorname {Subst}\left (\int \left (-\frac {a}{b}+\frac {x}{b}\right )^2 \cot ^{-1}(x) \, dx,x,a+b x\right )}{b}\\ &=\frac {1}{3} x^3 \cot ^{-1}(a+b x)+\frac {1}{3} \operatorname {Subst}\left (\int \frac {\left (-\frac {a}{b}+\frac {x}{b}\right )^3}{1+x^2} \, dx,x,a+b x\right )\\ &=\frac {1}{3} x^3 \cot ^{-1}(a+b x)+\frac {1}{3} \operatorname {Subst}\left (\int \left (-\frac {3 a}{b^3}+\frac {x}{b^3}+\frac {a \left (3-a^2\right )-\left (1-3 a^2\right ) x}{b^3 \left (1+x^2\right )}\right ) \, dx,x,a+b x\right )\\ &=-\frac {a x}{b^2}+\frac {(a+b x)^2}{6 b^3}+\frac {1}{3} x^3 \cot ^{-1}(a+b x)+\frac {\operatorname {Subst}\left (\int \frac {a \left (3-a^2\right )-\left (1-3 a^2\right ) x}{1+x^2} \, dx,x,a+b x\right )}{3 b^3}\\ &=-\frac {a x}{b^2}+\frac {(a+b x)^2}{6 b^3}+\frac {1}{3} x^3 \cot ^{-1}(a+b x)-\frac {\left (1-3 a^2\right ) \operatorname {Subst}\left (\int \frac {x}{1+x^2} \, dx,x,a+b x\right )}{3 b^3}+\frac {\left (a \left (3-a^2\right )\right ) \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,a+b x\right )}{3 b^3}\\ &=-\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 ) \tan ^{-1}(a+b x)}{3 b^3}-\frac {\left (1-3 a^2\right ) \log \left (1+(a+b x)^2\right )}{6 b^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.05, size = 114, normalized size = 1.42 \[ \frac {\frac {1}{3} b \left (\frac {a+b x}{b}-\frac {a}{b}\right )^3 \cot ^{-1}(a+b x)+\frac {1}{3} b \left (\frac {(a+b x)^2}{2 b^3}-\frac {(1-i a)^3 \log (a+b x+i)}{2 b^3}-\frac {(1+i a)^3 \log (-a-b x+i)}{2 b^3}-\frac {3 a x}{b^2}\right )}{b} \]

Antiderivative was successfully verified.

[In]

Integrate[x^2*ArcCot[a + b*x],x]

[Out]

((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

________________________________________________________________________________________

fricas [A]  time = 2.25, size = 73, normalized size = 0.91 \[ \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}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*arccot(b*x+a),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.85, size = 423, normalized size = 5.29 \[ -\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}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*arccot(b*x+a),x, algorithm="giac")

[Out]

-1/24*(12*a^2*arctan(1/(b*x + a))*tan(1/2*arctan(1/(b*x + a)))^4 + 6*a*arctan(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))*tan(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*arctan(1/(b*x + a)))^4 - tan(1/2*arc
tan(1/(b*x + a)))^5 - 4*log(16*tan(1/2*arctan(1/(b*x + a)))^2/(tan(1/2*arctan(1/(b*x + a)))^4 + 2*tan(1/2*arct
an(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*arctan(1/(b*x + a))*tan(1/2*arctan(1/(b*x + a)))^2 - 2*tan(1/2*arct
an(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)

________________________________________________________________________________________

maple [A]  time = 0.04, size = 94, normalized size = 1.18 \[ \frac {x^{3} \mathrm {arccot}\left (b x +a \right )}{3}+\frac {x^{2}}{6 b}-\frac {2 a x}{3 b^{2}}-\frac {5 a^{2}}{6 b^{3}}+\frac {\ln \left (1+\left (b x +a \right )^{2}\right ) a^{2}}{2 b^{3}}-\frac {\ln \left (1+\left (b x +a \right )^{2}\right )}{6 b^{3}}-\frac {\arctan \left (b x +a \right ) a^{3}}{3 b^{3}}+\frac {\arctan \left (b x +a \right ) a}{b^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*arccot(b*x+a),x)

[Out]

1/3*x^3*arccot(b*x+a)+1/6/b*x^2-2/3*a*x/b^2-5/6/b^3*a^2+1/2/b^3*ln(1+(b*x+a)^2)*a^2-1/6/b^3*ln(1+(b*x+a)^2)-1/
3/b^3*arctan(b*x+a)*a^3+1/b^3*arctan(b*x+a)*a

________________________________________________________________________________________

maxima [A]  time = 0.44, size = 85, normalized size = 1.06 \[ \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 )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*arccot(b*x+a),x, algorithm="maxima")

[Out]

1/3*x^3*arccot(b*x + a) + 1/6*b*((b*x^2 - 4*a*x)/b^3 - 2*(a^3 - 3*a)*arctan((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)

________________________________________________________________________________________

mupad [B]  time = 1.34, size = 101, normalized size = 1.26 \[ \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} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*acot(a + b*x),x)

[Out]

(x^3*acot(a + b*x))/3 - log(a^2 + b^2*x^2 + 2*a*b*x + 1)/(6*b^3) + x^2/(6*b) + (a^2*log(a^2 + b^2*x^2 + 2*a*b*
x + 1))/(2*b^3) - (a^3*atan(a + b*x))/(3*b^3) + (a*atan(a + b*x))/b^3 - (2*a*x)/(3*b^2)

________________________________________________________________________________________

sympy [A]  time = 1.00, size = 117, normalized size = 1.46 \[ \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}{\relax (a )}}{3} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*acot(b*x+a),x)

[Out]

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))

________________________________________________________________________________________