Optimal. Leaf size=21 \[ \frac{\tanh ^{-1}\left (\frac{2 \cos (x)}{\sqrt{3}}\right )}{\sqrt{3}}-\cos (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0242572, antiderivative size = 21, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 7, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.286, Rules used = {388, 206} \[ \frac{\tanh ^{-1}\left (\frac{2 \cos (x)}{\sqrt{3}}\right )}{\sqrt{3}}-\cos (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 388
Rule 206
Rubi steps
\begin{align*} \int \cos (x) \tan (3 x) \, dx &=-\operatorname{Subst}\left (\int \frac{1-4 x^2}{3-4 x^2} \, dx,x,\cos (x)\right )\\ &=-\cos (x)+2 \operatorname{Subst}\left (\int \frac{1}{3-4 x^2} \, dx,x,\cos (x)\right )\\ &=\frac{\tanh ^{-1}\left (\frac{2 \cos (x)}{\sqrt{3}}\right )}{\sqrt{3}}-\cos (x)\\ \end{align*}
Mathematica [B] time = 0.0527161, size = 48, normalized size = 2.29 \[ -\cos (x)-\frac{\tanh ^{-1}\left (\frac{\tan \left (\frac{x}{2}\right )-2}{\sqrt{3}}\right )}{\sqrt{3}}+\frac{\tanh ^{-1}\left (\frac{\tan \left (\frac{x}{2}\right )+2}{\sqrt{3}}\right )}{\sqrt{3}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.022, size = 19, normalized size = 0.9 \begin{align*} -\cos \left ( x \right ) +{\frac{\sqrt{3}}{3}{\it Artanh} \left ({\frac{2\,\cos \left ( x \right ) \sqrt{3}}{3}} \right ) } \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*} -\cos \left (x\right ) - \int \frac{{\left (\sin \left (3 \, x\right ) - \sin \left (x\right )\right )} \cos \left (4 \, x\right ) -{\left (\cos \left (3 \, x\right ) - \cos \left (x\right )\right )} \sin \left (4 \, x\right ) -{\left (\cos \left (2 \, x\right ) - 1\right )} \sin \left (3 \, x\right ) + \cos \left (3 \, x\right ) \sin \left (2 \, x\right ) - \cos \left (x\right ) \sin \left (2 \, x\right ) + \cos \left (2 \, x\right ) \sin \left (x\right ) - \sin \left (x\right )}{2 \,{\left (\cos \left (2 \, x\right ) - 1\right )} \cos \left (4 \, x\right ) - \cos \left (4 \, x\right )^{2} - \cos \left (2 \, x\right )^{2} - \sin \left (4 \, x\right )^{2} + 2 \, \sin \left (4 \, x\right ) \sin \left (2 \, x\right ) - \sin \left (2 \, x\right )^{2} + 2 \, \cos \left (2 \, x\right ) - 1}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.85551, size = 109, normalized size = 5.19 \begin{align*} \frac{1}{6} \, \sqrt{3} \log \left (-\frac{4 \, \cos \left (x\right )^{2} + 4 \, \sqrt{3} \cos \left (x\right ) + 3}{4 \, \cos \left (x\right )^{2} - 3}\right ) - \cos \left (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 \cos{\left (x \right )} \tan{\left (3 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 \cos \left (x\right ) \tan \left (3 \, x\right )\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]