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

Optimal. Leaf size=153 \[ -\frac{a+b \cot ^{-1}(c+d x)}{f (e+f x)}+\frac{b d \log \left (c^2+2 c d x+d^2 x^2+1\right )}{2 \left (\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2\right )}-\frac{b d \log (e+f x)}{\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2}-\frac{b d (d e-c f) \tan ^{-1}(c+d x)}{f \left (\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2\right )} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.110938, antiderivative size = 153, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 8, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.444, Rules used = {5046, 1982, 705, 31, 634, 618, 204, 628} \[ -\frac{a+b \cot ^{-1}(c+d x)}{f (e+f x)}+\frac{b d \log \left (c^2+2 c d x+d^2 x^2+1\right )}{2 \left (\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2\right )}-\frac{b d \log (e+f x)}{\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2}-\frac{b d (d e-c f) \tan ^{-1}(c+d x)}{f \left (\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2\right )} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 5046

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] + Dist[(b*d*p)/(f*(m + 1)), Int[((e + f*x)^(m + 1)*(a + b*Arc
Cot[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]

Rule 1982

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 705

Int[1/(((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)), x_Symbol] :> Dist[e^2/(c*d^2 - b*d*e + a*e^2
), Int[1/(d + e*x), x], x] + Dist[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] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && NeQ[2*c*d - b*e, 0]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

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

Rule 204

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

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(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]

Rubi steps

\begin{align*} \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) \int \frac{1}{(e+f x) \left (1+(c+d x)^2\right )} \, dx}{f}\\ &=-\frac{a+b \cot ^{-1}(c+d x)}{f (e+f x)}-\frac{(b d) \int \frac{1}{(e+f x) \left (1+c^2+2 c d x+d^2 x^2\right )} \, dx}{f}\\ &=-\frac{a+b \cot ^{-1}(c+d x)}{f (e+f x)}-\frac{(b d) \int \frac{d^2 e-2 c d f-d^2 f x}{1+c^2+2 c d x+d^2 x^2} \, dx}{f \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )}-\frac{(b d f) \int \frac{1}{e+f x} \, dx}{d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2}\\ &=-\frac{a+b \cot ^{-1}(c+d x)}{f (e+f x)}-\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) \int \frac{2 c d+2 d^2 x}{1+c^2+2 c d x+d^2 x^2} \, dx}{2 \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )}-\frac{\left (b d^2 (d e-c f)\right ) \int \frac{1}{1+c^2+2 c d x+d^2 x^2} \, dx}{f \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )}\\ &=-\frac{a+b \cot ^{-1}(c+d x)}{f (e+f x)}-\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 )}+\frac{\left (2 b d^2 (d e-c f)\right ) \operatorname{Subst}\left (\int \frac{1}{-4 d^2-x^2} \, dx,x,2 c d+2 d^2 x\right )}{f \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )}\\ &=-\frac{a+b \cot ^{-1}(c+d x)}{f (e+f x)}-\frac{b d (d e-c f) \tan ^{-1}(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 )}\\ \end{align*}

Mathematica [C]  time = 0.164227, size = 118, normalized size = 0.77 \[ \frac{-\frac{a+b \cot ^{-1}(c+d x)}{e+f x}+\frac{b d ((-i c f+i d e+f) \log (-c-d x+i)+(i c f-i d e+f) \log (c+d x+i)-2 f \log (d (e+f x)))}{2 \left (\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2\right )}}{f} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(-((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)*Lo
g[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

________________________________________________________________________________________

Maple [A]  time = 0.051, size = 206, normalized size = 1.4 \begin{align*} -{\frac{ad}{ \left ( dfx+de \right ) f}}-{\frac{bd{\rm arccot} \left (dx+c\right )}{ \left ( dfx+de \right ) f}}+{\frac{bd\ln \left ( 1+ \left ( dx+c \right ) ^{2} \right ) }{2\,{c}^{2}{f}^{2}-4\,cdef+2\,{d}^{2}{e}^{2}+2\,{f}^{2}}}+{\frac{bd\arctan \left ( dx+c \right ) c}{{c}^{2}{f}^{2}-2\,cdef+{d}^{2}{e}^{2}+{f}^{2}}}-{\frac{b{d}^{2}\arctan \left ( dx+c \right ) e}{f \left ({c}^{2}{f}^{2}-2\,cdef+{d}^{2}{e}^{2}+{f}^{2} \right ) }}-{\frac{bd\ln \left ( f \left ( dx+c \right ) -cf+de \right ) }{{c}^{2}{f}^{2}-2\,cdef+{d}^{2}{e}^{2}+{f}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.49717, size = 239, normalized size = 1.56 \begin{align*} -\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} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 5.34871, size = 513, normalized size = 3.35 \begin{align*} -\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 )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-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)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.1077, size = 396, normalized size = 2.59 \begin{align*} \frac{1}{2} \,{\left (d f^{2}{\left (\frac{\log \left (d^{2} + \frac{2 \, c d f}{f x + e} + \frac{c^{2} f^{2}}{{\left (f x + e\right )}^{2}} - \frac{2 \, d^{2} e}{f x + e} - \frac{2 \, c d f e}{{\left (f x + e\right )}^{2}} + \frac{d^{2} e^{2}}{{\left (f x + e\right )}^{2}} + \frac{f^{2}}{{\left (f x + e\right )}^{2}}\right )}{c^{2} f^{4} - 2 \, c d f^{3} e + d^{2} f^{2} e^{2} + f^{4}} + \frac{2 \,{\left (c d f - d^{2} e\right )} \arctan \left (-\frac{c d f + \frac{c^{2} f^{2}}{f x + e} - d^{2} e - \frac{2 \, c d f e}{f x + e} + \frac{d^{2} e^{2}}{f x + e} + \frac{f^{2}}{f x + e}}{d f}\right )}{{\left (c^{2} f^{3} - 2 \, c d f^{2} e + d^{2} f e^{2} + f^{3}\right )} d f^{2}}\right )} - \frac{2 \, \arctan \left (\frac{1}{d x + c}\right )}{{\left (f x + e\right )} f}\right )} b - \frac{a}{{\left (f x + e\right )} f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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