Optimal. Leaf size=85 \[ -\frac {\tanh ^{-1}\left (\sqrt {2} \cos (x)\right )}{3 \sqrt {2}}+\frac {\tanh ^{-1}\left (\frac {2 \cos (x)}{\sqrt {2-\sqrt {3}}}\right )}{6 \sqrt {2-\sqrt {3}}}+\frac {\tanh ^{-1}\left (\frac {2 \cos (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 = {4357, 2057, 207, 1166} \[ -\frac {\tanh ^{-1}\left (\sqrt {2} \cos (x)\right )}{3 \sqrt {2}}+\frac {\tanh ^{-1}\left (\frac {2 \cos (x)}{\sqrt {2-\sqrt {3}}}\right )}{6 \sqrt {2-\sqrt {3}}}+\frac {\tanh ^{-1}\left (\frac {2 \cos (x)}{\sqrt {2+\sqrt {3}}}\right )}{6 \sqrt {2+\sqrt {3}}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 207
Rule 1166
Rule 2057
Rule 4357
Rubi steps
\begin {align*} \int \sec (6 x) \sin (x) \, dx &=-\operatorname {Subst}\left (\int \frac {1}{-1+18 x^2-48 x^4+32 x^6} \, dx,x,\cos (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,\cos (x)\right )\\ &=\frac {1}{3} \operatorname {Subst}\left (\int \frac {1}{-1+2 x^2} \, dx,x,\cos (x)\right )-\frac {4}{3} \operatorname {Subst}\left (\int \frac {-1+2 x^2}{1-16 x^2+16 x^4} \, dx,x,\cos (x)\right )\\ &=-\frac {\tanh ^{-1}\left (\sqrt {2} \cos (x)\right )}{3 \sqrt {2}}-\frac {4}{3} \operatorname {Subst}\left (\int \frac {1}{-8-4 \sqrt {3}+16 x^2} \, dx,x,\cos (x)\right )-\frac {4}{3} \operatorname {Subst}\left (\int \frac {1}{-8+4 \sqrt {3}+16 x^2} \, dx,x,\cos (x)\right )\\ &=-\frac {\tanh ^{-1}\left (\sqrt {2} \cos (x)\right )}{3 \sqrt {2}}+\frac {\tanh ^{-1}\left (\frac {2 \cos (x)}{\sqrt {2-\sqrt {3}}}\right )}{6 \sqrt {2-\sqrt {3}}}+\frac {\tanh ^{-1}\left (\frac {2 \cos (x)}{\sqrt {2+\sqrt {3}}}\right )}{6 \sqrt {2+\sqrt {3}}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 9.33, size = 627, normalized size = 7.38 \[ \frac {1}{24} \left ((-4-4 i) (-1)^{3/4} \tanh ^{-1}\left (\frac {\tan \left (\frac {x}{2}\right )-1}{\sqrt {2}}\right )-(4-4 i) \sqrt [4]{-1} \tanh ^{-1}\left (\frac {\tan \left (\frac {x}{2}\right )+1}{\sqrt {2}}\right )+\frac {2 \left (1+\sqrt {2}\right ) \left (x-\log \left (\sec ^2\left (\frac {x}{2}\right )\right )+2 \sqrt {3} \tanh ^{-1}\left (\frac {\left (2+\sqrt {2}\right ) \tan \left (\frac {x}{2}\right )+2}{\sqrt {6}}\right )+\log \left (-\sec ^2\left (\frac {x}{2}\right ) \left (2 \sin (x)-2 \cos (x)+\sqrt {2}\right )\right )\right )}{2+\sqrt {2}}-\sqrt {2} \left (x-\log \left (\sec ^2\left (\frac {x}{2}\right )\right )-2 \sqrt {3} \tanh ^{-1}\left (\frac {\left (\sqrt {2}-1\right ) \tan \left (\frac {x}{2}\right )+\sqrt {2}}{\sqrt {3}}\right )+\log \left (\sec ^2\left (\frac {x}{2}\right ) \left (-\sqrt {2} \sin (x)+\sqrt {2} \cos (x)+1\right )\right )\right )+\frac {2 \left (\sqrt {6} \sin (x)+1\right ) \left (\left (2+\sqrt {6}\right ) \sin (x)-\left (\left (2+\sqrt {6}\right ) \cos (x)\right )+\sqrt {6}+3\right ) \left (2 \left (\sqrt {2}+\sqrt {3}\right ) \tanh ^{-1}\left (\frac {\left (2+\sqrt {6}\right ) \tan \left (\frac {x}{2}\right )+2}{\sqrt {2}}\right )+\left (3+\sqrt {6}\right ) \left (x-\log \left (\sec ^2\left (\frac {x}{2}\right )\right )+\log \left (-\sec ^2\left (\frac {x}{2}\right ) \left (2 \sin (x)-2 \cos (x)+\sqrt {6}\right )\right )\right )\right )}{-2 \left (4 \left (5+2 \sqrt {6}\right ) \sin (x)-6 \sin (2 x)+5 \sqrt {6}+12\right )+\left (12+5 \sqrt {6}\right ) \cos (2 x)+2 \left (5 \sqrt {6} \sin (x)+2 \sqrt {6}+5\right ) \cos (x)}+\frac {\left (\sqrt {2}-2 \sqrt {3} \sin (x)\right ) \left (\left (\sqrt {6}-2\right ) \sin (x)-\left (\left (\sqrt {6}-2\right ) \cos (x)\right )+\sqrt {6}-3\right ) \left (\left (3 \sqrt {2}-2 \sqrt {3}\right ) \left (x-\log \left (\sec ^2\left (\frac {x}{2}\right )\right )+\log \left (-\sec ^2\left (\frac {x}{2}\right ) \left (-\sqrt {2} \sin (x)+\sqrt {2} \cos (x)+\sqrt {3}\right )\right )\right )-2 \left (\sqrt {6}-2\right ) \tanh ^{-1}\left (\left (\sqrt {2}-\sqrt {3}\right ) \tan \left (\frac {x}{2}\right )+\sqrt {2}\right )\right )}{-2 \left (4 \left (2 \sqrt {6}-5\right ) \sin (x)+6 \sin (2 x)+5 \sqrt {6}-12\right )+\left (5 \sqrt {6}-12\right ) \cos (2 x)+2 \left (5 \sqrt {6} \sin (x)+2 \sqrt {6}-5\right ) \cos (x)}\right ) \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.05, size = 153, normalized size = 1.80 \[ -\frac {1}{12} \, \sqrt {\sqrt {3} + 2} \log \left (\sqrt {\sqrt {3} + 2} {\left (\sqrt {3} - 2\right )} + 2 \, \cos \relax (x)\right ) + \frac {1}{12} \, \sqrt {\sqrt {3} + 2} \log \left (\sqrt {\sqrt {3} + 2} {\left (\sqrt {3} - 2\right )} - 2 \, \cos \relax (x)\right ) + \frac {1}{12} \, \sqrt {-\sqrt {3} + 2} \log \left ({\left (\sqrt {3} + 2\right )} \sqrt {-\sqrt {3} + 2} + 2 \, \cos \relax (x)\right ) - \frac {1}{12} \, \sqrt {-\sqrt {3} + 2} \log \left ({\left (\sqrt {3} + 2\right )} \sqrt {-\sqrt {3} + 2} - 2 \, \cos \relax (x)\right ) + \frac {1}{12} \, \sqrt {2} \log \left (\frac {2 \, \cos \relax (x)^{2} - 2 \, \sqrt {2} \cos \relax (x) + 1}{2 \, \cos \relax (x)^{2} - 1}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.16, size = 182, normalized size = 2.14 \[ -\frac {1}{12} \, \sqrt {2} \log \left (\frac {{\left | -4 \, \sqrt {2} - \frac {2 \, {\left (\cos \relax (x) - 1\right )}}{\cos \relax (x) + 1} - 6 \right |}}{{\left | 4 \, \sqrt {2} - \frac {2 \, {\left (\cos \relax (x) - 1\right )}}{\cos \relax (x) + 1} - 6 \right |}}\right ) - \frac {2.39014968180000 \, \log \left (-\frac {\cos \relax (x) - 1}{\cos \relax (x) + 1} - 0.0173323801210000\right )}{\frac {268 \, {\left (\cos \relax (x) - 1\right )}}{\cos \relax (x) + 1} + 60.0540532247402} + \frac {5.82951931426000 \, \log \left (-\frac {\cos \relax (x) - 1}{\cos \relax (x) + 1} - 0.588790706481000\right )}{\frac {268 \, {\left (\cos \relax (x) - 1\right )}}{\cos \relax (x) + 1} + 121.584934401100} + \frac {16.8155413244667 \, \log \left (-\frac {\cos \relax (x) - 1}{\cos \relax (x) + 1} - 1.69839637242000\right )}{\frac {268 \, {\left (\cos \relax (x) - 1\right )}}{\cos \relax (x) + 1} + 559.622604171000} - \frac {7956.25491093333 \, \log \left (-\frac {\cos \relax (x) - 1}{\cos \relax (x) + 1} - 57.6954805410000\right )}{\frac {268 \, {\left (\cos \relax (x) - 1\right )}}{\cos \relax (x) + 1} - 168981.261592000} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.24, size = 80, normalized size = 0.94 \[ \frac {2 \arctanh \left (\frac {8 \cos \relax (x )}{2 \sqrt {6}-2 \sqrt {2}}\right )}{3 \left (2 \sqrt {6}-2 \sqrt {2}\right )}+\frac {2 \arctanh \left (\frac {8 \cos \relax (x )}{2 \sqrt {6}+2 \sqrt {2}}\right )}{3 \left (2 \sqrt {6}+2 \sqrt {2}\right )}-\frac {\arctanh \left (\cos \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 \, \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}{24} \, \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 ) - \int \frac {{\left (\sin \left (7 \, x\right ) - \sin \left (5 \, x\right ) + \sin \left (3 \, x\right ) - \sin \relax (x)\right )} \cos \left (8 \, x\right ) - {\left (\sin \left (3 \, x\right ) - \sin \relax (x)\right )} \cos \left (4 \, x\right ) - {\left (\cos \left (7 \, x\right ) - \cos \left (5 \, x\right ) + \cos \left (3 \, x\right ) - \cos \relax (x)\right )} \sin \left (8 \, x\right ) - {\left (\cos \left (4 \, x\right ) - 1\right )} \sin \left (7 \, x\right ) + {\left (\cos \left (4 \, x\right ) - 1\right )} \sin \left (5 \, x\right ) + {\left (\cos \left (3 \, x\right ) - \cos \relax (x)\right )} \sin \left (4 \, x\right ) + \cos \left (7 \, x\right ) \sin \left (4 \, x\right ) - \cos \left (5 \, x\right ) \sin \left (4 \, x\right ) + \sin \left (3 \, x\right ) - \sin \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.28, size = 118, normalized size = 1.39 \[ \mathrm {atanh}\left (\frac {5\,\sqrt {2}\,\cos \relax (x)}{2097152\,\left (\frac {\sqrt {2}\,\sqrt {6}}{4194304}+\frac {1}{1048576}\right )}+\frac {3\,\sqrt {6}\,\cos \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}\,\cos \relax (x)}{2097152\,\left (\frac {\sqrt {2}\,\sqrt {6}}{4194304}-\frac {1}{1048576}\right )}-\frac {3\,\sqrt {6}\,\cos \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}\,\cos \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 \sin {\relax (x )} \sec {\left (6 x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________