3.41 \(\int \frac {\tan ^{-1}(\tan (a+b x))}{x} \, dx\)

Optimal. Leaf size=21 \[ b x-\log (x) \left (b x-\tan ^{-1}(\tan (a+b x))\right ) \]

[Out]

b*x-(b*x-arctan(tan(b*x+a)))*ln(x)

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {2158, 29} \[ b x-\log (x) \left (b x-\tan ^{-1}(\tan (a+b x))\right ) \]

Antiderivative was successfully verified.

[In]

Int[ArcTan[Tan[a + b*x]]/x,x]

[Out]

b*x - (b*x - ArcTan[Tan[a + b*x]])*Log[x]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 2158

Int[(v_)/(u_), x_Symbol] :> With[{a = Simplify[D[u, x]], b = Simplify[D[v, x]]}, Simp[(b*x)/a, x] - Dist[(b*u
- a*v)/a, Int[1/u, x], x] /; NeQ[b*u - a*v, 0]] /; PiecewiseLinearQ[u, v, x]

Rubi steps

\begin {align*} \int \frac {\tan ^{-1}(\tan (a+b x))}{x} \, dx &=b x-\left (b x-\tan ^{-1}(\tan (a+b x))\right ) \int \frac {1}{x} \, dx\\ &=b x-\left (b x-\tan ^{-1}(\tan (a+b x))\right ) \log (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 19, normalized size = 0.90 \[ \log (x) \left (\tan ^{-1}(\tan (a+b x))-b x\right )+b x \]

Antiderivative was successfully verified.

[In]

Integrate[ArcTan[Tan[a + b*x]]/x,x]

[Out]

b*x + (-(b*x) + ArcTan[Tan[a + b*x]])*Log[x]

________________________________________________________________________________________

fricas [A]  time = 0.79, size = 8, normalized size = 0.38 \[ b x + a \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

b*x + a*log(x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \mathit {sage}_{0} x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

sage0*x

________________________________________________________________________________________

maple [A]  time = 0.19, size = 21, normalized size = 1.00 \[ \ln \relax (x ) \arctan \left (\tan \left (b x +a \right )\right )-\ln \relax (x ) x b +b x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(arctan(tan(b*x+a))/x,x)

[Out]

ln(x)*arctan(tan(b*x+a))-ln(x)*x*b+b*x

________________________________________________________________________________________

maxima [A]  time = 0.42, size = 42, normalized size = 2.00 \[ \frac {b \arctan \left (\tan \left (b x + a\right )\right ) \log \left (b x\right ) + {\left (b x - {\left (b x + a\right )} \log \left (b x\right ) + a \log \left (b x\right ) + a\right )} b}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(b*arctan(tan(b*x + a))*log(b*x) + (b*x - (b*x + a)*log(b*x) + a*log(b*x) + a)*b)/b

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.05 \[ \int \frac {\mathrm {atan}\left (\mathrm {tan}\left (a+b\,x\right )\right )}{x} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(atan(tan(a + b*x))/x,x)

[Out]

int(atan(tan(a + b*x))/x, x)

________________________________________________________________________________________

sympy [A]  time = 0.93, size = 34, normalized size = 1.62 \[ - b x \log {\relax (x )} + b x + \left (\operatorname {atan}{\left (\tan {\left (a + b x \right )} \right )} + \pi \left \lfloor {\frac {a + b x - \frac {\pi }{2}}{\pi }}\right \rfloor \right ) \log {\relax (x )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-b*x*log(x) + b*x + (atan(tan(a + b*x)) + pi*floor((a + b*x - pi/2)/pi))*log(x)

________________________________________________________________________________________