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

Optimal result
Mathematica [C] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [F(-1)]
Maxima [A] (verification not implemented)
Giac [B] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 18, antiderivative size = 153 \[ \int \frac {a+b \cot ^{-1}(c+d x)}{(e+f x)^2} \, dx=-\frac {a+b \cot ^{-1}(c+d x)}{f (e+f x)}-\frac {b d (d e-c f) \arctan (c+d x)}{f \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )}-\frac {b d \log (e+f x)}{d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2}+\frac {b d \log \left (1+c^2+2 c d x+d^2 x^2\right )}{2 \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )} \] Output:

-(a+b*arccot(d*x+c))/f/(f*x+e)-b*d*(-c*f+d*e)*arctan(d*x+c)/f/(d^2*e^2-2*c 
*d*e*f+(c^2+1)*f^2)-b*d*ln(f*x+e)/(d^2*e^2-2*c*d*e*f+(c^2+1)*f^2)+b*d*ln(d 
^2*x^2+2*c*d*x+c^2+1)/(2*d^2*e^2-4*c*d*e*f+2*(c^2+1)*f^2)
 

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.15 (sec) , antiderivative size = 118, normalized size of antiderivative = 0.77 \[ \int \frac {a+b \cot ^{-1}(c+d x)}{(e+f x)^2} \, dx=\frac {-\frac {a+b \cot ^{-1}(c+d x)}{e+f x}+\frac {b d ((i d e+f-i c f) \log (i-c-d x)+(-i d e+f+i c f) \log (i+c+d x)-2 f \log (d (e+f x)))}{2 \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )}}{f} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.45 (sec) , antiderivative size = 149, normalized size of antiderivative = 0.97, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {5569, 2081, 1144, 27, 1142, 27, 1083, 217, 1103}

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 \cot ^{-1}(c+d x)}{(e+f x)^2} \, dx\)

\(\Big \downarrow \) 5569

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

\(\Big \downarrow \) 2081

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

\(\Big \downarrow \) 1144

\(\displaystyle -\frac {b d \left (\frac {\int \frac {d (d e-2 c f-d f x)}{c^2+2 d x c+d^2 x^2+1}dx}{\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2}+\frac {f \log (e+f x)}{\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2}\right )}{f}-\frac {a+b \cot ^{-1}(c+d x)}{f (e+f x)}\)

\(\Big \downarrow \) 27

\(\displaystyle -\frac {b d \left (\frac {d \int \frac {d e-2 c f-d f x}{c^2+2 d x c+d^2 x^2+1}dx}{\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2}+\frac {f \log (e+f x)}{\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2}\right )}{f}-\frac {a+b \cot ^{-1}(c+d x)}{f (e+f x)}\)

\(\Big \downarrow \) 1142

\(\displaystyle -\frac {b d \left (\frac {d \left ((d e-c f) \int \frac {1}{c^2+2 d x c+d^2 x^2+1}dx-\frac {f \int \frac {2 d (c+d x)}{c^2+2 d x c+d^2 x^2+1}dx}{2 d}\right )}{\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2}+\frac {f \log (e+f x)}{\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2}\right )}{f}-\frac {a+b \cot ^{-1}(c+d x)}{f (e+f x)}\)

\(\Big \downarrow \) 27

\(\displaystyle -\frac {b d \left (\frac {d \left ((d e-c f) \int \frac {1}{c^2+2 d x c+d^2 x^2+1}dx-f \int \frac {c+d x}{c^2+2 d x c+d^2 x^2+1}dx\right )}{\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2}+\frac {f \log (e+f x)}{\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2}\right )}{f}-\frac {a+b \cot ^{-1}(c+d x)}{f (e+f x)}\)

\(\Big \downarrow \) 1083

\(\displaystyle -\frac {b d \left (\frac {d \left (-f \int \frac {c+d x}{c^2+2 d x c+d^2 x^2+1}dx-2 (d e-c f) \int \frac {1}{-4 d^2-\left (2 x d^2+2 c d\right )^2}d\left (2 x d^2+2 c d\right )\right )}{\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2}+\frac {f \log (e+f x)}{\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2}\right )}{f}-\frac {a+b \cot ^{-1}(c+d x)}{f (e+f x)}\)

\(\Big \downarrow \) 217

