\(\int \frac {\arctan (a+b x)}{x^3} \, dx\) [7]

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

Optimal result

Integrand size = 10, antiderivative size = 96 \[ \int \frac {\arctan (a+b x)}{x^3} \, dx=-\frac {b}{2 \left (1+a^2\right ) x}-\frac {\left (1-a^2\right ) b^2 \arctan (a+b x)}{2 \left (1+a^2\right )^2}-\frac {\arctan (a+b x)}{2 x^2}-\frac {a b^2 \log (x)}{\left (1+a^2\right )^2}+\frac {a b^2 \log \left (1+(a+b x)^2\right )}{2 \left (1+a^2\right )^2} \] Output:

-1/2*b/(a^2+1)/x-1/2*(-a^2+1)*b^2*arctan(b*x+a)/(a^2+1)^2-1/2*arctan(b*x+a 
)/x^2-a*b^2*ln(x)/(a^2+1)^2+1/2*a*b^2*ln(1+(b*x+a)^2)/(a^2+1)^2
 

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.07 (sec) , antiderivative size = 92, normalized size of antiderivative = 0.96 \[ \int \frac {\arctan (a+b x)}{x^3} \, dx=\frac {-2 \arctan (a+b x)+\frac {b x \left (-4 a b x \log (x)-i (i+a)^2 b x \log (i-a-b x)+(-i+a) (-2 (i+a)+(1+i a) b x \log (i+a+b x))\right )}{\left (1+a^2\right )^2}}{4 x^2} \] Input:

Integrate[ArcTan[a + b*x]/x^3,x]
 

Output:

(-2*ArcTan[a + b*x] + (b*x*(-4*a*b*x*Log[x] - I*(I + a)^2*b*x*Log[I - a - 
b*x] + (-I + a)*(-2*(I + a) + (1 + I*a)*b*x*Log[I + a + b*x])))/(1 + a^2)^ 
2)/(4*x^2)
 

Rubi [A] (verified)

Time = 0.30 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.06, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {5568, 896, 480, 657, 2009}

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 {\arctan (a+b x)}{x^3} \, dx\)

\(\Big \downarrow \) 5568

\(\displaystyle \frac {1}{2} b \int \frac {1}{x^2 \left ((a+b x)^2+1\right )}dx-\frac {\arctan (a+b x)}{2 x^2}\)

\(\Big \downarrow \) 896

\(\displaystyle \frac {1}{2} b^2 \int \frac {1}{b^2 x^2 \left ((a+b x)^2+1\right )}d(a+b x)-\frac {\arctan (a+b x)}{2 x^2}\)

\(\Big \downarrow \) 480

\(\displaystyle \frac {1}{2} b^2 \left (\frac {\int -\frac {2 a+b x}{b x \left ((a+b x)^2+1\right )}d(a+b x)}{a^2+1}-\frac {1}{\left (a^2+1\right ) b x}\right )-\frac {\arctan (a+b x)}{2 x^2}\)

\(\Big \downarrow \) 657

\(\displaystyle \frac {1}{2} b^2 \left (\frac {\int \left (\frac {a^2+2 (a+b x) a-1}{\left (a^2+1\right ) \left ((a+b x)^2+1\right )}-\frac {2 a}{\left (a^2+1\right ) b x}\right )d(a+b x)}{a^2+1}-\frac {1}{\left (a^2+1\right ) b x}\right )-\frac {\arctan (a+b x)}{2 x^2}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {1}{2} b^2 \left (\frac {-\frac {\left (1-a^2\right ) \arctan (a+b x)}{a^2+1}-\frac {2 a \log (-b x)}{a^2+1}+\frac {a \log \left ((a+b x)^2+1\right )}{a^2+1}}{a^2+1}-\frac {1}{\left (a^2+1\right ) b x}\right )-\frac {\arctan (a+b x)}{2 x^2}\)

Input:

Int[ArcTan[a + b*x]/x^3,x]
 

Output:

-1/2*ArcTan[a + b*x]/x^2 + (b^2*(-(1/((1 + a^2)*b*x)) + (-(((1 - a^2)*ArcT 
an[a + b*x])/(1 + a^2)) - (2*a*Log[-(b*x)])/(1 + a^2) + (a*Log[1 + (a + b* 
x)^2])/(1 + a^2))/(1 + a^2)))/2
 

Defintions of rubi rules used

