3.61 \(\int \frac {\cot (c+d x)}{a+a \sec (c+d x)} \, dx\)

Optimal. Leaf size=61 \[ \frac {1}{2 a d (\cos (c+d x)+1)}+\frac {\log (1-\cos (c+d x))}{4 a d}+\frac {3 \log (\cos (c+d x)+1)}{4 a d} \]

[Out]

1/2/a/d/(1+cos(d*x+c))+1/4*ln(1-cos(d*x+c))/a/d+3/4*ln(1+cos(d*x+c))/a/d

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {3879, 88} \[ \frac {1}{2 a d (\cos (c+d x)+1)}+\frac {\log (1-\cos (c+d x))}{4 a d}+\frac {3 \log (\cos (c+d x)+1)}{4 a d} \]

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]/(a + a*Sec[c + d*x]),x]

[Out]

1/(2*a*d*(1 + Cos[c + d*x])) + Log[1 - Cos[c + d*x]]/(4*a*d) + (3*Log[1 + Cos[c + d*x]])/(4*a*d)

Rule 88

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rule 3879

Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_.), x_Symbol] :> Dist[1/(a^(m - n
- 1)*b^n*d), Subst[Int[((a - b*x)^((m - 1)/2)*(a + b*x)^((m - 1)/2 + n))/x^(m + n), x], x, Sin[c + d*x]], x] /
; FreeQ[{a, b, c, d}, x] && IntegerQ[(m - 1)/2] && EqQ[a^2 - b^2, 0] && IntegerQ[n]

Rubi steps

\begin {align*} \int \frac {\cot (c+d x)}{a+a \sec (c+d x)} \, dx &=-\frac {a^2 \operatorname {Subst}\left (\int \frac {x^2}{(a-a x) (a+a x)^2} \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac {a^2 \operatorname {Subst}\left (\int \left (-\frac {1}{4 a^3 (-1+x)}+\frac {1}{2 a^3 (1+x)^2}-\frac {3}{4 a^3 (1+x)}\right ) \, dx,x,\cos (c+d x)\right )}{d}\\ &=\frac {1}{2 a d (1+\cos (c+d x))}+\frac {\log (1-\cos (c+d x))}{4 a d}+\frac {3 \log (1+\cos (c+d x))}{4 a d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.12, size = 67, normalized size = 1.10 \[ \frac {\sec (c+d x) \left (2 \cos ^2\left (\frac {1}{2} (c+d x)\right ) \left (\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+3 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )\right )+1\right )}{2 a d (\sec (c+d x)+1)} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]/(a + a*Sec[c + d*x]),x]

[Out]

((1 + 2*Cos[(c + d*x)/2]^2*(3*Log[Cos[(c + d*x)/2]] + Log[Sin[(c + d*x)/2]]))*Sec[c + d*x])/(2*a*d*(1 + Sec[c
+ d*x]))

________________________________________________________________________________________

fricas [A]  time = 0.74, size = 60, normalized size = 0.98 \[ \frac {3 \, {\left (\cos \left (d x + c\right ) + 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + {\left (\cos \left (d x + c\right ) + 1\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 2}{4 \, {\left (a d \cos \left (d x + c\right ) + a d\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)/(a+a*sec(d*x+c)),x, algorithm="fricas")

[Out]

1/4*(3*(cos(d*x + c) + 1)*log(1/2*cos(d*x + c) + 1/2) + (cos(d*x + c) + 1)*log(-1/2*cos(d*x + c) + 1/2) + 2)/(
a*d*cos(d*x + c) + a*d)

________________________________________________________________________________________

giac [A]  time = 1.24, size = 86, normalized size = 1.41 \[ \frac {\frac {\log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right )}{a} - \frac {4 \, \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1 \right |}\right )}{a} - \frac {\cos \left (d x + c\right ) - 1}{a {\left (\cos \left (d x + c\right ) + 1\right )}}}{4 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)/(a+a*sec(d*x+c)),x, algorithm="giac")

[Out]

1/4*(log(abs(-cos(d*x + c) + 1)/abs(cos(d*x + c) + 1))/a - 4*log(abs(-(cos(d*x + c) - 1)/(cos(d*x + c) + 1) +
1))/a - (cos(d*x + c) - 1)/(a*(cos(d*x + c) + 1)))/d

________________________________________________________________________________________

maple [A]  time = 0.61, size = 54, normalized size = 0.89 \[ \frac {\ln \left (-1+\cos \left (d x +c \right )\right )}{4 d a}+\frac {1}{2 a d \left (1+\cos \left (d x +c \right )\right )}+\frac {3 \ln \left (1+\cos \left (d x +c \right )\right )}{4 d a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)/(a+a*sec(d*x+c)),x)

[Out]

1/4/d/a*ln(-1+cos(d*x+c))+1/2/a/d/(1+cos(d*x+c))+3/4*ln(1+cos(d*x+c))/d/a

________________________________________________________________________________________

maxima [A]  time = 0.32, size = 47, normalized size = 0.77 \[ \frac {\frac {3 \, \log \left (\cos \left (d x + c\right ) + 1\right )}{a} + \frac {\log \left (\cos \left (d x + c\right ) - 1\right )}{a} + \frac {2}{a \cos \left (d x + c\right ) + a}}{4 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)/(a+a*sec(d*x+c)),x, algorithm="maxima")

[Out]

1/4*(3*log(cos(d*x + c) + 1)/a + log(cos(d*x + c) - 1)/a + 2/(a*cos(d*x + c) + a))/d

________________________________________________________________________________________

mupad [B]  time = 1.25, size = 49, normalized size = 0.80 \[ \frac {\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2}-\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{4}}{a\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(c + d*x)/(a + a/cos(c + d*x)),x)

[Out]

(log(tan(c/2 + (d*x)/2))/2 - log(tan(c/2 + (d*x)/2)^2 + 1) + tan(c/2 + (d*x)/2)^2/4)/(a*d)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\cot {\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)/(a+a*sec(d*x+c)),x)

[Out]

Integral(cot(c + d*x)/(sec(c + d*x) + 1), x)/a

________________________________________________________________________________________