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

Optimal. Leaf size=102 \[ \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}+\frac {i b^2 \text {Li}_2\left (1-\frac {2}{i (c+d x)+1}\right )}{d} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.12, antiderivative size = 102, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, 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 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]

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

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.17, size = 118, normalized size = 1.16 \[ \frac {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 )+i b^2 \text {Li}_2\left (e^{2 i \cot ^{-1}(c+d x)}\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

________________________________________________________________________________________

fricas [F]  time = 0.62, size = 0, normalized size = 0.00 \[ {\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 ) \]

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)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \operatorname {arccot}\left (d x + c\right ) + a\right )}^{2}\,{d x} \]

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)

________________________________________________________________________________________

maple [B]  time = 0.33, size = 236, normalized size = 2.31 \[ \mathrm {arccot}\left (d x +c \right )^{2} x \,b^{2}+\frac {i \mathrm {arccot}\left (d x +c \right )^{2} b^{2}}{d}+\frac {\mathrm {arccot}\left (d x +c \right )^{2} b^{2} c}{d}+2 \,\mathrm {arccot}\left (d x +c \right ) x a b -\frac {2 \ln \left (1-\frac {d x +c +i}{\sqrt {1+\left (d x +c \right )^{2}}}\right ) \mathrm {arccot}\left (d x +c \right ) b^{2}}{d}-\frac {2 \ln \left (1+\frac {d x +c +i}{\sqrt {1+\left (d x +c \right )^{2}}}\right ) \mathrm {arccot}\left (d x +c \right ) b^{2}}{d}+\frac {2 \,\mathrm {arccot}\left (d x +c \right ) a b c}{d}+\frac {2 i \polylog \left (2, \frac {d x +c +i}{\sqrt {1+\left (d x +c \right )^{2}}}\right ) b^{2}}{d}+\frac {2 i \polylog \left (2, -\frac {d x +c +i}{\sqrt {1+\left (d x +c \right )^{2}}}\right ) b^{2}}{d}+a^{2} x +\frac {a b \ln \left (1+\left (d x +c \right )^{2}\right )}{d}+\frac {a^{2} c}{d} \]

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*ln(1-(I+d*x+
c)/(1+(d*x+c)^2)^(1/2))*arccot(d*x+c)*b^2-2/d*ln(1+(I+d*x+c)/(1+(d*x+c)^2)^(1/2))*arccot(d*x+c)*b^2+2/d*arccot
(d*x+c)*a*b*c+2*I/d*polylog(2,(I+d*x+c)/(1+(d*x+c)^2)^(1/2))*b^2+2*I/d*polylog(2,-(I+d*x+c)/(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.00, size = 0, normalized size = 0.00 \[ \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} \]

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

________________________________________________________________________________________

mupad [B]  time = 0.97, size = 123, normalized size = 1.21 \[ a^2\,x+\frac {a\,b\,\left (\ln \left ({\left (c+d\,x\right )}^2+1\right )+2\,\mathrm {acot}\left (c+d\,x\right )\,\left (c+d\,x\right )\right )}{d}-\frac {2\,b^2\,\ln \left (1-{\mathrm {e}}^{\mathrm {acot}\left (c+d\,x\right )\,2{}\mathrm {i}}\right )\,\mathrm {acot}\left (c+d\,x\right )}{d}+\frac {b^2\,{\mathrm {acot}\left (c+d\,x\right )}^2\,\left (c+d\,x\right )}{d}+\frac {b^2\,\mathrm {polylog}\left (2,{\mathrm {e}}^{\mathrm {acot}\left (c+d\,x\right )\,2{}\mathrm {i}}\right )\,1{}\mathrm {i}}{d}+\frac {b^2\,{\mathrm {acot}\left (c+d\,x\right )}^2\,1{}\mathrm {i}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

a^2*x + (b^2*polylog(2, exp(acot(c + d*x)*2i))*1i)/d + (b^2*acot(c + d*x)^2*1i)/d + (a*b*(log((c + d*x)^2 + 1)
 + 2*acot(c + d*x)*(c + d*x)))/d - (2*b^2*log(1 - exp(acot(c + d*x)*2i))*acot(c + d*x))/d + (b^2*acot(c + d*x)
^2*(c + d*x))/d

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \operatorname {acot}{\left (c + d x \right )}\right )^{2}\, dx \]

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)

________________________________________________________________________________________