3.2.25 \(\int \frac {\cot ^{-1}(a+b x)}{(a+b x)^2} \, dx\) [125]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {5152, 4947, 272, 36, 29, 31} \begin {gather*} -\frac {\log (a+b x)}{b}+\frac {\log \left ((a+b x)^2+1\right )}{2 b}-\frac {\cot ^{-1}(a+b x)}{b (a+b x)} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

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

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 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 \frac {\cot ^{-1}(a+b x)}{(a+b x)^2} \, dx &=\frac {\text {Subst}\left (\int \frac {\cot ^{-1}(x)}{x^2} \, dx,x,a+b x\right )}{b}\\ &=-\frac {\cot ^{-1}(a+b x)}{b (a+b x)}-\frac {\text {Subst}\left (\int \frac {1}{x \left (1+x^2\right )} \, dx,x,a+b x\right )}{b}\\ &=-\frac {\cot ^{-1}(a+b x)}{b (a+b x)}-\frac {\text {Subst}\left (\int \frac {1}{x (1+x)} \, dx,x,(a+b x)^2\right )}{2 b}\\ &=-\frac {\cot ^{-1}(a+b x)}{b (a+b x)}-\frac {\text {Subst}\left (\int \frac {1}{x} \, dx,x,(a+b x)^2\right )}{2 b}+\frac {\text {Subst}\left (\int \frac {1}{1+x} \, dx,x,(a+b x)^2\right )}{2 b}\\ &=-\frac {\cot ^{-1}(a+b x)}{b (a+b x)}-\frac {\log (a+b x)}{b}+\frac {\log \left (1+(a+b x)^2\right )}{2 b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 40, normalized size = 0.85 \begin {gather*} -\frac {\frac {\cot ^{-1}(a+b x)}{a+b x}+\log (a+b x)-\frac {1}{2} \log \left (1+(a+b x)^2\right )}{b} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.14, size = 41, normalized size = 0.87

method result size
derivativedivides \(\frac {-\frac {\mathrm {arccot}\left (b x +a \right )}{b x +a}+\frac {\ln \left (1+\left (b x +a \right )^{2}\right )}{2}-\ln \left (b x +a \right )}{b}\) \(41\)
default \(\frac {-\frac {\mathrm {arccot}\left (b x +a \right )}{b x +a}+\frac {\ln \left (1+\left (b x +a \right )^{2}\right )}{2}-\ln \left (b x +a \right )}{b}\) \(41\)
risch \(-\frac {i \ln \left (1+i \left (b x +a \right )\right )}{2 b \left (b x +a \right )}-\frac {2 \ln \left (-b x -a \right ) b x -\ln \left (b^{2} x^{2}+2 a b x +a^{2}+1\right ) b x -i \ln \left (1-i \left (b x +a \right )\right )+2 \ln \left (-b x -a \right ) a -\ln \left (b^{2} x^{2}+2 a b x +a^{2}+1\right ) a +\pi }{2 b \left (b x +a \right )}\) \(122\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 53, normalized size = 1.13 \begin {gather*} \frac {\log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + 1\right )}{2 \, b} - \frac {\log \left (b x + a\right )}{b} - \frac {\operatorname {arccot}\left (b x + a\right )}{{\left (b x + a\right )} b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 2.11, size = 59, normalized size = 1.26 \begin {gather*} \frac {{\left (b x + a\right )} \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + 1\right ) - 2 \, {\left (b x + a\right )} \log \left (b x + a\right ) - 2 \, \operatorname {arccot}\left (b x + a\right )}{2 \, {\left (b^{2} x + a b\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 238 vs. \(2 (45) = 90\).
time = 0.44, size = 238, normalized size = 5.06 \begin {gather*} -\frac {\arctan \left (\frac {1}{b x + a}\right )^{2} - \frac {\arctan \left (\frac {1}{b x + a}\right )^{2} \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{2} - \log \left (\frac {4 \, {\left (\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 )^{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 )^{2} - \arctan \left (\frac {1}{b x + a}\right )^{2} + 4 \, \arctan \left (\frac {1}{b x + a}\right ) \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right ) + \log \left (\frac {4 \, {\left (\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 )^{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 )^{2} - 1}}{2 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.77, size = 57, normalized size = 1.21 \begin {gather*} \frac {\ln \left (-a^2-2\,a\,b\,x-b^2\,x^2-1\right )}{2\,b}-\frac {\ln \left (a+b\,x\right )}{b}-\frac {\mathrm {acot}\left (a+b\,x\right )}{x\,b^2+a\,b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________