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

Optimal. Leaf size=102 \[ \frac{i b^2 \text{PolyLog}\left (2,1-\frac{2}{1+i (c+d x)}\right )}{d}+\frac{(c+d x) \left (a+b \cot ^{-1}(c+d x)\right )^2}{d}+\frac{i \left (a+b \cot ^{-1}(c+d x)\right )^2}{d}-\frac{2 b \log \left (\frac{2}{1+i (c+d x)}\right ) \left (a+b \cot ^{-1}(c+d x)\right )}{d} \]

[Out]

(I*(a + b*ArcCot[c + d*x])^2)/d + ((c + d*x)*(a + b*ArcCot[c + d*x])^2)/d - (2*b*(a + b*ArcCot[c + d*x])*Log[2
/(1 + I*(c + d*x))])/d + (I*b^2*PolyLog[2, 1 - 2/(1 + I*(c + d*x))])/d

________________________________________________________________________________________

Rubi [A]  time = 0.116343, antiderivative size = 102, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, Rules used = {5040, 4847, 4921, 4855, 2402, 2315} \[ \frac{i b^2 \text{PolyLog}\left (2,1-\frac{2}{1+i (c+d x)}\right )}{d}+\frac{(c+d x) \left (a+b \cot ^{-1}(c+d x)\right )^2}{d}+\frac{i \left (a+b \cot ^{-1}(c+d x)\right )^2}{d}-\frac{2 b \log \left (\frac{2}{1+i (c+d x)}\right ) \left (a+b \cot ^{-1}(c+d x)\right )}{d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(I*(a + b*ArcCot[c + d*x])^2)/d + ((c + d*x)*(a + b*ArcCot[c + d*x])^2)/d - (2*b*(a + b*ArcCot[c + d*x])*Log[2
/(1 + I*(c + d*x))])/d + (I*b^2*PolyLog[2, 1 - 2/(1 + I*(c + d*x))])/d

Rule 5040

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

Rule 4847

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

Rule 4921

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

Rule 4855

Int[((a_.) + ArcCot[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[((a + b*ArcCot[c*x])^p*Lo
g[2/(1 + (e*x)/d)])/e, x] - Dist[(b*c*p)/e, Int[((a + b*ArcCot[c*x])^(p - 1)*Log[2/(1 + (e*x)/d)])/(1 + c^2*x^
2), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c^2*d^2 + e^2, 0]

Rule 2402

Int[Log[(c_.)/((d_) + (e_.)*(x_))]/((f_) + (g_.)*(x_)^2), x_Symbol] :> -Dist[e/g, Subst[Int[Log[2*d*x]/(1 - 2*
d*x), x], x, 1/(d + e*x)], x] /; FreeQ[{c, d, e, f, g}, x] && EqQ[c, 2*d] && EqQ[e^2*f + d^2*g, 0]

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rubi steps

\begin{align*} \int \left (a+b \cot ^{-1}(c+d x)\right )^2 \, dx &=\frac{\operatorname{Subst}\left (\int \left (a+b \cot ^{-1}(x)\right )^2 \, dx,x,c+d x\right )}{d}\\ &=\frac{(c+d x) \left (a+b \cot ^{-1}(c+d x)\right )^2}{d}+\frac{(2 b) \operatorname{Subst}\left (\int \frac{x \left (a+b \cot ^{-1}(x)\right )}{1+x^2} \, dx,x,c+d x\right )}{d}\\ &=\frac{i \left (a+b \cot ^{-1}(c+d x)\right )^2}{d}+\frac{(c+d x) \left (a+b \cot ^{-1}(c+d x)\right )^2}{d}-\frac{(2 b) \operatorname{Subst}\left (\int \frac{a+b \cot ^{-1}(x)}{i-x} \, dx,x,c+d x\right )}{d}\\ &=\frac{i \left (a+b \cot ^{-1}(c+d x)\right )^2}{d}+\frac{(c+d x) \left (a+b \cot ^{-1}(c+d x)\right )^2}{d}-\frac{2 b \left (a+b \cot ^{-1}(c+d x)\right ) \log \left (\frac{2}{1+i (c+d x)}\right )}{d}-\frac{\left (2 b^2\right ) \operatorname{Subst}\left (\int \frac{\log \left (\frac{2}{1+i x}\right )}{1+x^2} \, dx,x,c+d x\right )}{d}\\ &=\frac{i \left (a+b \cot ^{-1}(c+d x)\right )^2}{d}+\frac{(c+d x) \left (a+b \cot ^{-1}(c+d x)\right )^2}{d}-\frac{2 b \left (a+b \cot ^{-1}(c+d x)\right ) \log \left (\frac{2}{1+i (c+d x)}\right )}{d}+\frac{\left (2 i b^2\right ) \operatorname{Subst}\left (\int \frac{\log (2 x)}{1-2 x} \, dx,x,\frac{1}{1+i (c+d x)}\right )}{d}\\ &=\frac{i \left (a+b \cot ^{-1}(c+d x)\right )^2}{d}+\frac{(c+d x) \left (a+b \cot ^{-1}(c+d x)\right )^2}{d}-\frac{2 b \left (a+b \cot ^{-1}(c+d x)\right ) \log \left (\frac{2}{1+i (c+d x)}\right )}{d}+\frac{i b^2 \text{Li}_2\left (1-\frac{2}{1+i (c+d x)}\right )}{d}\\ \end{align*}

Mathematica [A]  time = 0.161494, size = 118, normalized size = 1.16 \[ \frac{i b^2 \text{PolyLog}\left (2,e^{2 i \cot ^{-1}(c+d x)}\right )+a \left (a c+a d x-2 b \log \left (\frac{1}{(c+d x) \sqrt{\frac{1}{(c+d x)^2}+1}}\right )\right )+2 b \cot ^{-1}(c+d x) \left (a c+a d x-b \log \left (1-e^{2 i \cot ^{-1}(c+d x)}\right )\right )+b^2 (c+d x+i) \cot ^{-1}(c+d x)^2}{d} \]

Warning: Unable to verify antiderivative.

[In]

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

[Out]

(b^2*(I + c + d*x)*ArcCot[c + d*x]^2 + 2*b*ArcCot[c + d*x]*(a*c + a*d*x - b*Log[1 - E^((2*I)*ArcCot[c + d*x])]
) + a*(a*c + a*d*x - 2*b*Log[1/((c + d*x)*Sqrt[1 + (c + d*x)^(-2)])]) + I*b^2*PolyLog[2, E^((2*I)*ArcCot[c + d
*x])])/d

________________________________________________________________________________________

Maple [B]  time = 0.143, size = 236, normalized size = 2.3 \begin{align*} \left ({\rm arccot} \left (dx+c\right ) \right ) ^{2}x{b}^{2}+{\frac{i \left ({\rm arccot} \left (dx+c\right ) \right ) ^{2}{b}^{2}}{d}}+{\frac{ \left ({\rm arccot} \left (dx+c\right ) \right ) ^{2}{b}^{2}c}{d}}+2\,{\rm arccot} \left (dx+c\right )xab-2\,{\frac{{\rm arccot} \left (dx+c\right ){b}^{2}}{d}\ln \left ( 1+{\frac{dx+c+i}{\sqrt{1+ \left ( dx+c \right ) ^{2}}}} \right ) }-2\,{\frac{{\rm arccot} \left (dx+c\right ){b}^{2}}{d}\ln \left ( 1-{\frac{dx+c+i}{\sqrt{1+ \left ( dx+c \right ) ^{2}}}} \right ) }+2\,{\frac{{\rm arccot} \left (dx+c\right )abc}{d}}+{\frac{2\,i{b}^{2}}{d}{\it polylog} \left ( 2,{(dx+c+i){\frac{1}{\sqrt{1+ \left ( dx+c \right ) ^{2}}}}} \right ) }+{\frac{2\,i{b}^{2}}{d}{\it polylog} \left ( 2,-{(dx+c+i){\frac{1}{\sqrt{1+ \left ( dx+c \right ) ^{2}}}}} \right ) }+{a}^{2}x+{\frac{ab\ln \left ( 1+ \left ( dx+c \right ) ^{2} \right ) }{d}}+{\frac{{a}^{2}c}{d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{1}{16} \,{\left (4 \, x \arctan \left (1, d x + c\right )^{2} - x \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )^{2} + 16 \, \int \frac{12 \, d^{2} x^{2} \arctan \left (1, d x + c\right )^{2} + 12 \, c^{2} \arctan \left (1, d x + c\right )^{2} + 8 \,{\left (3 \, c \arctan \left (1, d x + c\right )^{2} + \arctan \left (1, d x + c\right )\right )} d x +{\left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )} \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )^{2} + 12 \, \arctan \left (1, d x + c\right )^{2} + 4 \,{\left (d^{2} x^{2} + c d x\right )} \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )}{16 \,{\left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )}}\,{d x}\right )} b^{2} + a^{2} x + \frac{{\left (2 \,{\left (d x + c\right )} \operatorname{arccot}\left (d x + c\right ) + \log \left ({\left (d x + c\right )}^{2} + 1\right )\right )} a b}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/16*(4*x*arctan2(1, d*x + c)^2 - x*log(d^2*x^2 + 2*c*d*x + c^2 + 1)^2 + 16*integrate(1/16*(12*d^2*x^2*arctan2
(1, d*x + c)^2 + 12*c^2*arctan2(1, d*x + c)^2 + 8*(3*c*arctan2(1, d*x + c)^2 + arctan2(1, d*x + c))*d*x + (d^2
*x^2 + 2*c*d*x + c^2 + 1)*log(d^2*x^2 + 2*c*d*x + c^2 + 1)^2 + 12*arctan2(1, d*x + c)^2 + 4*(d^2*x^2 + c*d*x)*
log(d^2*x^2 + 2*c*d*x + c^2 + 1))/(d^2*x^2 + 2*c*d*x + c^2 + 1), x))*b^2 + a^2*x + (2*(d*x + c)*arccot(d*x + c
) + log((d*x + c)^2 + 1))*a*b/d

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (b^{2} \operatorname{arccot}\left (d x + c\right )^{2} + 2 \, a b \operatorname{arccot}\left (d x + c\right ) + a^{2}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integral(b^2*arccot(d*x + c)^2 + 2*a*b*arccot(d*x + c) + a^2, x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \operatorname{acot}{\left (c + d x \right )}\right )^{2}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral((a + b*acot(c + d*x))**2, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \operatorname{arccot}\left (d x + c\right ) + a\right )}^{2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate((b*arccot(d*x + c) + a)^2, x)