Integrand size = 7, antiderivative size = 28 \[ \int \cos (x) \cot (4 x) \, dx=-\frac {1}{4} \text {arctanh}(\cos (x))-\frac {\text {arctanh}\left (\sqrt {2} \cos (x)\right )}{2 \sqrt {2}}+\cos (x) \]
[Out]
Time = 0.06 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {1690, 1180, 213} \[ \int \cos (x) \cot (4 x) \, dx=-\frac {1}{4} \text {arctanh}(\cos (x))-\frac {\text {arctanh}\left (\sqrt {2} \cos (x)\right )}{2 \sqrt {2}}+\cos (x) \]
[In]
[Out]
Rule 213
Rule 1180
Rule 1690
Rubi steps \begin{align*} \text {integral}& = -\text {Subst}\left (\int \frac {-1+8 x^2-8 x^4}{4-12 x^2+8 x^4} \, dx,x,\cos (x)\right ) \\ & = -\text {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)-\text {Subst}\left (\int \frac {3-4 x^2}{4-12 x^2+8 x^4} \, dx,x,\cos (x)\right ) \\ & = \cos (x)+2 \text {Subst}\left (\int \frac {1}{-8+8 x^2} \, dx,x,\cos (x)\right )+2 \text {Subst}\left (\int \frac {1}{-4+8 x^2} \, dx,x,\cos (x)\right ) \\ & = -\frac {1}{4} \text {arctanh}(\cos (x))-\frac {\text {arctanh}\left (\sqrt {2} \cos (x)\right )}{2 \sqrt {2}}+\cos (x) \\ \end{align*}
Result contains complex when optimal does not.
Time = 0.11 (sec) , antiderivative size = 73, normalized size of antiderivative = 2.61 \[ \int \cos (x) \cot (4 x) \, dx=\frac {1}{4} \left ((-1-i) (-1)^{3/4} \text {arctanh}\left (\frac {-1+\tan \left (\frac {x}{2}\right )}{\sqrt {2}}\right )-(1-i) \sqrt [4]{-1} \text {arctanh}\left (\frac {1+\tan \left (\frac {x}{2}\right )}{\sqrt {2}}\right )+4 \cos (x)-\log \left (\cos \left (\frac {x}{2}\right )\right )+\log \left (\sin \left (\frac {x}{2}\right )\right )\right ) \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 1.11 (sec) , antiderivative size = 81, normalized size of antiderivative = 2.89
method | result | size |
risch | \(\frac {{\mathrm e}^{i x}}{2}+\frac {{\mathrm e}^{-i x}}{2}+\frac {\ln \left ({\mathrm e}^{i x}-1\right )}{4}-\frac {\ln \left ({\mathrm e}^{i x}+1\right )}{4}-\frac {\sqrt {2}\, \ln \left ({\mathrm e}^{2 i x}+\sqrt {2}\, {\mathrm e}^{i x}+1\right )}{8}+\frac {\sqrt {2}\, \ln \left ({\mathrm e}^{2 i x}-\sqrt {2}\, {\mathrm e}^{i x}+1\right )}{8}\) | \(81\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 53 vs. \(2 (20) = 40\).
Time = 0.27 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.89 \[ \int \cos (x) \cot (4 x) \, dx=\frac {1}{8} \, \sqrt {2} \log \left (\frac {2 \, \cos \left (x\right )^{2} - 2 \, \sqrt {2} \cos \left (x\right ) + 1}{2 \, \cos \left (x\right )^{2} - 1}\right ) + \cos \left (x\right ) - \frac {1}{8} \, \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) + \frac {1}{8} \, \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) \]
[In]
[Out]
\[ \int \cos (x) \cot (4 x) \, dx=\int \cos {\left (x \right )} \cot {\left (4 x \right )}\, dx \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 165 vs. \(2 (20) = 40\).
Time = 0.30 (sec) , antiderivative size = 165, normalized size of antiderivative = 5.89 \[ \int \cos (x) \cot (4 x) \, dx=-\frac {1}{16} \, \sqrt {2} \log \left (2 \, \sqrt {2} \sin \left (2 \, x\right ) \sin \left (x\right ) + 2 \, {\left (\sqrt {2} \cos \left (x\right ) + 1\right )} \cos \left (2 \, x\right ) + \cos \left (2 \, x\right )^{2} + 2 \, \cos \left (x\right )^{2} + \sin \left (2 \, x\right )^{2} + 2 \, \sin \left (x\right )^{2} + 2 \, \sqrt {2} \cos \left (x\right ) + 1\right ) + \frac {1}{16} \, \sqrt {2} \log \left (-2 \, \sqrt {2} \sin \left (2 \, x\right ) \sin \left (x\right ) - 2 \, {\left (\sqrt {2} \cos \left (x\right ) - 1\right )} \cos \left (2 \, x\right ) + \cos \left (2 \, x\right )^{2} + 2 \, \cos \left (x\right )^{2} + \sin \left (2 \, x\right )^{2} + 2 \, \sin \left (x\right )^{2} - 2 \, \sqrt {2} \cos \left (x\right ) + 1\right ) + \cos \left (x\right ) - \frac {1}{8} \, \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \cos \left (x\right ) + 1\right ) + \frac {1}{8} \, \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \cos \left (x\right ) + 1\right ) \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 50 vs. \(2 (20) = 40\).
Time = 0.27 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.79 \[ \int \cos (x) \cot (4 x) \, dx=\frac {1}{8} \, \sqrt {2} \log \left (\frac {{\left | -2 \, \sqrt {2} + 4 \, \cos \left (x\right ) \right |}}{{\left | 2 \, \sqrt {2} + 4 \, \cos \left (x\right ) \right |}}\right ) + \cos \left (x\right ) - \frac {1}{8} \, \log \left (\cos \left (x\right ) + 1\right ) + \frac {1}{8} \, \log \left (-\cos \left (x\right ) + 1\right ) \]
[In]
[Out]
Time = 26.45 (sec) , antiderivative size = 67, normalized size of antiderivative = 2.39 \[ \int \cos (x) \cot (4 x) \, dx=\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} \]
[In]
[Out]