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

Optimal result
Mathematica [A] (warning: unable to verify)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [F]
Sympy [F(-1)]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 35, antiderivative size = 187 \[ \int \frac {(a+b x)^2 \cot ^{-1}(a+b x)}{\sqrt {1+a^2+2 a b x+b^2 x^2}} \, dx=\frac {\sqrt {1+(a+b x)^2}}{2 b}+\frac {(a+b x) \sqrt {1+(a+b x)^2} \cot ^{-1}(a+b x)}{2 b}+\frac {i \cot ^{-1}(a+b x) \arctan \left (\frac {\sqrt {1+i (a+b x)}}{\sqrt {1-i (a+b x)}}\right )}{b}+\frac {i \operatorname {PolyLog}\left (2,-\frac {i \sqrt {1+i (a+b x)}}{\sqrt {1-i (a+b x)}}\right )}{2 b}-\frac {i \operatorname {PolyLog}\left (2,\frac {i \sqrt {1+i (a+b x)}}{\sqrt {1-i (a+b x)}}\right )}{2 b} \] Output:

1/2*(1+(b*x+a)^2)^(1/2)/b+1/2*(b*x+a)*(1+(b*x+a)^2)^(1/2)*arccot(b*x+a)/b+ 
I*arccot(b*x+a)*arctan((1+I*(b*x+a))^(1/2)/(1-I*(b*x+a))^(1/2))/b+1/2*I*po 
lylog(2,-I*(1+I*(b*x+a))^(1/2)/(1-I*(b*x+a))^(1/2))/b-1/2*I*polylog(2,I*(1 
+I*(b*x+a))^(1/2)/(1-I*(b*x+a))^(1/2))/b
 

Mathematica [A] (warning: unable to verify)

Time = 1.06 (sec) , antiderivative size = 202, normalized size of antiderivative = 1.08 \[ \int \frac {(a+b x)^2 \cot ^{-1}(a+b x)}{\sqrt {1+a^2+2 a b x+b^2 x^2}} \, dx=-\frac {\sqrt {(a+b x)^2 \left (1+\frac {1}{(a+b x)^2}\right )} \left (-2 \cot \left (\frac {1}{2} \cot ^{-1}(a+b x)\right )-\cot ^{-1}(a+b x) \csc ^2\left (\frac {1}{2} \cot ^{-1}(a+b x)\right )-4 \cot ^{-1}(a+b x) \log \left (1-e^{i \cot ^{-1}(a+b x)}\right )+4 \cot ^{-1}(a+b x) \log \left (1+e^{i \cot ^{-1}(a+b x)}\right )-4 i \operatorname {PolyLog}\left (2,-e^{i \cot ^{-1}(a+b x)}\right )+4 i \operatorname {PolyLog}\left (2,e^{i \cot ^{-1}(a+b x)}\right )+\cot ^{-1}(a+b x) \sec ^2\left (\frac {1}{2} \cot ^{-1}(a+b x)\right )-2 \tan \left (\frac {1}{2} \cot ^{-1}(a+b x)\right )\right )}{8 b (a+b x) \sqrt {1+\frac {1}{(a+b x)^2}}} \] Input:

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

Output:

-1/8*(Sqrt[(a + b*x)^2*(1 + (a + b*x)^(-2))]*(-2*Cot[ArcCot[a + b*x]/2] - 
ArcCot[a + b*x]*Csc[ArcCot[a + b*x]/2]^2 - 4*ArcCot[a + b*x]*Log[1 - E^(I* 
ArcCot[a + b*x])] + 4*ArcCot[a + b*x]*Log[1 + E^(I*ArcCot[a + b*x])] - (4* 
I)*PolyLog[2, -E^(I*ArcCot[a + b*x])] + (4*I)*PolyLog[2, E^(I*ArcCot[a + b 
*x])] + ArcCot[a + b*x]*Sec[ArcCot[a + b*x]/2]^2 - 2*Tan[ArcCot[a + b*x]/2 
]))/(b*(a + b*x)*Sqrt[1 + (a + b*x)^(-2)])
 

Rubi [A] (verified)

Time = 0.44 (sec) , antiderivative size = 177, normalized size of antiderivative = 0.95, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.114, Rules used = {5581, 5488, 241, 5422}

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 {(a+b x)^2 \cot ^{-1}(a+b x)}{\sqrt {a^2+2 a b x+b^2 x^2+1}} \, dx\)

\(\Big \downarrow \) 5581

\(\displaystyle \frac {\int \frac {(a+b x)^2 \cot ^{-1}(a+b x)}{\sqrt {(a+b x)^2+1}}d(a+b x)}{b}\)

\(\Big \downarrow \) 5488