\(\displaystyle -\frac {b d \left (\frac {d \left (\frac {\arctan \left (\frac {2 c d+2 d^2 x}{2 d}\right ) (d e-c f)}{d}-f \int \frac {c+d x}{c^2+2 d x c+d^2 x^2+1}dx\right )}{\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2}+\frac {f \log (e+f x)}{\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2}\right )}{f}-\frac {a+b \cot ^{-1}(c+d x)}{f (e+f x)}\)

\(\Big \downarrow \) 1103

\(\displaystyle -\frac {a+b \cot ^{-1}(c+d x)}{f (e+f x)}-\frac {b d \left (\frac {d \left (\frac {\arctan \left (\frac {2 c d+2 d^2 x}{2 d}\right ) (d e-c f)}{d}-\frac {f \log \left (c^2+2 c d x+d^2 x^2+1\right )}{2 d}\right )}{\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2}+\frac {f \log (e+f x)}{\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2}\right )}{f}\)

Input:

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

Output:

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

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 217
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( 
-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & 
& (LtQ[a, 0] || LtQ[b, 0])
 

rule 1083
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2   Subst[I 
nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, 
x]
 

rule 1103
Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S 
imp[d*(Log[RemoveContent[a + b*x + c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, 
e}, x] && EqQ[2*c*d - b*e, 0]
 

rule 1142
Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S 
imp[(2*c*d - b*e)/(2*c)   Int[1/(a + b*x + c*x^2), x], x] + Simp[e/(2*c) 
Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x]
 

rule 1144
Int[1/(((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)), x_Symbol] 
 :> Simp[e*(Log[RemoveContent[d + e*x, x]]/(c*d^2 - b*d*e + a*e^2)), x] + S 
imp[1/(c*d^2 - b*d*e + a*e^2)   Int[(c*d - b*e - c*e*x)/(a + b*x + c*x^2), 
x], x] /; FreeQ[{a, b, c, d, e}, x]
 

rule 2081
Int[(u_)^(m_.)*(v_)^(p_.), x_Symbol] :> Int[ExpandToSum[u, x]^m*ExpandToSum 
[v, x]^p, x] /; FreeQ[{m, p}, x] && LinearQ[u, x] && QuadraticQ[v, x] &&  ! 
(LinearMatchQ[u, x] && QuadraticMatchQ[v, x])
 

rule 5569
Int[((a_.) + ArcCot[(c_) + (d_.)*(x_)]*(b_.))^(p_.)*((e_.) + (f_.)*(x_))^(m 
_), x_Symbol] :> Simp[(e + f*x)^(m + 1)*((a + b*ArcCot[c + d*x])^p/(f*(m + 
1))), x] + Simp[b*d*(p/(f*(m + 1)))   Int[(e + f*x)^(m + 1)*((a + b*ArcCot[ 
c + d*x])^(p - 1)/(1 + (c + d*x)^2)), x], x] /; FreeQ[{a, b, c, d, e, f}, x 
] && IGtQ[p, 0] && ILtQ[m, -1]
 
Maple [A] (verified)

Time = 0.98 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.05

method result size
parts \(-\frac {a}{\left (f x +e \right ) f}+\frac {b \left (-\frac {d^{2} \operatorname {arccot}\left (d x +c \right )}{\left (f \left (d x +c \right )-c f +d e \right ) f}-\frac {d^{2} \left (\frac {-\frac {f \ln \left (1+\left (d x +c \right )^{2}\right )}{2}+\left (-c f +d e \right ) \arctan \left (d x +c \right )}{c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}}+\frac {f \ln \left (f \left (d x +c \right )-c f +d e \right )}{c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}}\right )}{f}\right )}{d}\) \(161\)
derivativedivides \(\frac {\frac {a \,d^{2}}{\left (c f -d e -f \left (d x +c \right )\right ) f}+b \,d^{2} \left (\frac {\operatorname {arccot}\left (d x +c \right )}{\left (c f -d e -f \left (d x +c \right )\right ) f}+\frac {-\frac {f \ln \left (c f -d e -f \left (d x +c \right )\right )}{c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}}+\frac {\frac {f \ln \left (1+\left (d x +c \right )^{2}\right )}{2}+\left (c f -d e \right ) \arctan \left (d x +c \right )}{c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}}}{f}\right )}{d}\) \(173\)
default \(\frac {\frac {a \,d^{2}}{\left (c f -d e -f \left (d x +c \right )\right ) f}+b \,d^{2} \left (\frac {\operatorname {arccot}\left (d x +c \right )}{\left (c f -d e -f \left (d x +c \right )\right ) f}+\frac {-\frac {f \ln \left (c f -d e -f \left (d x +c \right )\right )}{c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}}+\frac {\frac {f \ln \left (1+\left (d x +c \right )^{2}\right )}{2}+\left (c f -d e \right ) \arctan \left (d x +c \right )}{c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}}}{f}\right )}{d}\) \(173\)
parallelrisch \(-\frac {2 x \,\operatorname {arccot}\left (d x +c \right ) b c \,d^{3} f^{2}-2 x \,\operatorname {arccot}\left (d x +c \right ) b \,d^{4} e f +2 \ln \left (f x +e \right ) x b \,d^{3} f^{2}-\ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right ) x b \,d^{3} f^{2}+2 \,\operatorname {arccot}\left (d x +c \right ) b \,c^{2} d^{2} f^{2}-2 \,\operatorname {arccot}\left (d x +c \right ) b c \,d^{3} e f +2 \ln \left (f x +e \right ) b \,d^{3} e f -\ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right ) b \,d^{3} e f +2 a \,c^{2} d^{2} f^{2}-4 a c \,d^{3} e f +2 a \,d^{4} e^{2}+2 \,\operatorname {arccot}\left (d x +c \right ) b \,d^{2} f^{2}+2 a \,d^{2} f^{2}}{2 \left (f x +e \right ) \left (c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}\right ) d^{2} f}\) \(246\)
risch \(-\frac {i b \ln \left (1+i \left (d x +c \right )\right )}{2 f \left (f x +e \right )}-\frac {\pi b \,c^{2} f^{2}+\pi b \,d^{2} e^{2}+2 f^{2} a -4 a c d e f +\pi b \,f^{2}+2 e^{2} a \,d^{2}-i b \,c^{2} f^{2} \ln \left (1-i \left (d x +c \right )\right )-i b \,d^{2} e^{2} \ln \left (1-i \left (d x +c \right )\right )+2 \ln \left (f x +e \right ) b d \,f^{2} x +2 \ln \left (f x +e \right ) b d e f +2 a \,c^{2} f^{2}-2 \pi b c d e f +2 i b c d e f \ln \left (1-i \left (d x +c \right )\right )-i \ln \left (\left (c d f -d^{2} e +3 i d f \right ) x +2 i c f +i d e +c^{2} f -e d c +3 f \right ) b \,d^{2} e^{2}-\ln \left (\left (c d f -d^{2} e +3 i d f \right ) x +2 i c f +i d e +c^{2} f -e d c +3 f \right ) b d e f +i \ln \left (\left (-c d f +d^{2} e +3 i d f \right ) x +2 i c f +i d e -c^{2} f +e d c -3 f \right ) b \,d^{2} e^{2}-\ln \left (\left (-c d f +d^{2} e +3 i d f \right ) x +2 i c f +i d e -c^{2} f +e d c -3 f \right ) b d \,f^{2} x -\ln \left (\left (-c d f +d^{2} e +3 i d f \right ) x +2 i c f +i d e -c^{2} f +e d c -3 f \right ) b d e f -\ln \left (\left (c d f -d^{2} e +3 i d f \right ) x +2 i c f +i d e +c^{2} f -e d c +3 f \right ) b d \,f^{2} x +i \ln \left (\left (-c d f +d^{2} e +3 i d f \right ) x +2 i c f +i d e -c^{2} f +e d c -3 f \right ) b \,d^{2} e f x +i \ln \left (\left (c d f -d^{2} e +3 i d f \right ) x +2 i c f +i d e +c^{2} f -e d c +3 f \right ) b c d \,f^{2} x +i \ln \left (\left (c d f -d^{2} e +3 i d f \right ) x +2 i c f +i d e +c^{2} f -e d c +3 f \right ) b c d e f -i \ln \left (\left (-c d f +d^{2} e +3 i d f \right ) x +2 i c f +i d e -c^{2} f +e d c -3 f \right ) b c d \,f^{2} x -i \ln \left (\left (-c d f +d^{2} e +3 i d f \right ) x +2 i c f +i d e -c^{2} f +e d c -3 f \right ) b c d e f -i \ln \left (\left (c d f -d^{2} e +3 i d f \right ) x +2 i c f +i d e +c^{2} f -e d c +3 f \right ) b \,d^{2} e f x -i b \,f^{2} \ln \left (1-i \left (d x +c \right )\right )}{2 \left (f x +e \right ) \left (c f -d e +i f \right ) \left (c f -d e -i f \right ) f}\) \(856\)