rule 480
Int[((c_) + (d_.)*(x_))^(n_)/((a_) + (b_.)*(x_)^2), x_Symbol] :> Simp[d*((c 
 + d*x)^(n + 1)/((n + 1)*(b*c^2 + a*d^2))), x] + Simp[b/(b*c^2 + a*d^2)   I 
nt[(c + d*x)^(n + 1)*((c - d*x)/(a + b*x^2)), x], x] /; FreeQ[{a, b, c, d}, 
 x] && ILtQ[n, -1]
 

rule 657
Int[(((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))^(n_.))/((a_) + (c_.)*( 
x_)^2), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*((f + g*x)^n/(a + c*x^ 
2)), x], x] /; FreeQ[{a, c, d, e, f, g, m}, x] && IntegersQ[n]
 

rule 896
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]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 5568
Int[((a_.) + ArcTan[(c_) + (d_.)*(x_)]*(b_.))^(p_.)*((e_.) + (f_.)*(x_))^(m 
_), x_Symbol] :> Simp[(e + f*x)^(m + 1)*((a + b*ArcTan[c + d*x])^p/(f*(m + 
1))), x] - Simp[b*d*(p/(f*(m + 1)))   Int[(e + f*x)^(m + 1)*((a + b*ArcTan[ 
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.13 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.88

method result size
derivativedivides \(b^{2} \left (-\frac {\arctan \left (b x +a \right )}{2 b^{2} x^{2}}-\frac {1}{2 \left (a^{2}+1\right ) b x}-\frac {a \ln \left (-b x \right )}{\left (a^{2}+1\right )^{2}}+\frac {a \ln \left (1+\left (b x +a \right )^{2}\right )+\left (a^{2}-1\right ) \arctan \left (b x +a \right )}{2 \left (a^{2}+1\right )^{2}}\right )\) \(84\)
default \(b^{2} \left (-\frac {\arctan \left (b x +a \right )}{2 b^{2} x^{2}}-\frac {1}{2 \left (a^{2}+1\right ) b x}-\frac {a \ln \left (-b x \right )}{\left (a^{2}+1\right )^{2}}+\frac {a \ln \left (1+\left (b x +a \right )^{2}\right )+\left (a^{2}-1\right ) \arctan \left (b x +a \right )}{2 \left (a^{2}+1\right )^{2}}\right )\) \(84\)
parts \(-\frac {\arctan \left (b x +a \right )}{2 x^{2}}+\frac {b \left (\frac {b^{2} \left (\frac {a \ln \left (b^{2} x^{2}+2 a b x +a^{2}+1\right )}{b}+\frac {\left (a^{2}-1\right ) \arctan \left (\frac {2 b^{2} x +2 a b}{2 b}\right )}{b}\right )}{\left (a^{2}+1\right )^{2}}-\frac {1}{\left (a^{2}+1\right ) x}-\frac {2 a b \ln \left (x \right )}{\left (a^{2}+1\right )^{2}}\right )}{2}\) \(103\)
parallelrisch \(-\frac {-x^{2} \arctan \left (b x +a \right ) a^{2} b^{2}+2 a \,b^{2} \ln \left (x \right ) x^{2}-a \,b^{2} \ln \left (b^{2} x^{2}+2 a b x +a^{2}+1\right ) x^{2}+\arctan \left (b x +a \right ) b^{2} x^{2}-2 a \,b^{2} x^{2}+\arctan \left (b x +a \right ) a^{4}+a^{2} b x +2 \arctan \left (b x +a \right ) a^{2}+b x +\arctan \left (b x +a \right )}{2 x^{2} \left (a^{4}+2 a^{2}+1\right )}\) \(132\)
risch \(\frac {i \ln \left (1+i \left (b x +a \right )\right )}{4 x^{2}}-\frac {i \left (a^{4} \ln \left (1-i \left (b x +a \right )\right )+2 a^{2} \ln \left (1-i \left (b x +a \right )\right )+\ln \left (1-i \left (b x +a \right )\right )-\ln \left (\left (a^{6} b -4 i a^{5} b +9 a^{4} b +8 i a^{3} b -9 a^{2} b -4 i a b -b \right ) x +13 a^{5}-3 i a^{6}+a^{7}-17 a^{3}+17 i a^{4}+3 a -13 i a^{2}-i\right ) a^{2} b^{2} x^{2}+\ln \left (\left (a^{6} b +4 i a^{5} b +9 a^{4} b -8 i a^{3} b -9 a^{2} b +4 i a b -b \right ) x +13 a^{5}+3 i a^{6}+a^{7}-17 a^{3}-17 i a^{4}+3 a +13 i a^{2}+i\right ) a^{2} b^{2} x^{2}+\ln \left (\left (a^{6} b -4 i a^{5} b +9 a^{4} b +8 i a^{3} b -9 a^{2} b -4 i a b -b \right ) x +13 a^{5}-3 i a^{6}+a^{7}-17 a^{3}+17 i a^{4}+3 a -13 i a^{2}-i\right ) b^{2} x^{2}-\ln \left (\left (a^{6} b +4 i a^{5} b +9 a^{4} b -8 i a^{3} b -9 a^{2} b +4 i a b -b \right ) x +13 a^{5}+3 i a^{6}+a^{7}-17 a^{3}-17 i a^{4}+3 a +13 i a^{2}+i\right ) b^{2} x^{2}+2 i \ln \left (\left (a^{6} b -4 i a^{5} b +9 a^{4} b +8 i a^{3} b -9 a^{2} b -4 i a b -b \right ) x +13 a^{5}-3 i a^{6}+a^{7}-17 a^{3}+17 i a^{4}+3 a -13 i a^{2}-i\right ) a \,b^{2} x^{2}+2 i \ln \left (\left (a^{6} b +4 i a^{5} b +9 a^{4} b -8 i a^{3} b -9 a^{2} b +4 i a b -b \right ) x +13 a^{5}+3 i a^{6}+a^{7}-17 a^{3}-17 i a^{4}+3 a +13 i a^{2}+i\right ) a \,b^{2} x^{2}-4 i \ln \left (\left (a^{4} b +34 a^{2} b +b \right ) x \right ) a \,b^{2} x^{2}-2 i a^{2} b x -2 i b x \right )}{4 x^{2} \left (a^{2}+2 i a -1\right ) \left (a^{2}-2 i a -1\right )}\) \(665\)

Input:

int(arctan(b*x+a)/x^3,x,method=_RETURNVERBOSE)
 

Output:

b^2*(-1/2*arctan(b*x+a)/b^2/x^2-1/2/(a^2+1)/b/x-1/(a^2+1)^2*a*ln(-b*x)+1/2 
/(a^2+1)^2*(a*ln(1+(b*x+a)^2)+(a^2-1)*arctan(b*x+a)))
 

Fricas [A] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 95, normalized size of antiderivative = 0.99 \[ \int \frac {\arctan (a+b x)}{x^3} \, dx=\frac {a b^{2} x^{2} \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + 1\right ) - 2 \, a b^{2} x^{2} \log \left (x\right ) - {\left (a^{2} + 1\right )} b x + {\left ({\left (a^{2} - 1\right )} b^{2} x^{2} - a^{4} - 2 \, a^{2} - 1\right )} \arctan \left (b x + a\right )}{2 \, {\left (a^{4} + 2 \, a^{2} + 1\right )} x^{2}} \] Input:

integrate(arctan(b*x+a)/x^3,x, algorithm="fricas")
 

Output:

1/2*(a*b^2*x^2*log(b^2*x^2 + 2*a*b*x + a^2 + 1) - 2*a*b^2*x^2*log(x) - (a^ 
2 + 1)*b*x + ((a^2 - 1)*b^2*x^2 - a^4 - 2*a^2 - 1)*arctan(b*x + a))/((a^4 
+ 2*a^2 + 1)*x^2)
 

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 1.11 (sec) , antiderivative size = 382, normalized size of antiderivative = 3.98 \[ \int \frac {\arctan (a+b x)}{x^3} \, dx=\begin {cases} - \frac {b^{2} \operatorname {atan}{\left (b x - i \right )}}{8} - \frac {b}{8 x} - \frac {\operatorname {atan}{\left (b x - i \right )}}{2 x^{2}} - \frac {i}{8 x^{2}} & \text {for}\: a = - i \\- \frac {b^{2} \operatorname {atan}{\left (b x + i \right )}}{8} - \frac {b}{8 x} - \frac {\operatorname {atan}{\left (b x + i \right )}}{2 x^{2}} + \frac {i}{8 x^{2}} & \text {for}\: a = i \\- \frac {a^{4} \operatorname {atan}{\left (a + b x \right )}}{2 a^{4} x^{2} + 4 a^{2} x^{2} + 2 x^{2}} + \frac {a^{2} b^{2} x^{2} \operatorname {atan}{\left (a + b x \right )}}{2 a^{4} x^{2} + 4 a^{2} x^{2} + 2 x^{2}} - \frac {a^{2} b x}{2 a^{4} x^{2} + 4 a^{2} x^{2} + 2 x^{2}} - \frac {2 a^{2} \operatorname {atan}{\left (a + b x \right )}}{2 a^{4} x^{2} + 4 a^{2} x^{2} + 2 x^{2}} - \frac {2 a b^{2} x^{2} \log {\left (x \right )}}{2 a^{4} x^{2} + 4 a^{2} x^{2} + 2 x^{2}} + \frac {a b^{2} x^{2} \log {\left (a^{2} + 2 a b x + b^{2} x^{2} + 1 \right )}}{2 a^{4} x^{2} + 4 a^{2} x^{2} + 2 x^{2}} - \frac {b^{2} x^{2} \operatorname {atan}{\left (a + b x \right )}}{2 a^{4} x^{2} + 4 a^{2} x^{2} + 2 x^{2}} - \frac {b x}{2 a^{4} x^{2} + 4 a^{2} x^{2} + 2 x^{2}} - \frac {\operatorname {atan}{\left (a + b x \right )}}{2 a^{4} x^{2} + 4 a^{2} x^{2} + 2 x^{2}} & \text {otherwise} \end {cases} \] Input:

integrate(atan(b*x+a)/x**3,x)
 

Output:

Piecewise((-b**2*atan(b*x - I)/8 - b/(8*x) - atan(b*x - I)/(2*x**2) - I/(8 
*x**2), Eq(a, -I)), (-b**2*atan(b*x + I)/8 - b/(8*x) - atan(b*x + I)/(2*x* 
*2) + I/(8*x**2), Eq(a, I)), (-a**4*atan(a + b*x)/(2*a**4*x**2 + 4*a**2*x* 
*2 + 2*x**2) + a**2*b**2*x**2*atan(a + b*x)/(2*a**4*x**2 + 4*a**2*x**2 + 2 
*x**2) - a**2*b*x/(2*a**4*x**2 + 4*a**2*x**2 + 2*x**2) - 2*a**2*atan(a + b 
*x)/(2*a**4*x**2 + 4*a**2*x**2 + 2*x**2) - 2*a*b**2*x**2*log(x)/(2*a**4*x* 
*2 + 4*a**2*x**2 + 2*x**2) + a*b**2*x**2*log(a**2 + 2*a*b*x + b**2*x**2 + 
1)/(2*a**4*x**2 + 4*a**2*x**2 + 2*x**2) - b**2*x**2*atan(a + b*x)/(2*a**4* 
x**2 + 4*a**2*x**2 + 2*x**2) - b*x/(2*a**4*x**2 + 4*a**2*x**2 + 2*x**2) - 
atan(a + b*x)/(2*a**4*x**2 + 4*a**2*x**2 + 2*x**2), True))
 

Maxima [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.17 \[ \int \frac {\arctan (a+b x)}{x^3} \, dx=\frac {1}{2} \, {\left (\frac {{\left (a^{2} - 1\right )} b \arctan \left (\frac {b^{2} x + a b}{b}\right )}{a^{4} + 2 \, a^{2} + 1} + \frac {a b \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + 1\right )}{a^{4} + 2 \, a^{2} + 1} - \frac {2 \, a b \log \left (x\right )}{a^{4} + 2 \, a^{2} + 1} - \frac {1}{{\left (a^{2} + 1\right )} x}\right )} b - \frac {\arctan \left (b x + a\right )}{2 \, x^{2}} \] Input:

integrate(arctan(b*x+a)/x^3,x, algorithm="maxima")
 

Output:

1/2*((a^2 - 1)*b*arctan((b^2*x + a*b)/b)/(a^4 + 2*a^2 + 1) + a*b*log(b^2*x 
^2 + 2*a*b*x + a^2 + 1)/(a^4 + 2*a^2 + 1) - 2*a*b*log(x)/(a^4 + 2*a^2 + 1) 
 - 1/((a^2 + 1)*x))*b - 1/2*arctan(b*x + a)/x^2
                                                                                    
                                                                                    
 

Giac [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.20 \[ \int \frac {\arctan (a+b x)}{x^3} \, dx=\frac {1}{2} \, {\left (\frac {a b \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + 1\right )}{a^{4} + 2 \, a^{2} + 1} - \frac {2 \, a b \log \left ({\left | x \right |}\right )}{a^{4} + 2 \, a^{2} + 1} + \frac {{\left (a^{2} b^{2} - b^{2}\right )} \arctan \left (b x + a\right )}{{\left (a^{4} + 2 \, a^{2} + 1\right )} b} - \frac {1}{{\left (a^{2} + 1\right )} x}\right )} b - \frac {\arctan \left (b x + a\right )}{2 \, x^{2}} \] Input:

integrate(arctan(b*x+a)/x^3,x, algorithm="giac")
 

Output:

1/2*(a*b*log(b^2*x^2 + 2*a*b*x + a^2 + 1)/(a^4 + 2*a^2 + 1) - 2*a*b*log(ab 
s(x))/(a^4 + 2*a^2 + 1) + (a^2*b^2 - b^2)*arctan(b*x + a)/((a^4 + 2*a^2 + 
1)*b) - 1/((a^2 + 1)*x))*b - 1/2*arctan(b*x + a)/x^2
 

Mupad [B] (verification not implemented)

Time = 1.63 (sec) , antiderivative size = 232, normalized size of antiderivative = 2.42 \[ \int \frac {\arctan (a+b x)}{x^3} \, dx=\frac {a\,b^2\,\ln \left (a^2+2\,a\,b\,x+b^2\,x^2+1\right )}{2\,{\left (a^2+1\right )}^2}-\frac {\frac {b\,x}{2}+\mathrm {atan}\left (a+b\,x\right )\,\left (\frac {a^2}{2}+\frac {1}{2}\right )+\frac {b^2\,x^2\,\mathrm {atan}\left (a+b\,x\right )}{2}+\frac {x^3\,\left (b^3-3\,a^2\,b^3\right )}{2\,\left (a^4+2\,a^2+1\right )}-\frac {a\,b^4\,x^4}{{\left (a^2+1\right )}^2}+a\,b\,x\,\mathrm {atan}\left (a+b\,x\right )}{a^2\,x^2+2\,a\,b\,x^3+b^2\,x^4+x^2}-\frac {\mathrm {atan}\left (\frac {2\,x\,b^2+2\,a\,b}{2\,\sqrt {b^2\,\left (a^2+1\right )-a^2\,b^2}}\right )\,\left (b^3-a^2\,b^3\right )}{\sqrt {b^2}\,\left (2\,a^4+4\,a^2+2\right )}-\frac {a\,b^2\,\ln \left (x\right )}{{\left (a^2+1\right )}^2} \] Input:

int(atan(a + b*x)/x^3,x)
 

Output:

(a*b^2*log(a^2 + b^2*x^2 + 2*a*b*x + 1))/(2*(a^2 + 1)^2) - ((b*x)/2 + atan 
(a + b*x)*(a^2/2 + 1/2) + (b^2*x^2*atan(a + b*x))/2 + (x^3*(b^3 - 3*a^2*b^ 
3))/(2*(2*a^2 + a^4 + 1)) - (a*b^4*x^4)/(a^2 + 1)^2 + a*b*x*atan(a + b*x)) 
/(x^2 + a^2*x^2 + b^2*x^4 + 2*a*b*x^3) - (atan((2*a*b + 2*b^2*x)/(2*(b^2*( 
a^2 + 1) - a^2*b^2)^(1/2)))*(b^3 - a^2*b^3))/((b^2)^(1/2)*(4*a^2 + 2*a^4 + 
 2)) - (a*b^2*log(x))/(a^2 + 1)^2
 

Reduce [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.31 \[ \int \frac {\arctan (a+b x)}{x^3} \, dx=\frac {-\mathit {atan} \left (b x +a \right ) a^{4}+\mathit {atan} \left (b x +a \right ) a^{2} b^{2} x^{2}-2 \mathit {atan} \left (b x +a \right ) a^{2}-\mathit {atan} \left (b x +a \right ) b^{2} x^{2}-\mathit {atan} \left (b x +a \right )+\mathrm {log}\left (b^{2} x^{2}+2 a b x +a^{2}+1\right ) a \,b^{2} x^{2}-2 \,\mathrm {log}\left (x \right ) a \,b^{2} x^{2}-a^{2} b x -b x}{2 x^{2} \left (a^{4}+2 a^{2}+1\right )} \] Input:

int(atan(b*x+a)/x^3,x)
 

Output:

( - atan(a + b*x)*a**4 + atan(a + b*x)*a**2*b**2*x**2 - 2*atan(a + b*x)*a* 
*2 - atan(a + b*x)*b**2*x**2 - atan(a + b*x) + log(a**2 + 2*a*b*x + b**2*x 
**2 + 1)*a*b**2*x**2 - 2*log(x)*a*b**2*x**2 - a**2*b*x - b*x)/(2*x**2*(a** 
4 + 2*a**2 + 1))