Integrand size = 10, antiderivative size = 62 \[ \int \frac {\cot ^{-1}(a+b x)}{x^2} \, dx=-\frac {\cot ^{-1}(a+b x)}{x}+\frac {a b \arctan (a+b x)}{1+a^2}-\frac {b \log (x)}{1+a^2}+\frac {b \log \left (1+(a+b x)^2\right )}{2 \left (1+a^2\right )} \]
Result contains complex when optimal does not.
Time = 0.05 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.06 \[ \int \frac {\cot ^{-1}(a+b x)}{x^2} \, dx=-\frac {\cot ^{-1}(a+b x)}{x}+\frac {b (-2 \log (x)+(1-i a) \log (i-a-b x)+(1+i a) \log (i+a+b x))}{2 \left (1+a^2\right )} \]
-(ArcCot[a + b*x]/x) + (b*(-2*Log[x] + (1 - I*a)*Log[I - a - b*x] + (1 + I *a)*Log[I + a + b*x]))/(2*(1 + a^2))
Time = 0.24 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.98, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.700, Rules used = {5569, 896, 25, 479, 452, 216, 240}
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 {\cot ^{-1}(a+b x)}{x^2} \, dx\) |
\(\Big \downarrow \) 5569 |
\(\displaystyle -b \int \frac {1}{x \left ((a+b x)^2+1\right )}dx-\frac {\cot ^{-1}(a+b x)}{x}\) |
\(\Big \downarrow \) 896 |
\(\displaystyle -b \int \frac {1}{b x \left ((a+b x)^2+1\right )}d(a+b x)-\frac {\cot ^{-1}(a+b x)}{x}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle b \int -\frac {1}{b x \left ((a+b x)^2+1\right )}d(a+b x)-\frac {\cot ^{-1}(a+b x)}{x}\) |
\(\Big \downarrow \) 479 |
\(\displaystyle -b \left (\frac {\log (-b x)}{a^2+1}-\frac {\int \frac {2 a+b x}{(a+b x)^2+1}d(a+b x)}{a^2+1}\right )-\frac {\cot ^{-1}(a+b x)}{x}\) |
\(\Big \downarrow \) 452 |
\(\displaystyle -b \left (\frac {\log (-b x)}{a^2+1}-\frac {a \int \frac {1}{(a+b x)^2+1}d(a+b x)+\int \frac {a+b x}{(a+b x)^2+1}d(a+b x)}{a^2+1}\right )-\frac {\cot ^{-1}(a+b x)}{x}\) |
\(\Big \downarrow \) 216 |
\(\displaystyle -b \left (\frac {\log (-b x)}{a^2+1}-\frac {\int \frac {a+b x}{(a+b x)^2+1}d(a+b x)+a \arctan (a+b x)}{a^2+1}\right )-\frac {\cot ^{-1}(a+b x)}{x}\) |
\(\Big \downarrow \) 240 |
\(\displaystyle -b \left (\frac {\log (-b x)}{a^2+1}-\frac {a \arctan (a+b x)+\frac {1}{2} \log \left ((a+b x)^2+1\right )}{a^2+1}\right )-\frac {\cot ^{-1}(a+b x)}{x}\) |
-(ArcCot[a + b*x]/x) - b*(Log[-(b*x)]/(1 + a^2) - (a*ArcTan[a + b*x] + Log [1 + (a + b*x)^2]/2)/(1 + a^2))
3.2.4.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[(x_)/((a_) + (b_.)*(x_)^2), x_Symbol] :> Simp[Log[RemoveContent[a + b*x ^2, x]]/(2*b), x] /; FreeQ[{a, b}, x]
Int[((c_) + (d_.)*(x_))/((a_) + (b_.)*(x_)^2), x_Symbol] :> Simp[c Int[1/ (a + b*x^2), x], x] + Simp[d Int[x/(a + b*x^2), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c^2 + a*d^2, 0]
Int[1/(((c_) + (d_.)*(x_))*((a_) + (b_.)*(x_)^2)), x_Symbol] :> Simp[d*(Log [RemoveContent[c + d*x, x]]/(b*c^2 + a*d^2)), x] + Simp[b/(b*c^2 + a*d^2) Int[(c - d*x)/(a + b*x^2), x], x] /; FreeQ[{a, b, c, d}, x]
Int[((a_) + (b_.)*(v_)^(n_))^(p_.)*(x_)^(m_.), x_Symbol] :> With[{c = Coeff icient[v, x, 0], d = Coefficient[v, x, 1]}, Simp[1/d^(m + 1) Subst[Int[Si mplifyIntegrand[(x - c)^m*(a + b*x^n)^p, x], x], x, v], x] /; NeQ[c, 0]] /; FreeQ[{a, b, n, p}, x] && LinearQ[v, x] && IntegerQ[m]
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]
Time = 0.24 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.98
method | result | size |
derivativedivides | \(b \left (-\frac {\operatorname {arccot}\left (b x +a \right )}{b x}-\frac {\ln \left (-b x \right )}{a^{2}+1}+\frac {\frac {\ln \left (1+\left (b x +a \right )^{2}\right )}{2}+a \arctan \left (b x +a \right )}{a^{2}+1}\right )\) | \(61\) |
default | \(b \left (-\frac {\operatorname {arccot}\left (b x +a \right )}{b x}-\frac {\ln \left (-b x \right )}{a^{2}+1}+\frac {\frac {\ln \left (1+\left (b x +a \right )^{2}\right )}{2}+a \arctan \left (b x +a \right )}{a^{2}+1}\right )\) | \(61\) |
parts | \(-\frac {\operatorname {arccot}\left (b x +a \right )}{x}-b \left (\frac {\ln \left (x \right )}{a^{2}+1}-\frac {b \left (\frac {\ln \left (b^{2} x^{2}+2 a b x +a^{2}+1\right )}{2 b}+\frac {a \arctan \left (\frac {2 b^{2} x +2 a b}{2 b}\right )}{b}\right )}{a^{2}+1}\right )\) | \(83\) |
parallelrisch | \(-\frac {2 x \,\operatorname {arccot}\left (b x +a \right ) a^{2} b^{2}+2 b^{2} \ln \left (x \right ) a x -b^{2} \ln \left (b^{2} x^{2}+2 a b x +a^{2}+1\right ) a x +2 \,\operatorname {arccot}\left (b x +a \right ) a^{3} b +2 \,\operatorname {arccot}\left (b x +a \right ) a b}{2 x a b \left (a^{2}+1\right )}\) | \(91\) |
risch | \(-\frac {i \ln \left (1+i \left (b x +a \right )\right )}{2 x}-\frac {-i a^{2} \ln \left (1-i \left (b x +a \right )\right )-i \ln \left (1-i \left (b x +a \right )\right )+\pi \,a^{2}+\pi +2 b \ln \left (x \right ) x -x b \ln \left (\left (i a b +3 b \right ) x +i a^{2}+3 i+2 a \right )-i x b \ln \left (\left (i a b +3 b \right ) x +i a^{2}+3 i+2 a \right ) a -x b \ln \left (\left (i a b -3 b \right ) x +i a^{2}+3 i-2 a \right )+i x b \ln \left (\left (i a b -3 b \right ) x +i a^{2}+3 i-2 a \right ) a}{2 x \left (i+a \right ) \left (a -i\right )}\) | \(196\) |
Time = 0.28 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.03 \[ \int \frac {\cot ^{-1}(a+b x)}{x^2} \, dx=\frac {2 \, a b x \arctan \left (b x + a\right ) + b x \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + 1\right ) - 2 \, b x \log \left (x\right ) - 2 \, {\left (a^{2} + 1\right )} \operatorname {arccot}\left (b x + a\right )}{2 \, {\left (a^{2} + 1\right )} x} \]
1/2*(2*a*b*x*arctan(b*x + a) + b*x*log(b^2*x^2 + 2*a*b*x + a^2 + 1) - 2*b* x*log(x) - 2*(a^2 + 1)*arccot(b*x + a))/((a^2 + 1)*x)
Result contains complex when optimal does not.
Time = 0.54 (sec) , antiderivative size = 167, normalized size of antiderivative = 2.69 \[ \int \frac {\cot ^{-1}(a+b x)}{x^2} \, dx=\begin {cases} - \frac {i b \operatorname {acot}{\left (b x - i \right )}}{2} - \frac {\operatorname {acot}{\left (b x - i \right )}}{x} + \frac {i}{2 x} & \text {for}\: a = - i \\\frac {i b \operatorname {acot}{\left (b x + i \right )}}{2} - \frac {\operatorname {acot}{\left (b x + i \right )}}{x} - \frac {i}{2 x} & \text {for}\: a = i \\- \frac {2 a^{2} \operatorname {acot}{\left (a + b x \right )}}{2 a^{2} x + 2 x} - \frac {2 a b x \operatorname {acot}{\left (a + b x \right )}}{2 a^{2} x + 2 x} - \frac {2 b x \log {\left (x \right )}}{2 a^{2} x + 2 x} + \frac {b x \log {\left (a^{2} + 2 a b x + b^{2} x^{2} + 1 \right )}}{2 a^{2} x + 2 x} - \frac {2 \operatorname {acot}{\left (a + b x \right )}}{2 a^{2} x + 2 x} & \text {otherwise} \end {cases} \]
Piecewise((-I*b*acot(b*x - I)/2 - acot(b*x - I)/x + I/(2*x), Eq(a, -I)), ( I*b*acot(b*x + I)/2 - acot(b*x + I)/x - I/(2*x), Eq(a, I)), (-2*a**2*acot( a + b*x)/(2*a**2*x + 2*x) - 2*a*b*x*acot(a + b*x)/(2*a**2*x + 2*x) - 2*b*x *log(x)/(2*a**2*x + 2*x) + b*x*log(a**2 + 2*a*b*x + b**2*x**2 + 1)/(2*a**2 *x + 2*x) - 2*acot(a + b*x)/(2*a**2*x + 2*x), True))
Time = 0.29 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.24 \[ \int \frac {\cot ^{-1}(a+b x)}{x^2} \, dx=\frac {1}{2} \, b {\left (\frac {2 \, a \arctan \left (\frac {b^{2} x + a b}{b}\right )}{a^{2} + 1} + \frac {\log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + 1\right )}{a^{2} + 1} - \frac {2 \, \log \left (x\right )}{a^{2} + 1}\right )} - \frac {\operatorname {arccot}\left (b x + a\right )}{x} \]
1/2*b*(2*a*arctan((b^2*x + a*b)/b)/(a^2 + 1) + log(b^2*x^2 + 2*a*b*x + a^2 + 1)/(a^2 + 1) - 2*log(x)/(a^2 + 1)) - arccot(b*x + a)/x
Leaf count of result is larger than twice the leaf count of optimal. 498 vs. \(2 (60) = 120\).
Time = 0.42 (sec) , antiderivative size = 498, normalized size of antiderivative = 8.03 \[ \int \frac {\cot ^{-1}(a+b x)}{x^2} \, dx=-\frac {{\left (2 \, a \arctan \left (\frac {1}{b x + a}\right ) \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{2} + 2 \, a \log \left (\frac {4 \, {\left (4 \, a^{2} \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{2} + 4 \, a \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{3} + \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{4} - 4 \, a \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right ) - 2 \, \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{2} + 1\right )}}{\tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{4} + 2 \, \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{2} + 1}\right ) \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right ) + \log \left (\frac {4 \, {\left (4 \, a^{2} \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{2} + 4 \, a \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{3} + \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{4} - 4 \, a \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right ) - 2 \, \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{2} + 1\right )}}{\tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{4} + 2 \, \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{2} + 1}\right ) \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{2} - 2 \, a \arctan \left (\frac {1}{b x + a}\right ) - 4 \, \arctan \left (\frac {1}{b x + a}\right ) \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right ) - \log \left (\frac {4 \, {\left (4 \, a^{2} \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{2} + 4 \, a \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{3} + \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{4} - 4 \, a \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right ) - 2 \, \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{2} + 1\right )}}{\tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{4} + 2 \, \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{2} + 1}\right )\right )} b}{2 \, {\left (2 \, a^{3} \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right ) + a^{2} \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{2} - a^{2} + 2 \, a \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right ) + \tan \left (\frac {1}{2} \, \arctan \left (\frac {1}{b x + a}\right )\right )^{2} - 1\right )}} \]
-1/2*(2*a*arctan(1/(b*x + a))*tan(1/2*arctan(1/(b*x + a)))^2 + 2*a*log(4*( 4*a^2*tan(1/2*arctan(1/(b*x + a)))^2 + 4*a*tan(1/2*arctan(1/(b*x + a)))^3 + tan(1/2*arctan(1/(b*x + a)))^4 - 4*a*tan(1/2*arctan(1/(b*x + a))) - 2*ta n(1/2*arctan(1/(b*x + a)))^2 + 1)/(tan(1/2*arctan(1/(b*x + a)))^4 + 2*tan( 1/2*arctan(1/(b*x + a)))^2 + 1))*tan(1/2*arctan(1/(b*x + a))) + log(4*(4*a ^2*tan(1/2*arctan(1/(b*x + a)))^2 + 4*a*tan(1/2*arctan(1/(b*x + a)))^3 + t an(1/2*arctan(1/(b*x + a)))^4 - 4*a*tan(1/2*arctan(1/(b*x + a))) - 2*tan(1 /2*arctan(1/(b*x + a)))^2 + 1)/(tan(1/2*arctan(1/(b*x + a)))^4 + 2*tan(1/2 *arctan(1/(b*x + a)))^2 + 1))*tan(1/2*arctan(1/(b*x + a)))^2 - 2*a*arctan( 1/(b*x + a)) - 4*arctan(1/(b*x + a))*tan(1/2*arctan(1/(b*x + a))) - log(4* (4*a^2*tan(1/2*arctan(1/(b*x + a)))^2 + 4*a*tan(1/2*arctan(1/(b*x + a)))^3 + tan(1/2*arctan(1/(b*x + a)))^4 - 4*a*tan(1/2*arctan(1/(b*x + a))) - 2*t an(1/2*arctan(1/(b*x + a)))^2 + 1)/(tan(1/2*arctan(1/(b*x + a)))^4 + 2*tan (1/2*arctan(1/(b*x + a)))^2 + 1)))*b/(2*a^3*tan(1/2*arctan(1/(b*x + a))) + a^2*tan(1/2*arctan(1/(b*x + a)))^2 - a^2 + 2*a*tan(1/2*arctan(1/(b*x + a) )) + tan(1/2*arctan(1/(b*x + a)))^2 - 1)
Time = 1.42 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.00 \[ \int \frac {\cot ^{-1}(a+b x)}{x^2} \, dx=-\frac {\mathrm {acot}\left (a+b\,x\right )}{x}-\frac {b\,x\,\ln \left (x\right )-\frac {b\,x\,\ln \left (a^2+2\,a\,b\,x+b^2\,x^2+1\right )}{2}+a\,b\,x\,\mathrm {acot}\left (a+b\,x\right )}{x\,\left (a^2+1\right )} \]