\(\displaystyle \frac {\frac {1}{2} \int \frac {a+b x}{\sqrt {(a+b x)^2+1}}d(a+b x)-\frac {1}{2} \int \frac {\cot ^{-1}(a+b x)}{\sqrt {(a+b x)^2+1}}d(a+b x)+\frac {1}{2} (a+b x) \sqrt {(a+b x)^2+1} \cot ^{-1}(a+b x)}{b}\)

\(\Big \downarrow \) 241

\(\displaystyle \frac {-\frac {1}{2} \int \frac {\cot ^{-1}(a+b x)}{\sqrt {(a+b x)^2+1}}d(a+b x)+\frac {1}{2} \sqrt {(a+b x)^2+1}+\frac {1}{2} (a+b x) \sqrt {(a+b x)^2+1} \cot ^{-1}(a+b x)}{b}\)

\(\Big \downarrow \) 5422

\(\displaystyle \frac {\frac {1}{2} \left (2 i \arctan \left (\frac {\sqrt {1+i (a+b x)}}{\sqrt {1-i (a+b x)}}\right ) \cot ^{-1}(a+b x)+i \operatorname {PolyLog}\left (2,-\frac {i \sqrt {i (a+b x)+1}}{\sqrt {1-i (a+b x)}}\right )-i \operatorname {PolyLog}\left (2,\frac {i \sqrt {i (a+b x)+1}}{\sqrt {1-i (a+b x)}}\right )\right )+\frac {1}{2} \sqrt {(a+b x)^2+1}+\frac {1}{2} (a+b x) \sqrt {(a+b x)^2+1} \cot ^{-1}(a+b x)}{b}\)

Input:

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

Output:

(Sqrt[1 + (a + b*x)^2]/2 + ((a + b*x)*Sqrt[1 + (a + b*x)^2]*ArcCot[a + b*x 
])/2 + ((2*I)*ArcCot[a + b*x]*ArcTan[Sqrt[1 + I*(a + b*x)]/Sqrt[1 - I*(a + 
 b*x)]] + I*PolyLog[2, ((-I)*Sqrt[1 + I*(a + b*x)])/Sqrt[1 - I*(a + b*x)]] 
 - I*PolyLog[2, (I*Sqrt[1 + I*(a + b*x)])/Sqrt[1 - I*(a + b*x)]])/2)/b
 

Defintions of rubi rules used

rule 241
Int[(x_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(a + b*x^2)^(p + 1)/ 
(2*b*(p + 1)), x] /; FreeQ[{a, b, p}, x] && NeQ[p, -1]
 

rule 5422
Int[((a_.) + ArcCot[(c_.)*(x_)]*(b_.))/Sqrt[(d_) + (e_.)*(x_)^2], x_Symbol] 
 :> Simp[-2*I*(a + b*ArcCot[c*x])*(ArcTan[Sqrt[1 + I*c*x]/Sqrt[1 - I*c*x]]/ 
(c*Sqrt[d])), x] + (-Simp[I*b*(PolyLog[2, (-I)*(Sqrt[1 + I*c*x]/Sqrt[1 - I* 
c*x])]/(c*Sqrt[d])), x] + Simp[I*b*(PolyLog[2, I*(Sqrt[1 + I*c*x]/Sqrt[1 - 
I*c*x])]/(c*Sqrt[d])), x]) /; FreeQ[{a, b, c, d, e}, x] && EqQ[e, c^2*d] && 
 GtQ[d, 0]
 

rule 5488
Int[(((a_.) + ArcCot[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_))/Sqrt[(d_) 
+ (e_.)*(x_)^2], x_Symbol] :> Simp[f*(f*x)^(m - 1)*Sqrt[d + e*x^2]*((a + b* 
ArcCot[c*x])^p/(c^2*d*m)), x] + (Simp[b*f*(p/(c*m))   Int[(f*x)^(m - 1)*((a 
 + b*ArcCot[c*x])^(p - 1)/Sqrt[d + e*x^2]), x], x] - Simp[f^2*((m - 1)/(c^2 
*m))   Int[(f*x)^(m - 2)*((a + b*ArcCot[c*x])^p/Sqrt[d + e*x^2]), x], x]) / 
; FreeQ[{a, b, c, d, e, f}, x] && EqQ[e, c^2*d] && GtQ[p, 0] && GtQ[m, 1]
 

rule 5581
Int[((a_.) + ArcCot[(c_) + (d_.)*(x_)]*(b_.))^(p_.)*((e_.) + (f_.)*(x_))^(m 
_.)*((A_.) + (B_.)*(x_) + (C_.)*(x_)^2)^(q_.), x_Symbol] :> Simp[1/d   Subs 
t[Int[((d*e - c*f)/d + f*(x/d))^m*(C/d^2 + (C/d^2)*x^2)^q*(a + b*ArcCot[x]) 
^p, x], x, c + d*x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, m, p, q}, x] & 
& EqQ[B*(1 + c^2) - 2*A*c*d, 0] && EqQ[2*c*C - B*d, 0]
 
Maple [A] (verified)

Time = 1.83 (sec) , antiderivative size = 160, normalized size of antiderivative = 0.86

method result size
default \(\frac {\left (\operatorname {arccot}\left (b x +a \right ) b x +a \,\operatorname {arccot}\left (b x +a \right )+1\right ) \sqrt {b^{2} x^{2}+2 a b x +a^{2}+1}}{2 b}-\frac {i \left (i \operatorname {arccot}\left (b x +a \right ) \ln \left (1-\frac {b x +a +i}{\sqrt {1+\left (b x +a \right )^{2}}}\right )-i \operatorname {arccot}\left (b x +a \right ) \ln \left (\frac {b x +a +i}{\sqrt {1+\left (b x +a \right )^{2}}}+1\right )+\operatorname {polylog}\left (2, \frac {b x +a +i}{\sqrt {1+\left (b x +a \right )^{2}}}\right )-\operatorname {polylog}\left (2, -\frac {b x +a +i}{\sqrt {1+\left (b x +a \right )^{2}}}\right )\right )}{2 b}\) \(160\)

Input:

int((b*x+a)^2*arccot(b*x+a)/(b^2*x^2+2*a*b*x+a^2+1)^(1/2),x,method=_RETURN 
VERBOSE)
 

Output:

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

Fricas [F]

\[ \int \frac {(a+b x)^2 \cot ^{-1}(a+b x)}{\sqrt {1+a^2+2 a b x+b^2 x^2}} \, dx=\int { \frac {{\left (b x + a\right )}^{2} \operatorname {arccot}\left (b x + a\right )}{\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2} + 1}} \,d x } \] Input:

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

