3.2.22 \(\int (a+b x)^2 \cot ^{-1}(a+b x) \, dx\) [122]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {5152, 4947, 272, 45} \begin {gather*} \frac {(a+b x)^2}{6 b}-\frac {\log \left ((a+b x)^2+1\right )}{6 b}+\frac {(a+b x)^3 \cot ^{-1}(a+b x)}{3 b} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 4947

Int[((a_.) + ArcCot[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)*((a + b*ArcCot[c*x^
n])^p/(m + 1)), x] + Dist[b*c*n*(p/(m + 1)), Int[x^(m + n)*((a + b*ArcCot[c*x^n])^(p - 1)/(1 + c^2*x^(2*n))),
x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1] && IntegerQ[m])) && NeQ[m, -1]

Rule 5152

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

Rubi steps

\begin {align*} \int (a+b x)^2 \cot ^{-1}(a+b x) \, dx &=\frac {\text {Subst}\left (\int x^2 \cot ^{-1}(x) \, dx,x,a+b x\right )}{b}\\ &=\frac {(a+b x)^3 \cot ^{-1}(a+b x)}{3 b}+\frac {\text {Subst}\left (\int \frac {x^3}{1+x^2} \, dx,x,a+b x\right )}{3 b}\\ &=\frac {(a+b x)^3 \cot ^{-1}(a+b x)}{3 b}+\frac {\text {Subst}\left (\int \frac {x}{1+x} \, dx,x,(a+b x)^2\right )}{6 b}\\ &=\frac {(a+b x)^3 \cot ^{-1}(a+b x)}{3 b}+\frac {\text {Subst}\left (\int \left (1+\frac {1}{-1-x}\right ) \, dx,x,(a+b x)^2\right )}{6 b}\\ &=\frac {(a+b x)^2}{6 b}+\frac {(a+b x)^3 \cot ^{-1}(a+b x)}{3 b}-\frac {\log \left (1+(a+b x)^2\right )}{6 b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 42, normalized size = 0.81 \begin {gather*} \frac {(a+b x)^2+2 (a+b x)^3 \cot ^{-1}(a+b x)-\log \left (1+(a+b x)^2\right )}{6 b} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.13, size = 42, normalized size = 0.81

method result size
derivativedivides \(\frac {\frac {\mathrm {arccot}\left (b x +a \right ) \left (b x +a \right )^{3}}{3}+\frac {\left (b x +a \right )^{2}}{6}-\frac {\ln \left (1+\left (b x +a \right )^{2}\right )}{6}}{b}\) \(42\)
default \(\frac {\frac {\mathrm {arccot}\left (b x +a \right ) \left (b x +a \right )^{3}}{3}+\frac {\left (b x +a \right )^{2}}{6}-\frac {\ln \left (1+\left (b x +a \right )^{2}\right )}{6}}{b}\) \(42\)
risch \(\frac {i \left (b x +a \right )^{3} \ln \left (1+i \left (b x +a \right )\right )}{6 b}-\frac {i b^{2} x^{3} \ln \left (1-i \left (b x +a \right )\right )}{6}+\frac {\pi \,b^{2} x^{3}}{6}-\frac {i b a \,x^{2} \ln \left (1-i \left (b x +a \right )\right )}{2}+\frac {b \pi a \,x^{2}}{2}-\frac {i a^{2} x \ln \left (1-i \left (b x +a \right )\right )}{2}+\frac {x \,a^{2} \pi }{2}-\frac {i a^{3} \ln \left (b^{2} x^{2}+2 a b x +a^{2}+1\right )}{12 b}-\frac {a^{3} \arctan \left (b x +a \right )}{6 b}+\frac {x^{2} b}{6}+\frac {a x}{3}-\frac {\ln \left (-b^{2} x^{2}-2 a b x -a^{2}-1\right )}{6 b}\) \(184\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 93 vs. \(2 (46) = 92\).
time = 0.45, size = 93, normalized size = 1.79 \begin {gather*} -\frac {1}{6} \, {\left (\frac {2 \, a^{3} \arctan \left (\frac {b^{2} x + a b}{b}\right )}{b^{2}} - \frac {b x^{2} + 2 \, a x}{b} + \frac {\log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + 1\right )}{b^{2}}\right )} b + \frac {1}{3} \, {\left (b^{2} x^{3} + 3 \, a b x^{2} + 3 \, a^{2} x\right )} \operatorname {arccot}\left (b x + a\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 3.39, size = 81, normalized size = 1.56 \begin {gather*} \frac {b^{2} x^{2} - 2 \, a^{3} \arctan \left (b x + a\right ) + 2 \, a b x + 2 \, {\left (b^{3} x^{3} + 3 \, a b^{2} x^{2} + 3 \, a^{2} b x\right )} \operatorname {arccot}\left (b x + a\right ) - \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + 1\right )}{6 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [C] Result contains complex when optimal does not.
time = 6.07, size = 99, normalized size = 1.90 \begin {gather*} \begin {cases} \frac {a^{3} \operatorname {acot}{\left (a + b x \right )}}{3 b} + a^{2} x \operatorname {acot}{\left (a + b x \right )} + a b x^{2} \operatorname {acot}{\left (a + b x \right )} + \frac {a x}{3} + \frac {b^{2} x^{3} \operatorname {acot}{\left (a + b x \right )}}{3} + \frac {b x^{2}}{6} - \frac {\log {\left (\frac {a}{b} + x - \frac {i}{b} \right )}}{3 b} - \frac {i \operatorname {acot}{\left (a + b x \right )}}{3 b} & \text {for}\: b \neq 0 \\a^{2} x \operatorname {acot}{\left (a \right )} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((a**3*acot(a + b*x)/(3*b) + a**2*x*acot(a + b*x) + a*b*x**2*acot(a + b*x) + a*x/3 + b**2*x**3*acot(a
 + b*x)/3 + b*x**2/6 - log(a/b + x - I/b)/(3*b) - I*acot(a + b*x)/(3*b), Ne(b, 0)), (a**2*x*acot(a), True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 203 vs. \(2 (46) = 92\).
time = 0.49, size = 203, normalized size = 3.90 \begin {gather*} -\frac {\arctan \left (\frac {1}{b x + a}\right ) \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{6} - 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} + 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 \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.15, size = 85, normalized size = 1.63 \begin {gather*} \frac {a\,x}{3}-\frac {\ln \left (a^2+2\,a\,b\,x+b^2\,x^2+1\right )}{6\,b}+\frac {b\,x^2}{6}-\frac {a^3\,\mathrm {atan}\left (a+b\,x\right )}{3\,b}+\frac {b^2\,x^3\,\mathrm {acot}\left (a+b\,x\right )}{3}+a^2\,x\,\mathrm {acot}\left (a+b\,x\right )+a\,b\,x^2\,\mathrm {acot}\left (a+b\,x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________