Optimal. Leaf size=21 \[ \frac {\tanh ^{-1}\left (\frac {2 \cos (x)}{\sqrt {3}}\right )}{\sqrt {3}}-\cos (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 21, normalized size of antiderivative = 1.00, 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 206
Rule 388
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.05, 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]
________________________________________________________________________________________
fricas [B] time = 1.51, size = 38, normalized size = 1.81 \[ \frac {1}{6} \, \sqrt {3} \log \left (-\frac {4 \, \cos \relax (x)^{2} + 4 \, \sqrt {3} \cos \relax (x) + 3}{4 \, \cos \relax (x)^{2} - 3}\right ) - \cos \relax (x) \]
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) \tan \left (3 \, x\right )\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.05, size = 19, normalized size = 0.90 \[ -\cos \relax (x )+\frac {\arctanh \left (\frac {2 \cos \relax (x ) \sqrt {3}}{3}\right ) \sqrt {3}}{3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ -\cos \relax (x) - \int \frac {{\left (\sin \left (3 \, x\right ) - \sin \relax (x)\right )} \cos \left (4 \, x\right ) - {\left (\cos \left (3 \, x\right ) - \cos \relax (x)\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 \relax (x) \sin \left (2 \, x\right ) + \cos \left (2 \, x\right ) \sin \relax (x) - \sin \relax (x)}{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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.31, size = 42, normalized size = 2.00 \[ -\frac {\sqrt {3}\,\mathrm {atanh}\left (\frac {32\,\sqrt {3}\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{3\,\left (\frac {56\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{3}-\frac {8}{3}\right )}\right )}{3}-\frac {2}{{\mathrm {tan}\left (\frac {x}{2}\right )}^2+1} \]
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 )} \tan {\left (3 x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________