Input:

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

Output:

-a/(f*x+e)/f+b/d*(-d^2/(f*(d*x+c)-c*f+d*e)/f*arccot(d*x+c)-d^2/f*(1/(c^2*f 
^2-2*c*d*e*f+d^2*e^2+f^2)*(-1/2*f*ln(1+(d*x+c)^2)+(-c*f+d*e)*arctan(d*x+c) 
)+1/(c^2*f^2-2*c*d*e*f+d^2*e^2+f^2)*f*ln(f*(d*x+c)-c*f+d*e)))
 

Fricas [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 223, normalized size of antiderivative = 1.46 \[ \int \frac {a+b \cot ^{-1}(c+d x)}{(e+f x)^2} \, dx=-\frac {2 \, a d^{2} e^{2} - 4 \, a c d e f + 2 \, {\left (a c^{2} + a\right )} f^{2} + 2 \, {\left (b d^{2} e^{2} - 2 \, b c d e f + {\left (b c^{2} + b\right )} f^{2}\right )} \operatorname {arccot}\left (d x + c\right ) + 2 \, {\left (b d^{2} e^{2} - b c d e f + {\left (b d^{2} e f - b c d f^{2}\right )} x\right )} \arctan \left (d x + c\right ) - {\left (b d f^{2} x + b d e f\right )} \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right ) + 2 \, {\left (b d f^{2} x + b d e f\right )} \log \left (f x + e\right )}{2 \, {\left (d^{2} e^{3} f - 2 \, c d e^{2} f^{2} + {\left (c^{2} + 1\right )} e f^{3} + {\left (d^{2} e^{2} f^{2} - 2 \, c d e f^{3} + {\left (c^{2} + 1\right )} f^{4}\right )} x\right )}} \] Input:

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