Output:

integral((b^2*x^2 + 2*a*b*x + a^2)*arccot(b*x + a)/sqrt(b^2*x^2 + 2*a*b*x 
+ a^2 + 1), x)
 

Sympy [F(-1)]

Timed out. \[ \int \frac {(a+b x)^2 \cot ^{-1}(a+b x)}{\sqrt {1+a^2+2 a b x+b^2 x^2}} \, dx=\text {Timed out} \] Input:

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

Output:

Timed out
 

Maxima [F]

\[ \int \frac {(a+b x)^2 \cot ^{-1}(a+b x)}{\sqrt {1+a^2+2 a b x+b^2 x^2}} \, dx=\int { \frac {{\left (b x + a\right )}^{2} \operatorname {arccot}\left (b x + a\right )}{\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2} + 1}} \,d x } \] Input:

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

Output:

integrate((b*x + a)^2*arccot(b*x + a)/sqrt(b^2*x^2 + 2*a*b*x + a^2 + 1), x 
)
 

Giac [F]

\[ \int \frac {(a+b x)^2 \cot ^{-1}(a+b x)}{\sqrt {1+a^2+2 a b x+b^2 x^2}} \, dx=\int { \frac {{\left (b x + a\right )}^{2} \operatorname {arccot}\left (b x + a\right )}{\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2} + 1}} \,d x } \] Input:

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

Output:

integrate((b*x + a)^2*arccot(b*x + a)/sqrt(b^2*x^2 + 2*a*b*x + a^2 + 1), x 
)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {(a+b x)^2 \cot ^{-1}(a+b x)}{\sqrt {1+a^2+2 a b x+b^2 x^2}} \, dx=\int \frac {\mathrm {acot}\left (a+b\,x\right )\,{\left (a+b\,x\right )}^2}{\sqrt {a^2+2\,a\,b\,x+b^2\,x^2+1}} \,d x \] Input:

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

Output:

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

Reduce [F]

\[ \int \frac {(a+b x)^2 \cot ^{-1}(a+b x)}{\sqrt {1+a^2+2 a b x+b^2 x^2}} \, dx=\left (\int \frac {\mathit {acot} \left (b x +a \right )}{\sqrt {b^{2} x^{2}+2 a b x +a^{2}+1}}d x \right ) a^{2}+\left (\int \frac {\mathit {acot} \left (b x +a \right ) x^{2}}{\sqrt {b^{2} x^{2}+2 a b x +a^{2}+1}}d x \right ) b^{2}+2 \left (\int \frac {\mathit {acot} \left (b x +a \right ) x}{\sqrt {b^{2} x^{2}+2 a b x +a^{2}+1}}d x \right ) a b \] Input:

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

Output:

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