Optimal. Leaf size=105 \[ -i e^{-i x} \text{Hypergeometric2F1}\left (1,-\frac{1}{2 n},1-\frac{1}{2 n},-e^{2 i n x}\right )-i e^{i x} \text{Hypergeometric2F1}\left (1,\frac{1}{2 n},\frac{1}{2} \left (\frac{1}{n}+2\right ),-e^{2 i n x}\right )+\frac{1}{2} i e^{-i x}+\frac{1}{2} i e^{i x} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0773561, antiderivative size = 105, normalized size of antiderivative = 1., 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 = {4557, 2194, 2251} \[ -i e^{-i x} \, _2F_1\left (1,-\frac{1}{2 n};1-\frac{1}{2 n};-e^{2 i n x}\right )-i 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{1}{2} i e^{-i x}+\frac{1}{2} i e^{i x} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4557
Rule 2194
Rule 2251
Rubi steps
\begin{align*} \int \sin (x) \tan (n x) \, dx &=\int \left (\frac{e^{-i x}}{2}-\frac{e^{i x}}{2}-\frac{e^{-i x}}{1+e^{2 i n x}}+\frac{e^{i x}}{1+e^{2 i n x}}\right ) \, dx\\ &=\frac{1}{2} \int e^{-i x} \, dx-\frac{1}{2} \int e^{i x} \, dx-\int \frac{e^{-i x}}{1+e^{2 i n x}} \, dx+\int \frac{e^{i x}}{1+e^{2 i n x}} \, dx\\ &=\frac{1}{2} i e^{-i x}+\frac{1}{2} i e^{i x}-i e^{-i x} \, _2F_1\left (1,-\frac{1}{2 n};1-\frac{1}{2 n};-e^{2 i n x}\right )-i 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.164693, size = 200, normalized size = 1.9 \[ -\frac{i e^{-2 i x} \left ((2 n+1) e^{i (2 n x+x)} \text{Hypergeometric2F1}\left (1,1-\frac{1}{2 n},2-\frac{1}{2 n},-e^{2 i n x}\right )+(2 n-1) \left ((2 n+1) e^{i x} \left (\text{Hypergeometric2F1}\left (1,-\frac{1}{2 n},1-\frac{1}{2 n},-e^{2 i n x}\right )+e^{2 i x} \text{Hypergeometric2F1}\left (1,\frac{1}{2 n},\frac{1}{2 n}+1,-e^{2 i n x}\right )\right )-e^{i (2 n+3) x} \text{Hypergeometric2F1}\left (1,\frac{1}{2 n}+1,\frac{1}{2 n}+2,-e^{2 i n x}\right )\right )\right )}{2 \left (4 n^2-1\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.174, size = 0, normalized size = 0. \begin{align*} \int \sin \left ( x \right ) \tan \left ( nx \right ) \, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sin \left (x\right ) \tan \left (n x\right )\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\sin \left (x\right ) \tan \left (n x\right ), x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sin{\left (x \right )} \tan{\left (n x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sin \left (x\right ) \tan \left (n x\right )\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]