Optimal. Leaf size=28 \[ \cos (x)-\frac {1}{4} \tanh ^{-1}(\cos (x))-\frac {\tanh ^{-1}\left (\sqrt {2} \cos (x)\right )}{2 \sqrt {2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 28, 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 = {1676, 1166, 207} \[ \cos (x)-\frac {1}{4} \tanh ^{-1}(\cos (x))-\frac {\tanh ^{-1}\left (\sqrt {2} \cos (x)\right )}{2 \sqrt {2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 207
Rule 1166
Rule 1676
Rubi steps
\begin {align*} \int \cos (x) \cot (4 x) \, dx &=-\operatorname {Subst}\left (\int \frac {-1+8 x^2-8 x^4}{4-12 x^2+8 x^4} \, dx,x,\cos (x)\right )\\ &=-\operatorname {Subst}\left (\int \left (-1+\frac {3-4 x^2}{4-12 x^2+8 x^4}\right ) \, dx,x,\cos (x)\right )\\ &=\cos (x)-\operatorname {Subst}\left (\int \frac {3-4 x^2}{4-12 x^2+8 x^4} \, dx,x,\cos (x)\right )\\ &=\cos (x)+2 \operatorname {Subst}\left (\int \frac {1}{-8+8 x^2} \, dx,x,\cos (x)\right )+2 \operatorname {Subst}\left (\int \frac {1}{-4+8 x^2} \, dx,x,\cos (x)\right )\\ &=-\frac {1}{4} \tanh ^{-1}(\cos (x))-\frac {\tanh ^{-1}\left (\sqrt {2} \cos (x)\right )}{2 \sqrt {2}}+\cos (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.07, size = 73, normalized size = 2.61 \[ \frac {1}{4} \left (4 \cos (x)+\log \left (\sin \left (\frac {x}{2}\right )\right )-\log \left (\cos \left (\frac {x}{2}\right )\right )+(-1-i) (-1)^{3/4} \tanh ^{-1}\left (\frac {\tan \left (\frac {x}{2}\right )-1}{\sqrt {2}}\right )-(1-i) \sqrt [4]{-1} \tanh ^{-1}\left (\frac {\tan \left (\frac {x}{2}\right )+1}{\sqrt {2}}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.01, size = 53, normalized size = 1.89 \[ \frac {1}{8} \, \sqrt {2} \log \left (\frac {2 \, \cos \relax (x)^{2} - 2 \, \sqrt {2} \cos \relax (x) + 1}{2 \, \cos \relax (x)^{2} - 1}\right ) + \cos \relax (x) - \frac {1}{8} \, \log \left (\frac {1}{2} \, \cos \relax (x) + \frac {1}{2}\right ) + \frac {1}{8} \, \log \left (-\frac {1}{2} \, \cos \relax (x) + \frac {1}{2}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.14, size = 50, normalized size = 1.79 \[ \frac {1}{8} \, \sqrt {2} \log \left (\frac {{\left | -2 \, \sqrt {2} + 4 \, \cos \relax (x) \right |}}{{\left | 2 \, \sqrt {2} + 4 \, \cos \relax (x) \right |}}\right ) + \cos \relax (x) - \frac {1}{8} \, \log \left (\cos \relax (x) + 1\right ) + \frac {1}{8} \, \log \left (-\cos \relax (x) + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.41, size = 30, normalized size = 1.07 \[ \frac {\ln \left (-1+\cos \relax (x )\right )}{8}-\frac {\arctanh \left (\cos \relax (x ) \sqrt {2}\right ) \sqrt {2}}{4}-\frac {\ln \left (1+\cos \relax (x )\right )}{8}+\cos \relax (x ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.42, size = 165, normalized size = 5.89 \[ -\frac {1}{16} \, \sqrt {2} \log \left (2 \, \sqrt {2} \sin \left (2 \, x\right ) \sin \relax (x) + 2 \, {\left (\sqrt {2} \cos \relax (x) + 1\right )} \cos \left (2 \, x\right ) + \cos \left (2 \, x\right )^{2} + 2 \, \cos \relax (x)^{2} + \sin \left (2 \, x\right )^{2} + 2 \, \sin \relax (x)^{2} + 2 \, \sqrt {2} \cos \relax (x) + 1\right ) + \frac {1}{16} \, \sqrt {2} \log \left (-2 \, \sqrt {2} \sin \left (2 \, x\right ) \sin \relax (x) - 2 \, {\left (\sqrt {2} \cos \relax (x) - 1\right )} \cos \left (2 \, x\right ) + \cos \left (2 \, x\right )^{2} + 2 \, \cos \relax (x)^{2} + \sin \left (2 \, x\right )^{2} + 2 \, \sin \relax (x)^{2} - 2 \, \sqrt {2} \cos \relax (x) + 1\right ) + \cos \relax (x) - \frac {1}{8} \, \log \left (\cos \relax (x)^{2} + \sin \relax (x)^{2} + 2 \, \cos \relax (x) + 1\right ) + \frac {1}{8} \, \log \left (\cos \relax (x)^{2} + \sin \relax (x)^{2} - 2 \, \cos \relax (x) + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.35, size = 67, normalized size = 2.39 \[ \frac {\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )}{4}-\frac {\sqrt {2}\,\mathrm {atanh}\left (\frac {7\,\sqrt {2}}{8\,\left (\frac {29\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{4}-\frac {5}{4}\right )}-\frac {41\,\sqrt {2}\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{8\,\left (\frac {29\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{4}-\frac {5}{4}\right )}\right )}{4}+\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 )} \cot {\left (4 x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________