Integrand size = 12, antiderivative size = 102 \[ \int \left (a+b \cot ^{-1}(c+d x)\right )^2 \, dx=\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 \operatorname {PolyLog}\left (2,1-\frac {2}{1+i (c+d x)}\right )}{d} \] Output:
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
Time = 0.13 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.16 \[ \int \left (a+b \cot ^{-1}(c+d x)\right )^2 \, dx=\frac {b^2 (i+c+d x) \cot ^{-1}(c+d x)^2+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 )+a \left (a c+a d x-2 b \log \left (\frac {1}{(c+d x) \sqrt {1+\frac {1}{(c+d x)^2}}}\right )\right )+i b^2 \operatorname {PolyLog}\left (2,e^{2 i \cot ^{-1}(c+d x)}\right )}{d} \] Input:
Integrate[(a + b*ArcCot[c + d*x])^2,x]
Output:
(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
Time = 0.48 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {5563, 5346, 5456, 5380, 2849, 2752}
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 \left (a+b \cot ^{-1}(c+d x)\right )^2 \, dx\) |
\(\Big \downarrow \) 5563 |
\(\displaystyle \frac {\int \left (a+b \cot ^{-1}(c+d x)\right )^2d(c+d x)}{d}\) |
\(\Big \downarrow \) 5346 |
\(\displaystyle \frac {2 b \int \frac {(c+d x) \left (a+b \cot ^{-1}(c+d x)\right )}{(c+d x)^2+1}d(c+d x)+(c+d x) \left (a+b \cot ^{-1}(c+d x)\right )^2}{d}\) |
\(\Big \downarrow \) 5456 |
\(\displaystyle \frac {(c+d x) \left (a+b \cot ^{-1}(c+d x)\right )^2+2 b \left (\frac {i \left (a+b \cot ^{-1}(c+d x)\right )^2}{2 b}-\int \frac {a+b \cot ^{-1}(c+d x)}{-c-d x+i}d(c+d x)\right )}{d}\) |
\(\Big \downarrow \) 5380 |
\(\displaystyle \frac {(c+d x) \left (a+b \cot ^{-1}(c+d x)\right )^2+2 b \left (-b \int \frac {\log \left (\frac {2}{i (c+d x)+1}\right )}{(c+d x)^2+1}d(c+d x)+\frac {i \left (a+b \cot ^{-1}(c+d x)\right )^2}{2 b}-\log \left (\frac {2}{1+i (c+d x)}\right ) \left (a+b \cot ^{-1}(c+d x)\right )\right )}{d}\) |
\(\Big \downarrow \) 2849 |
\(\displaystyle \frac {(c+d x) \left (a+b \cot ^{-1}(c+d x)\right )^2+2 b \left (i b \int \frac {\log \left (\frac {2}{i (c+d x)+1}\right )}{1-\frac {2}{i (c+d x)+1}}d\frac {1}{i (c+d x)+1}+\frac {i \left (a+b \cot ^{-1}(c+d x)\right )^2}{2 b}-\log \left (\frac {2}{1+i (c+d x)}\right ) \left (a+b \cot ^{-1}(c+d x)\right )\right )}{d}\) |
\(\Big \downarrow \) 2752 |
\(\displaystyle \frac {(c+d x) \left (a+b \cot ^{-1}(c+d x)\right )^2+2 b \left (\frac {i \left (a+b \cot ^{-1}(c+d x)\right )^2}{2 b}-\log \left (\frac {2}{1+i (c+d x)}\right ) \left (a+b \cot ^{-1}(c+d x)\right )+\frac {1}{2} i b \operatorname {PolyLog}\left (2,1-\frac {2}{i (c+d x)+1}\right )\right )}{d}\) |
Input:
Int[(a + b*ArcCot[c + d*x])^2,x]
Output:
((c + d*x)*(a + b*ArcCot[c + d*x])^2 + 2*b*(((I/2)*(a + b*ArcCot[c + d*x]) ^2)/b - (a + b*ArcCot[c + d*x])*Log[2/(1 + I*(c + d*x))] + (I/2)*b*PolyLog [2, 1 - 2/(1 + I*(c + d*x))]))/d
Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-e^(-1))*PolyLo g[2, 1 - c*x], x] /; FreeQ[{c, d, e}, x] && EqQ[e + c*d, 0]
Int[Log[(c_.)/((d_) + (e_.)*(x_))]/((f_) + (g_.)*(x_)^2), x_Symbol] :> Simp [-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]
Int[((a_.) + ArcCot[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*ArcCot[c*x^n])^p, x] + Simp[b*c*n*p Int[x^n*((a + b*ArcCot[c*x^n])^(p - 1)/(1 + c^2*x^(2*n))), x], x] /; FreeQ[{a, b, c, n}, x] && IGtQ[p, 0] && (EqQ[n, 1] || EqQ[p, 1])
Int[((a_.) + ArcCot[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-(a + b*ArcCot[c*x])^p)*(Log[2/(1 + e*(x/d))]/e), x] - Simp[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 ]
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] - Simp[ 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]
Int[((a_.) + ArcCot[(c_) + (d_.)*(x_)]*(b_.))^(p_.), x_Symbol] :> Simp[1/d Subst[Int[(a + b*ArcCot[x])^p, x], x, c + d*x], x] /; FreeQ[{a, b, c, d}, x] && IGtQ[p, 0]
Time = 1.29 (sec) , antiderivative size = 184, normalized size of antiderivative = 1.80
method | result | size |
parts | \(a^{2} x +\frac {b^{2} \left (\operatorname {arccot}\left (d x +c \right )^{2} \left (d x +c -i\right )-2 \,\operatorname {arccot}\left (d x +c \right ) \ln \left (1-\frac {d x +c +i}{\sqrt {1+\left (d x +c \right )^{2}}}\right )-2 \,\operatorname {arccot}\left (d x +c \right ) \ln \left (1+\frac {d x +c +i}{\sqrt {1+\left (d x +c \right )^{2}}}\right )+2 i \operatorname {arccot}\left (d x +c \right )^{2}+2 i \operatorname {polylog}\left (2, \frac {d x +c +i}{\sqrt {1+\left (d x +c \right )^{2}}}\right )+2 i \operatorname {polylog}\left (2, -\frac {d x +c +i}{\sqrt {1+\left (d x +c \right )^{2}}}\right )\right )}{d}+\frac {2 a b \left (\operatorname {arccot}\left (d x +c \right ) \left (d x +c \right )+\frac {\ln \left (1+\left (d x +c \right )^{2}\right )}{2}\right )}{d}\) | \(184\) |
derivativedivides | \(\frac {\left (d x +c \right ) a^{2}+b^{2} \left (\operatorname {arccot}\left (d x +c \right )^{2} \left (d x +c -i\right )-2 \,\operatorname {arccot}\left (d x +c \right ) \ln \left (1-\frac {d x +c +i}{\sqrt {1+\left (d x +c \right )^{2}}}\right )-2 \,\operatorname {arccot}\left (d x +c \right ) \ln \left (1+\frac {d x +c +i}{\sqrt {1+\left (d x +c \right )^{2}}}\right )+2 i \operatorname {arccot}\left (d x +c \right )^{2}+2 i \operatorname {polylog}\left (2, \frac {d x +c +i}{\sqrt {1+\left (d x +c \right )^{2}}}\right )+2 i \operatorname {polylog}\left (2, -\frac {d x +c +i}{\sqrt {1+\left (d x +c \right )^{2}}}\right )\right )+2 a b \,\operatorname {arccot}\left (d x +c \right ) \left (d x +c \right )+a b \ln \left (1+\left (d x +c \right )^{2}\right )}{d}\) | \(185\) |
default | \(\frac {\left (d x +c \right ) a^{2}+b^{2} \left (\operatorname {arccot}\left (d x +c \right )^{2} \left (d x +c -i\right )-2 \,\operatorname {arccot}\left (d x +c \right ) \ln \left (1-\frac {d x +c +i}{\sqrt {1+\left (d x +c \right )^{2}}}\right )-2 \,\operatorname {arccot}\left (d x +c \right ) \ln \left (1+\frac {d x +c +i}{\sqrt {1+\left (d x +c \right )^{2}}}\right )+2 i \operatorname {arccot}\left (d x +c \right )^{2}+2 i \operatorname {polylog}\left (2, \frac {d x +c +i}{\sqrt {1+\left (d x +c \right )^{2}}}\right )+2 i \operatorname {polylog}\left (2, -\frac {d x +c +i}{\sqrt {1+\left (d x +c \right )^{2}}}\right )\right )+2 a b \,\operatorname {arccot}\left (d x +c \right ) \left (d x +c \right )+a b \ln \left (1+\left (d x +c \right )^{2}\right )}{d}\) | \(185\) |
risch | \(a^{2} x +\frac {\pi ^{2} b^{2} x}{4}+\pi a b x -\frac {i \ln \left (-i d x -i c +1\right ) a b c}{d}-\frac {i \pi \ln \left (-i d x -i c +1\right ) b^{2} c}{2 d}+\frac {i b^{2} \pi \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right ) c}{4 d}+\frac {i b \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right ) a c}{2 d}+\frac {\pi ^{2} b^{2} c}{4 d}+\frac {b^{2} \pi \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right )}{4 d}+\frac {b \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right ) a}{2 d}-\frac {b^{2} \pi \arctan \left (d x +c \right ) c}{2 d}-\frac {b \arctan \left (d x +c \right ) a c}{d}+\frac {\pi a b c}{d}+\frac {a^{2} c}{d}+\frac {i a^{2}}{d}-\frac {\ln \left (-i d x -i c +1\right )^{2} b^{2} x}{4}+\frac {i b \arctan \left (d x +c \right ) a}{d}+\frac {i b^{2} \pi \arctan \left (d x +c \right )}{2 d}+\frac {i \pi a b}{d}-i \ln \left (-i d x -i c +1\right ) a b x -\frac {i \pi \ln \left (-i d x -i c +1\right ) b^{2} x}{2}+\frac {i b^{2} \ln \left (\frac {1}{2} i d x +\frac {1}{2} i c +\frac {1}{2}\right ) \ln \left (\frac {1}{2}-\frac {1}{2} i d x -\frac {1}{2} i c \right )}{d}-\frac {i b^{2} \ln \left (\frac {1}{2} i d x +\frac {1}{2} i c +\frac {1}{2}\right ) \ln \left (-i d x -i c +1\right )}{d}+\frac {\pi \ln \left (-i d x -i c +1\right ) b^{2}}{2 d}+\frac {\ln \left (-i d x -i c +1\right ) a b}{d}-\frac {\ln \left (-i d x -i c +1\right )^{2} b^{2} c}{4 d}+\frac {i \pi ^{2} b^{2}}{4 d}-\frac {i \ln \left (-i d x -i c +1\right )^{2} b^{2}}{4 d}+\frac {i b^{2} \operatorname {dilog}\left (\frac {1}{2}-\frac {1}{2} i d x -\frac {1}{2} i c \right )}{d}-\frac {b^{2} \left (d x +c -i\right ) \ln \left (1+i \left (d x +c \right )\right )^{2}}{4 d}+\left (\frac {b^{2} x \ln \left (1-i \left (d x +c \right )\right )}{2}+\frac {i b \left (\pi b d x +2 a x d +b \ln \left (1-i \left (d x +c \right )\right )-i \ln \left (1-i \left (d x +c \right )\right ) b c \right )}{2 d}\right ) \ln \left (1+i \left (d x +c \right )\right )\) | \(626\) |
Input:
int((a+b*arccot(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
a^2*x+b^2/d*(arccot(d*x+c)^2*(d*x+c-I)-2*arccot(d*x+c)*ln(1-(d*x+c+I)/(1+( d*x+c)^2)^(1/2))-2*arccot(d*x+c)*ln(1+(d*x+c+I)/(1+(d*x+c)^2)^(1/2))+2*I*a rccot(d*x+c)^2+2*I*polylog(2,(d*x+c+I)/(1+(d*x+c)^2)^(1/2))+2*I*polylog(2, -(d*x+c+I)/(1+(d*x+c)^2)^(1/2)))+2*a*b/d*(arccot(d*x+c)*(d*x+c)+1/2*ln(1+( d*x+c)^2))
\[ \int \left (a+b \cot ^{-1}(c+d x)\right )^2 \, dx=\int { {\left (b \operatorname {arccot}\left (d x + c\right ) + a\right )}^{2} \,d x } \] Input:
integrate((a+b*arccot(d*x+c))^2,x, algorithm="fricas")
Output:
integral(b^2*arccot(d*x + c)^2 + 2*a*b*arccot(d*x + c) + a^2, x)
\[ \int \left (a+b \cot ^{-1}(c+d x)\right )^2 \, dx=\int \left (a + b \operatorname {acot}{\left (c + d x \right )}\right )^{2}\, dx \] Input:
integrate((a+b*acot(d*x+c))**2,x)
Output:
Integral((a + b*acot(c + d*x))**2, x)
\[ \int \left (a+b \cot ^{-1}(c+d x)\right )^2 \, dx=\int { {\left (b \operatorname {arccot}\left (d x + c\right ) + a\right )}^{2} \,d x } \] Input:
integrate((a+b*arccot(d*x+c))^2,x, algorithm="maxima")
Output:
1/16*(4*x*arctan2(1, d*x + c)^2 - x*log(d^2*x^2 + 2*c*d*x + c^2 + 1)^2 + 1 6*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
\[ \int \left (a+b \cot ^{-1}(c+d x)\right )^2 \, dx=\int { {\left (b \operatorname {arccot}\left (d x + c\right ) + a\right )}^{2} \,d x } \] Input:
integrate((a+b*arccot(d*x+c))^2,x, algorithm="giac")
Output:
integrate((b*arccot(d*x + c) + a)^2, x)
Time = 1.17 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.21 \[ \int \left (a+b \cot ^{-1}(c+d x)\right )^2 \, dx=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} \] Input:
int((a + b*acot(c + d*x))^2,x)
Output:
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
\[ \int \left (a+b \cot ^{-1}(c+d x)\right )^2 \, dx=\frac {\mathit {acot} \left (d x +c \right )^{2} b^{2} d x +2 \mathit {acot} \left (d x +c \right ) a b c +2 \mathit {acot} \left (d x +c \right ) a b d x +2 \left (\int \frac {\mathit {acot} \left (d x +c \right ) x}{d^{2} x^{2}+2 c d x +c^{2}+1}d x \right ) b^{2} d^{2}+\mathrm {log}\left (d^{2} x^{2}+2 c d x +c^{2}+1\right ) a b +a^{2} d x}{d} \] Input:
int((a+b*acot(d*x+c))^2,x)
Output:
(acot(c + d*x)**2*b**2*d*x + 2*acot(c + d*x)*a*b*c + 2*acot(c + d*x)*a*b*d *x + 2*int((acot(c + d*x)*x)/(c**2 + 2*c*d*x + d**2*x**2 + 1),x)*b**2*d**2 + log(c**2 + 2*c*d*x + d**2*x**2 + 1)*a*b + a**2*d*x)/d