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 )} \]
[Out]
Time = 0.09 (sec) , antiderivative size = 153, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.444, Rules used = {5154, 2007, 719, 31, 648, 632, 210, 642} \[ \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 \arctan (c+d x) (d e-c f)}{f \left (\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2\right )}+\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} \]
[In]
[Out]
Rule 31
Rule 210
Rule 632
Rule 642
Rule 648
Rule 719
Rule 2007
Rule 5154
Rubi steps \begin{align*} \text {integral}& = -\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 ) \text {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) \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 )} \\ \end{align*}
Result contains complex when optimal does not.
Time = 0.16 (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} \]
[In]
[Out]
Time = 0.72 (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 {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}}+\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}}\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 {\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 (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}}}{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 {\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 (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}}}{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 {2 a \,c^{2} f^{2}+\pi b \,c^{2} f^{2}+\pi b \,d^{2} e^{2}+2 f^{2} a +\pi b \,f^{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 )-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 -c d e +3 f \right ) b \,d^{2} e^{2}+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 +c d e -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 +c d e -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 +c d e -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 -c d e +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 -c d e +3 f \right ) b d e f +2 e^{2} a \,d^{2}+2 i b c d e f \ln \left (1-i \left (d x +c \right )\right )-4 a c d e f -i b \,f^{2} \ln \left (1-i \left (d x +c \right )\right )-2 \pi b c d e f +2 \ln \left (f x +e \right ) b d \,f^{2} x +2 \ln \left (f x +e \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 -c d e +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 -c d e +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 +c d e -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 -c d e +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 +c d e -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 +c d e -3 f \right ) b c d e f}{2 \left (f x +e \right ) \left (c f -d e -i f \right ) \left (c f -d e +i f \right ) f}\) | \(856\) |
[In]
[Out]
none
Time = 0.41 (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 )}} \]
[In]
[Out]
Timed out. \[ \int \frac {a+b \cot ^{-1}(c+d x)}{(e+f x)^2} \, dx=\text {Timed out} \]
[In]
[Out]
none
Time = 0.27 (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} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 1264 vs. \(2 (151) = 302\).
Time = 0.69 (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} \]
[In]
[Out]
Time = 2.36 (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 )} \]
[In]
[Out]