3.139 \(\int \frac {(a+b \cot ^{-1}(c+d x))^2}{e+f x} \, dx\)

Optimal. Leaf size=261 \[ \frac {i b \left (a+b \cot ^{-1}(c+d x)\right ) \text {Li}_2\left (1-\frac {2 d (e+f x)}{(d e-c f+i f) (1-i (c+d x))}\right )}{f}+\frac {\left (a+b \cot ^{-1}(c+d x)\right )^2 \log \left (\frac {2 d (e+f x)}{(1-i (c+d x)) (-c f+d e+i f)}\right )}{f}-\frac {i b \text {Li}_2\left (1-\frac {2}{1-i (c+d x)}\right ) \left (a+b \cot ^{-1}(c+d x)\right )}{f}-\frac {\log \left (\frac {2}{1-i (c+d x)}\right ) \left (a+b \cot ^{-1}(c+d x)\right )^2}{f}+\frac {b^2 \text {Li}_3\left (1-\frac {2 d (e+f x)}{(d e-c f+i f) (1-i (c+d x))}\right )}{2 f}-\frac {b^2 \text {Li}_3\left (1-\frac {2}{1-i (c+d x)}\right )}{2 f} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.18, antiderivative size = 261, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {5048, 4859} \[ \frac {i b \left (a+b \cot ^{-1}(c+d x)\right ) \text {PolyLog}\left (2,1-\frac {2 d (e+f x)}{(1-i (c+d x)) (-c f+d e+i f)}\right )}{f}-\frac {i b \text {PolyLog}\left (2,1-\frac {2}{1-i (c+d x)}\right ) \left (a+b \cot ^{-1}(c+d x)\right )}{f}+\frac {b^2 \text {PolyLog}\left (3,1-\frac {2 d (e+f x)}{(1-i (c+d x)) (-c f+d e+i f)}\right )}{2 f}-\frac {b^2 \text {PolyLog}\left (3,1-\frac {2}{1-i (c+d x)}\right )}{2 f}+\frac {\left (a+b \cot ^{-1}(c+d x)\right )^2 \log \left (\frac {2 d (e+f x)}{(1-i (c+d x)) (-c f+d e+i f)}\right )}{f}-\frac {\log \left (\frac {2}{1-i (c+d x)}\right ) \left (a+b \cot ^{-1}(c+d x)\right )^2}{f} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 4859

Int[((a_.) + ArcCot[(c_.)*(x_)]*(b_.))^2/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[((a + b*ArcCot[c*x])^2*Log[2/
(1 - I*c*x)])/e, x] + (Simp[((a + b*ArcCot[c*x])^2*Log[(2*c*(d + e*x))/((c*d + I*e)*(1 - I*c*x))])/e, x] - Sim
p[(I*b*(a + b*ArcCot[c*x])*PolyLog[2, 1 - 2/(1 - I*c*x)])/e, x] + Simp[(I*b*(a + b*ArcCot[c*x])*PolyLog[2, 1 -
 (2*c*(d + e*x))/((c*d + I*e)*(1 - I*c*x))])/e, x] - Simp[(b^2*PolyLog[3, 1 - 2/(1 - I*c*x)])/(2*e), x] + Simp
[(b^2*PolyLog[3, 1 - (2*c*(d + e*x))/((c*d + I*e)*(1 - I*c*x))])/(2*e), x]) /; FreeQ[{a, b, c, d, e}, x] && Ne
Q[c^2*d^2 + e^2, 0]

Rule 5048

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [F]  time = 7.04, size = 0, normalized size = 0.00 \[ \int \frac {\left (a+b \cot ^{-1}(c+d x)\right )^2}{e+f x} \, dx \]

Verification is Not applicable to the result.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [F]  time = 0.67, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {b^{2} \operatorname {arccot}\left (d x + c\right )^{2} + 2 \, a b \operatorname {arccot}\left (d x + c\right ) + a^{2}}{f x + e}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

maple [C]  time = 2.53, size = 2201, normalized size = 8.43 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*b^2/f*polylog(3,(I+d*x+c)/(1+(d*x+c)^2)^(1/2))-2*b^2/f*polylog(3,-(I+d*x+c)/(1+(d*x+c)^2)^(1/2))+a^2*ln(f*(
d*x+c)-c*f+d*e)/f-b^2/f*arccot(d*x+c)^2*ln(1+(I+d*x+c)/(1+(d*x+c)^2)^(1/2))+1/2*b^2*c/(-I*f+c*f-d*e)*polylog(3
,(d*e+I*f-c*f)/(-c*f+d*e-I*f)*(I+d*x+c)^2/(1+(d*x+c)^2))-b^2/f*arccot(d*x+c)^2*ln(1-(I+d*x+c)/(1+(d*x+c)^2)^(1
/2))+b^2*ln(f*(d*x+c)-c*f+d*e)/f*arccot(d*x+c)^2+b^2/f*arccot(d*x+c)^2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^
2)-c*f+d*e-I*(I+d*x+c)^2/(1+(d*x+c)^2)*f-I*f)/((I+d*x+c)^2/(1+(d*x+c)^2)-1))^2-I*b^2*c/(-I*f+c*f-d*e)*arccot(d
*x+c)*polylog(2,(d*e+I*f-c*f)/(-c*f+d*e-I*f)*(I+d*x+c)^2/(1+(d*x+c)^2))-1/2*I*b^2/f*Pi*arccot(d*x+c)^2*csgn(I*
(c*f*(I+d*x+c)^2/(1+(d*x+c)^2)-d*e*(I+d*x+c)^2/(1+(d*x+c)^2)-c*f+d*e-I*(I+d*x+c)^2/(1+(d*x+c)^2)*f-I*f)/((I+d*
x+c)^2/(1+(d*x+c)^2)-1))^3-I*a*b*ln(f*(d*x+c)-c*f+d*e)/f*ln((I*f-f*(d*x+c))/(d*e+I*f-c*f))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {a^{2} \log \left (f x + e\right )}{f} + \int \frac {12 \, b^{2} \arctan \left (1, d x + c\right )^{2} + b^{2} \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )^{2} + 32 \, a b \arctan \left (1, d x + c\right )}{16 \, {\left (f x + e\right )}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

a^2*log(f*x + e)/f + integrate(1/16*(12*b^2*arctan2(1, d*x + c)^2 + b^2*log(d^2*x^2 + 2*c*d*x + c^2 + 1)^2 + 3
2*a*b*arctan2(1, d*x + c))/(f*x + e), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\left (a+b\,\mathrm {acot}\left (c+d\,x\right )\right )}^2}{e+f\,x} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________