Optimal. Leaf size=85 \[ -\frac {\tanh ^{-1}\left (\sqrt {2} \sin (x)\right )}{3 \sqrt {2}}+\frac {\tanh ^{-1}\left (\frac {2 \sin (x)}{\sqrt {2-\sqrt {3}}}\right )}{6 \sqrt {2-\sqrt {3}}}+\frac {\tanh ^{-1}\left (\frac {2 \sin (x)}{\sqrt {2+\sqrt {3}}}\right )}{6 \sqrt {2+\sqrt {3}}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 4, integrand size = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.571, Rules used = {4356, 2057, 207, 1166} \[ -\frac {\tanh ^{-1}\left (\sqrt {2} \sin (x)\right )}{3 \sqrt {2}}+\frac {\tanh ^{-1}\left (\frac {2 \sin (x)}{\sqrt {2-\sqrt {3}}}\right )}{6 \sqrt {2-\sqrt {3}}}+\frac {\tanh ^{-1}\left (\frac {2 \sin (x)}{\sqrt {2+\sqrt {3}}}\right )}{6 \sqrt {2+\sqrt {3}}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 207
Rule 1166
Rule 2057
Rule 4356
Rubi steps
\begin {align*} \int \cos (x) \sec (6 x) \, dx &=\operatorname {Subst}\left (\int \frac {1}{1-18 x^2+48 x^4-32 x^6} \, dx,x,\sin (x)\right )\\ &=\operatorname {Subst}\left (\int \left (\frac {1}{3 \left (-1+2 x^2\right )}-\frac {4 \left (-1+2 x^2\right )}{3 \left (1-16 x^2+16 x^4\right )}\right ) \, dx,x,\sin (x)\right )\\ &=\frac {1}{3} \operatorname {Subst}\left (\int \frac {1}{-1+2 x^2} \, dx,x,\sin (x)\right )-\frac {4}{3} \operatorname {Subst}\left (\int \frac {-1+2 x^2}{1-16 x^2+16 x^4} \, dx,x,\sin (x)\right )\\ &=-\frac {\tanh ^{-1}\left (\sqrt {2} \sin (x)\right )}{3 \sqrt {2}}-\frac {4}{3} \operatorname {Subst}\left (\int \frac {1}{-8-4 \sqrt {3}+16 x^2} \, dx,x,\sin (x)\right )-\frac {4}{3} \operatorname {Subst}\left (\int \frac {1}{-8+4 \sqrt {3}+16 x^2} \, dx,x,\sin (x)\right )\\ &=-\frac {\tanh ^{-1}\left (\sqrt {2} \sin (x)\right )}{3 \sqrt {2}}+\frac {\tanh ^{-1}\left (\frac {2 \sin (x)}{\sqrt {2-\sqrt {3}}}\right )}{6 \sqrt {2-\sqrt {3}}}+\frac {\tanh ^{-1}\left (\frac {2 \sin (x)}{\sqrt {2+\sqrt {3}}}\right )}{6 \sqrt {2+\sqrt {3}}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 81, normalized size = 0.95 \[ \frac {1}{6} \left (-\sqrt {2} \tanh ^{-1}\left (\sqrt {2} \sin (x)\right )+\sqrt {2+\sqrt {3}} \tanh ^{-1}\left (\frac {2 \sin (x)}{\sqrt {2-\sqrt {3}}}\right )+\sqrt {2-\sqrt {3}} \tanh ^{-1}\left (\frac {2 \sin (x)}{\sqrt {2+\sqrt {3}}}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 4.13, size = 154, normalized size = 1.81 \[ -\frac {1}{12} \, \sqrt {\sqrt {3} + 2} \log \left (\sqrt {\sqrt {3} + 2} {\left (\sqrt {3} - 2\right )} + 2 \, \sin \relax (x)\right ) + \frac {1}{12} \, \sqrt {\sqrt {3} + 2} \log \left (\sqrt {\sqrt {3} + 2} {\left (\sqrt {3} - 2\right )} - 2 \, \sin \relax (x)\right ) + \frac {1}{12} \, \sqrt {-\sqrt {3} + 2} \log \left ({\left (\sqrt {3} + 2\right )} \sqrt {-\sqrt {3} + 2} + 2 \, \sin \relax (x)\right ) - \frac {1}{12} \, \sqrt {-\sqrt {3} + 2} \log \left ({\left (\sqrt {3} + 2\right )} \sqrt {-\sqrt {3} + 2} - 2 \, \sin \relax (x)\right ) + \frac {1}{12} \, \sqrt {2} \log \left (-\frac {2 \, \cos \relax (x)^{2} + 2 \, \sqrt {2} \sin \relax (x) - 3}{2 \, \cos \relax (x)^{2} - 1}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.25, size = 132, normalized size = 1.55 \[ \frac {1}{24} \, {\left (\sqrt {6} - \sqrt {2}\right )} \log \left ({\left | \frac {1}{4} \, \sqrt {6} + \frac {1}{4} \, \sqrt {2} + \sin \relax (x) \right |}\right ) + \frac {1}{24} \, {\left (\sqrt {6} + \sqrt {2}\right )} \log \left ({\left | \frac {1}{4} \, \sqrt {6} - \frac {1}{4} \, \sqrt {2} + \sin \relax (x) \right |}\right ) - \frac {1}{24} \, {\left (\sqrt {6} + \sqrt {2}\right )} \log \left ({\left | -\frac {1}{4} \, \sqrt {6} + \frac {1}{4} \, \sqrt {2} + \sin \relax (x) \right |}\right ) - \frac {1}{24} \, {\left (\sqrt {6} - \sqrt {2}\right )} \log \left ({\left | -\frac {1}{4} \, \sqrt {6} - \frac {1}{4} \, \sqrt {2} + \sin \relax (x) \right |}\right ) + \frac {1}{12} \, \sqrt {2} \log \left (\frac {{\left | -2 \, \sqrt {2} + 4 \, \sin \relax (x) \right |}}{{\left | 2 \, \sqrt {2} + 4 \, \sin \relax (x) \right |}}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.26, size = 80, normalized size = 0.94 \[ \frac {2 \arctanh \left (\frac {8 \sin \relax (x )}{2 \sqrt {6}-2 \sqrt {2}}\right )}{3 \left (2 \sqrt {6}-2 \sqrt {2}\right )}+\frac {2 \arctanh \left (\frac {8 \sin \relax (x )}{2 \sqrt {6}+2 \sqrt {2}}\right )}{3 \left (2 \sqrt {6}+2 \sqrt {2}\right )}-\frac {\arctanh \left (\sin \relax (x ) \sqrt {2}\right ) \sqrt {2}}{6} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ -\frac {1}{24} \, \sqrt {2} \log \left (2 \, \cos \relax (x)^{2} + 2 \, \sin \relax (x)^{2} + 2 \, \sqrt {2} \cos \relax (x) + 2 \, \sqrt {2} \sin \relax (x) + 2\right ) + \frac {1}{24} \, \sqrt {2} \log \left (2 \, \cos \relax (x)^{2} + 2 \, \sin \relax (x)^{2} + 2 \, \sqrt {2} \cos \relax (x) - 2 \, \sqrt {2} \sin \relax (x) + 2\right ) - \frac {1}{24} \, \sqrt {2} \log \left (2 \, \cos \relax (x)^{2} + 2 \, \sin \relax (x)^{2} - 2 \, \sqrt {2} \cos \relax (x) + 2 \, \sqrt {2} \sin \relax (x) + 2\right ) + \frac {1}{24} \, \sqrt {2} \log \left (2 \, \cos \relax (x)^{2} + 2 \, \sin \relax (x)^{2} - 2 \, \sqrt {2} \cos \relax (x) - 2 \, \sqrt {2} \sin \relax (x) + 2\right ) + \int -\frac {{\left (\cos \left (7 \, x\right ) + \cos \left (5 \, x\right ) + \cos \left (3 \, x\right ) + \cos \relax (x)\right )} \cos \left (8 \, x\right ) - {\left (\cos \left (4 \, x\right ) - 1\right )} \cos \left (7 \, x\right ) - {\left (\cos \left (4 \, x\right ) - 1\right )} \cos \left (5 \, x\right ) - {\left (\cos \left (3 \, x\right ) + \cos \relax (x)\right )} \cos \left (4 \, x\right ) + {\left (\sin \left (7 \, x\right ) + \sin \left (5 \, x\right ) + \sin \left (3 \, x\right ) + \sin \relax (x)\right )} \sin \left (8 \, x\right ) - {\left (\sin \left (3 \, x\right ) + \sin \relax (x)\right )} \sin \left (4 \, x\right ) - \sin \left (7 \, x\right ) \sin \left (4 \, x\right ) - \sin \left (5 \, x\right ) \sin \left (4 \, x\right ) + \cos \left (3 \, x\right ) + \cos \relax (x)}{3 \, {\left (2 \, {\left (\cos \left (4 \, x\right ) - 1\right )} \cos \left (8 \, x\right ) - \cos \left (8 \, x\right )^{2} - \cos \left (4 \, x\right )^{2} - \sin \left (8 \, x\right )^{2} + 2 \, \sin \left (8 \, x\right ) \sin \left (4 \, x\right ) - \sin \left (4 \, x\right )^{2} + 2 \, \cos \left (4 \, x\right ) - 1\right )}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.29, size = 118, normalized size = 1.39 \[ \mathrm {atanh}\left (\frac {5\,\sqrt {2}\,\sin \relax (x)}{2097152\,\left (\frac {\sqrt {2}\,\sqrt {6}}{4194304}+\frac {1}{1048576}\right )}+\frac {3\,\sqrt {6}\,\sin \relax (x)}{2097152\,\left (\frac {\sqrt {2}\,\sqrt {6}}{4194304}+\frac {1}{1048576}\right )}\right )\,\left (\frac {\sqrt {2}}{12}+\frac {\sqrt {6}}{12}\right )-\mathrm {atanh}\left (\frac {5\,\sqrt {2}\,\sin \relax (x)}{2097152\,\left (\frac {\sqrt {2}\,\sqrt {6}}{4194304}-\frac {1}{1048576}\right )}-\frac {3\,\sqrt {6}\,\sin \relax (x)}{2097152\,\left (\frac {\sqrt {2}\,\sqrt {6}}{4194304}-\frac {1}{1048576}\right )}\right )\,\left (\frac {\sqrt {2}}{12}-\frac {\sqrt {6}}{12}\right )-\frac {\sqrt {2}\,\mathrm {atanh}\left (\sqrt {2}\,\sin \relax (x)\right )}{6} \]
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 )} \sec {\left (6 x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________