3.110 \(\int \cot (a+b x) \, dx\)

Optimal. Leaf size=11 \[ \frac{\log (\sin (a+b x))}{b} \]

[Out]

Log[Sin[a + b*x]]/b

________________________________________________________________________________________

Rubi [A]  time = 0.0038209, antiderivative size = 11, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 6, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {3475} \[ \frac{\log (\sin (a+b x))}{b} \]

Antiderivative was successfully verified.

[In]

Int[Cot[a + b*x],x]

[Out]

Log[Sin[a + b*x]]/b

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \cot (a+b x) \, dx &=\frac{\log (\sin (a+b x))}{b}\\ \end{align*}

Mathematica [A]  time = 0.0097907, size = 19, normalized size = 1.73 \[ \frac{\log (\tan (a+b x))+\log (\cos (a+b x))}{b} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[a + b*x],x]

[Out]

(Log[Cos[a + b*x]] + Log[Tan[a + b*x]])/b

________________________________________________________________________________________

Maple [B]  time = 0.004, size = 29, normalized size = 2.6 \begin{align*} -{\frac{\ln \left ( 1+ \left ( \tan \left ( bx+a \right ) \right ) ^{2} \right ) }{2\,b}}+{\frac{\ln \left ( \tan \left ( bx+a \right ) \right ) }{b}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 0.963702, size = 15, normalized size = 1.36 \begin{align*} \frac{\log \left (\sin \left (b x + a\right )\right )}{b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(sin(b*x + a))/b

________________________________________________________________________________________

Fricas [B]  time = 1.76488, size = 65, normalized size = 5.91 \begin{align*} \frac{\log \left (\frac{\tan \left (b x + a\right )^{2}}{\tan \left (b x + a\right )^{2} + 1}\right )}{2 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*log(tan(b*x + a)^2/(tan(b*x + a)^2 + 1))/b

________________________________________________________________________________________

Sympy [A]  time = 0.33813, size = 29, normalized size = 2.64 \begin{align*} \begin{cases} - \frac{\log{\left (\tan ^{2}{\left (a + b x \right )} + 1 \right )}}{2 b} + \frac{\log{\left (\tan{\left (a + b x \right )} \right )}}{b} & \text{for}\: b \neq 0 \\\frac{x}{\tan{\left (a \right )}} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((-log(tan(a + b*x)**2 + 1)/(2*b) + log(tan(a + b*x))/b, Ne(b, 0)), (x/tan(a), True))

________________________________________________________________________________________

Giac [B]  time = 1.13425, size = 76, normalized size = 6.91 \begin{align*} \frac{\log \left (\frac{{\left | -\cos \left (b x + a\right ) + 1 \right |}}{{\left | \cos \left (b x + a\right ) + 1 \right |}}\right ) - 2 \, \log \left ({\left | -\frac{\cos \left (b x + a\right ) - 1}{\cos \left (b x + a\right ) + 1} + 1 \right |}\right )}{2 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*(log(abs(-cos(b*x + a) + 1)/abs(cos(b*x + a) + 1)) - 2*log(abs(-(cos(b*x + a) - 1)/(cos(b*x + a) + 1) + 1)
))/b