Optimal. Leaf size=92 \[ e^{-i x} \, _2F_1\left (1,-\frac {1}{2 n};1-\frac {1}{2 n};e^{2 i n x}\right )-e^{i x} \, _2F_1\left (1,\frac {1}{2 n};\frac {1}{2} \left (2+\frac {1}{n}\right );e^{2 i n x}\right )-\frac {e^{-i x}}{2}+\frac {e^{i x}}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 92, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 3, integrand size = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {4558, 2194, 2251} \[ e^{-i x} \, _2F_1\left (1,-\frac {1}{2 n};1-\frac {1}{2 n};e^{2 i n x}\right )-e^{i x} \, _2F_1\left (1,\frac {1}{2 n};\frac {1}{2} \left (2+\frac {1}{n}\right );e^{2 i n x}\right )-\frac {e^{-i x}}{2}+\frac {e^{i x}}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2194
Rule 2251
Rule 4558
Rubi steps
\begin {align*} \int \cos (x) \cot (n x) \, dx &=\int \left (\frac {1}{2} i e^{-i x}+\frac {1}{2} i e^{i x}-\frac {i e^{-i x}}{1-e^{2 i n x}}-\frac {i e^{i x}}{1-e^{2 i n x}}\right ) \, dx\\ &=\frac {1}{2} i \int e^{-i x} \, dx+\frac {1}{2} i \int e^{i x} \, dx-i \int \frac {e^{-i x}}{1-e^{2 i n x}} \, dx-i \int \frac {e^{i x}}{1-e^{2 i n x}} \, dx\\ &=-\frac {1}{2} e^{-i x}+\frac {e^{i x}}{2}+e^{-i x} \, _2F_1\left (1,-\frac {1}{2 n};1-\frac {1}{2 n};e^{2 i n x}\right )-e^{i x} \, _2F_1\left (1,\frac {1}{2 n};\frac {1}{2} \left (2+\frac {1}{n}\right );e^{2 i n x}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.18, size = 179, normalized size = 1.95 \[ \frac {1}{2} e^{-2 i x} \left (-\frac {e^{i (2 n x+x)} \, _2F_1\left (1,1-\frac {1}{2 n};2-\frac {1}{2 n};e^{2 i n x}\right )}{2 n-1}-\frac {e^{i (2 n+3) x} \, _2F_1\left (1,1+\frac {1}{2 n};2+\frac {1}{2 n};e^{2 i n x}\right )}{2 n+1}+e^{i x} \, _2F_1\left (1,-\frac {1}{2 n};1-\frac {1}{2 n};e^{2 i n x}\right )-e^{3 i x} \, _2F_1\left (1,\frac {1}{2 n};1+\frac {1}{2 n};e^{2 i n x}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 1.07, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\cos \relax (x) \cot \left (n x\right ), x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \cos \relax (x) \cot \left (n x\right )\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.55, size = 0, normalized size = 0.00 \[ \int \cos \relax (x ) \cot \left (n x \right )\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \cos \relax (x) \cot \left (n x\right )\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \mathrm {cot}\left (n\,x\right )\,\cos \relax (x) \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \cos {\relax (x )} \cot {\left (n x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________