Output:

-1/2*(2*a*d^2*e^2 - 4*a*c*d*e*f + 2*(a*c^2 + a)*f^2 + 2*(b*d^2*e^2 - 2*b*c 
*d*e*f + (b*c^2 + b)*f^2)*arccot(d*x + c) + 2*(b*d^2*e^2 - b*c*d*e*f + (b* 
d^2*e*f - b*c*d*f^2)*x)*arctan(d*x + c) - (b*d*f^2*x + b*d*e*f)*log(d^2*x^ 
2 + 2*c*d*x + c^2 + 1) + 2*(b*d*f^2*x + b*d*e*f)*log(f*x + e))/(d^2*e^3*f 
- 2*c*d*e^2*f^2 + (c^2 + 1)*e*f^3 + (d^2*e^2*f^2 - 2*c*d*e*f^3 + (c^2 + 1) 
*f^4)*x)
 

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 177, normalized size of antiderivative = 1.16 \[ \int \frac {a+b \cot ^{-1}(c+d x)}{(e+f x)^2} \, dx=-\frac {1}{2} \, {\left (d {\left (\frac {2 \, {\left (d^{2} e - c d f\right )} \arctan \left (\frac {d^{2} x + c d}{d}\right )}{{\left (d^{2} e^{2} f - 2 \, c d e f^{2} + {\left (c^{2} + 1\right )} f^{3}\right )} d} - \frac {\log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )}{d^{2} e^{2} - 2 \, c d e f + {\left (c^{2} + 1\right )} f^{2}} + \frac {2 \, \log \left (f x + e\right )}{d^{2} e^{2} - 2 \, c d e f + {\left (c^{2} + 1\right )} f^{2}}\right )} + \frac {2 \, \operatorname {arccot}\left (d x + c\right )}{f^{2} x + e f}\right )} b - \frac {a}{f^{2} x + e f} \] Input:

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

Output:

-1/2*(d*(2*(d^2*e - c*d*f)*arctan((d^2*x + c*d)/d)/((d^2*e^2*f - 2*c*d*e*f 
^2 + (c^2 + 1)*f^3)*d) - log(d^2*x^2 + 2*c*d*x + c^2 + 1)/(d^2*e^2 - 2*c*d 
*e*f + (c^2 + 1)*f^2) + 2*log(f*x + e)/(d^2*e^2 - 2*c*d*e*f + (c^2 + 1)*f^ 
2)) + 2*arccot(d*x + c)/(f^2*x + e*f))*b - a/(f^2*x + e*f)
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1264 vs. \(2 (151) = 302\).

Time = 0.32 (sec) , antiderivative size = 1264, normalized size of antiderivative = 8.26 \[ \int \frac {a+b \cot ^{-1}(c+d x)}{(e+f x)^2} \, dx=\text {Too large to display} \] Input:

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

Output:

-1/2*(2*b*d*e*arctan(1/(d*x + c))*tan(1/2*arctan(1/(d*x + c)))^2 - 2*b*c*f 
*arctan(1/(d*x + c))*tan(1/2*arctan(1/(d*x + c)))^2 + 2*b*d*e*log(4*(4*d^2 
*e^2*tan(1/2*arctan(1/(d*x + c)))^2 - 8*c*d*e*f*tan(1/2*arctan(1/(d*x + c) 
))^2 + 4*c^2*f^2*tan(1/2*arctan(1/(d*x + c)))^2 - 4*d*e*f*tan(1/2*arctan(1 
/(d*x + c)))^3 + 4*c*f^2*tan(1/2*arctan(1/(d*x + c)))^3 + f^2*tan(1/2*arct 
an(1/(d*x + c)))^4 + 4*d*e*f*tan(1/2*arctan(1/(d*x + c))) - 4*c*f^2*tan(1/ 
2*arctan(1/(d*x + c))) - 2*f^2*tan(1/2*arctan(1/(d*x + c)))^2 + f^2)/(tan( 
1/2*arctan(1/(d*x + c)))^4 + 2*tan(1/2*arctan(1/(d*x + c)))^2 + 1))*tan(1/ 
2*arctan(1/(d*x + c))) - 2*b*c*f*log(4*(4*d^2*e^2*tan(1/2*arctan(1/(d*x + 
c)))^2 - 8*c*d*e*f*tan(1/2*arctan(1/(d*x + c)))^2 + 4*c^2*f^2*tan(1/2*arct 
an(1/(d*x + c)))^2 - 4*d*e*f*tan(1/2*arctan(1/(d*x + c)))^3 + 4*c*f^2*tan( 
1/2*arctan(1/(d*x + c)))^3 + f^2*tan(1/2*arctan(1/(d*x + c)))^4 + 4*d*e*f* 
tan(1/2*arctan(1/(d*x + c))) - 4*c*f^2*tan(1/2*arctan(1/(d*x + c))) - 2*f^ 
2*tan(1/2*arctan(1/(d*x + c)))^2 + f^2)/(tan(1/2*arctan(1/(d*x + c)))^4 + 
2*tan(1/2*arctan(1/(d*x + c)))^2 + 1))*tan(1/2*arctan(1/(d*x + c))) + 2*a* 
d*e*tan(1/2*arctan(1/(d*x + c)))^2 - 2*a*c*f*tan(1/2*arctan(1/(d*x + c)))^ 
2 - b*f*log(4*(4*d^2*e^2*tan(1/2*arctan(1/(d*x + c)))^2 - 8*c*d*e*f*tan(1/ 
2*arctan(1/(d*x + c)))^2 + 4*c^2*f^2*tan(1/2*arctan(1/(d*x + c)))^2 - 4*d* 
e*f*tan(1/2*arctan(1/(d*x + c)))^3 + 4*c*f^2*tan(1/2*arctan(1/(d*x + c)))^ 
3 + f^2*tan(1/2*arctan(1/(d*x + c)))^4 + 4*d*e*f*tan(1/2*arctan(1/(d*x ...
 

Mupad [B] (verification not implemented)

Time = 2.08 (sec) , antiderivative size = 128, normalized size of antiderivative = 0.84 \[ \int \frac {a+b \cot ^{-1}(c+d x)}{(e+f x)^2} \, dx=-\frac {a}{x\,f^2+e\,f}-\frac {b\,\mathrm {acot}\left (c+d\,x\right )}{f\,\left (e+f\,x\right )}-\frac {b\,d\,\ln \left (e+f\,x\right )}{d^2\,e^2-2\,c\,d\,e\,f+\left (c^2+1\right )\,f^2}+\frac {b\,d\,\ln \left (c+d\,x-\mathrm {i}\right )\,1{}\mathrm {i}}{2\,f\,\left (d\,e-c\,f+f\,1{}\mathrm {i}\right )}+\frac {b\,d\,\ln \left (c+d\,x+1{}\mathrm {i}\right )}{2\,f\,\left (f-c\,f\,1{}\mathrm {i}+d\,e\,1{}\mathrm {i}\right )} \] Input:

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

Output:

(b*d*log(c + d*x - 1i)*1i)/(2*f*(f*1i - c*f + d*e)) - (b*acot(c + d*x))/(f 
*(e + f*x)) - (b*d*log(e + f*x))/(f^2*(c^2 + 1) + d^2*e^2 - 2*c*d*e*f) - a 
/(e*f + f^2*x) + (b*d*log(c + d*x + 1i))/(2*f*(f - c*f*1i + d*e*1i))
 

Reduce [B] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 318, normalized size of antiderivative = 2.08 \[ \int \frac {a+b \cot ^{-1}(c+d x)}{(e+f x)^2} \, dx=\frac {2 \mathit {acot} \left (d x +c \right ) b \,c^{2} f^{2} x -4 \mathit {acot} \left (d x +c \right ) b c d e f x +2 \mathit {acot} \left (d x +c \right ) b \,d^{2} e^{2} x +2 \mathit {acot} \left (d x +c \right ) b \,f^{2} x +2 \mathit {atan} \left (d x +c \right ) b \,c^{2} e f +2 \mathit {atan} \left (d x +c \right ) b \,c^{2} f^{2} x -2 \mathit {atan} \left (d x +c \right ) b c d \,e^{2}-2 \mathit {atan} \left (d x +c \right ) b c d e f x +2 \mathit {atan} \left (d x +c \right ) b e f +2 \mathit {atan} \left (d x +c \right ) b \,f^{2} x +\mathrm {log}\left (d^{2} x^{2}+2 c d x +c^{2}+1\right ) b d \,e^{2}+\mathrm {log}\left (d^{2} x^{2}+2 c d x +c^{2}+1\right ) b d e f x -2 \,\mathrm {log}\left (f x +e \right ) b d \,e^{2}-2 \,\mathrm {log}\left (f x +e \right ) b d e f x +2 a \,c^{2} f^{2} x -4 a c d e f x +2 a \,d^{2} e^{2} x +2 a \,f^{2} x}{2 e \left (c^{2} f^{3} x -2 c d e \,f^{2} x +d^{2} e^{2} f x +c^{2} e \,f^{2}-2 c d \,e^{2} f +d^{2} e^{3}+f^{3} x +e \,f^{2}\right )} \] Input:

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

Output:

(2*acot(c + d*x)*b*c**2*f**2*x - 4*acot(c + d*x)*b*c*d*e*f*x + 2*acot(c + 
d*x)*b*d**2*e**2*x + 2*acot(c + d*x)*b*f**2*x + 2*atan(c + d*x)*b*c**2*e*f 
 + 2*atan(c + d*x)*b*c**2*f**2*x - 2*atan(c + d*x)*b*c*d*e**2 - 2*atan(c + 
 d*x)*b*c*d*e*f*x + 2*atan(c + d*x)*b*e*f + 2*atan(c + d*x)*b*f**2*x + log 
(c**2 + 2*c*d*x + d**2*x**2 + 1)*b*d*e**2 + log(c**2 + 2*c*d*x + d**2*x**2 
 + 1)*b*d*e*f*x - 2*log(e + f*x)*b*d*e**2 - 2*log(e + f*x)*b*d*e*f*x + 2*a 
*c**2*f**2*x - 4*a*c*d*e*f*x + 2*a*d**2*e**2*x + 2*a*f**2*x)/(2*e*(c**2*e* 
f**2 + c**2*f**3*x - 2*c*d*e**2*f - 2*c*d*e*f**2*x + d**2*e**3 + d**2*e**2 
*f*x + e*f**2 + f**3*x))