Optimal. Leaf size=112 \[ \frac{5 \sin ^{-1}\left (2 \sqrt{\frac{2}{7}} \sin (x)\right )}{4 \sqrt{2}}+\frac{3}{4} \sin ^{-1}\left (\frac{2 \sin (x)}{\sqrt{3}}\right )-\frac{1}{2} \sin (x) \sqrt{4 \cos ^2(x)-1}-\frac{1}{2} \sin (x) \sqrt{8 \cos ^2(x)-1}-\frac{3}{4} \tan ^{-1}\left (\frac{\sin (x)}{\sqrt{4 \cos ^2(x)-1}}\right )-\frac{3}{4} \tan ^{-1}\left (\frac{\sin (x)}{\sqrt{8 \cos ^2(x)-1}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.444286, antiderivative size = 112, normalized size of antiderivative = 1., number of steps used = 27, number of rules used = 6, integrand size = 39, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {6742, 402, 216, 377, 204, 195} \[ \frac{5 \sin ^{-1}\left (2 \sqrt{\frac{2}{7}} \sin (x)\right )}{4 \sqrt{2}}+\frac{3}{4} \sin ^{-1}\left (\frac{2 \sin (x)}{\sqrt{3}}\right )-\frac{1}{2} \sin (x) \sqrt{7-8 \sin ^2(x)}-\frac{1}{2} \sin (x) \sqrt{3-4 \sin ^2(x)}-\frac{3}{4} \tan ^{-1}\left (\frac{\sin (x)}{\sqrt{7-8 \sin ^2(x)}}\right )-\frac{3}{4} \tan ^{-1}\left (\frac{\sin (x)}{\sqrt{3-4 \sin ^2(x)}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 6742
Rule 402
Rule 216
Rule 377
Rule 204
Rule 195
Rubi steps
\begin{align*} \int \frac{\cos (3 x)}{-\sqrt{-1+8 \cos ^2(x)}+\sqrt{3 \cos ^2(x)-\sin ^2(x)}} \, dx &=\operatorname{Subst}\left (\int \frac{-1+4 x^2}{\sqrt{7-8 x^2}-\sqrt{3-4 x^2}} \, dx,x,\sin (x)\right )\\ &=\operatorname{Subst}\left (\int \left (-\frac{1}{\sqrt{7-8 x^2}-\sqrt{3-4 x^2}}+\frac{4 x^2}{\sqrt{7-8 x^2}-\sqrt{3-4 x^2}}\right ) \, dx,x,\sin (x)\right )\\ &=4 \operatorname{Subst}\left (\int \frac{x^2}{\sqrt{7-8 x^2}-\sqrt{3-4 x^2}} \, dx,x,\sin (x)\right )-\operatorname{Subst}\left (\int \frac{1}{\sqrt{7-8 x^2}-\sqrt{3-4 x^2}} \, dx,x,\sin (x)\right )\\ &=4 \operatorname{Subst}\left (\int \left (-\frac{1}{4} \sqrt{7-8 x^2}-\frac{1}{4} \sqrt{3-4 x^2}-\frac{\sqrt{7-8 x^2}}{4 \left (-1+x^2\right )}-\frac{\sqrt{3-4 x^2}}{4 \left (-1+x^2\right )}\right ) \, dx,x,\sin (x)\right )-\operatorname{Subst}\left (\int \left (-\frac{\sqrt{7-8 x^2}}{4 \left (-1+x^2\right )}-\frac{\sqrt{3-4 x^2}}{4 \left (-1+x^2\right )}\right ) \, dx,x,\sin (x)\right )\\ &=\frac{1}{4} \operatorname{Subst}\left (\int \frac{\sqrt{7-8 x^2}}{-1+x^2} \, dx,x,\sin (x)\right )+\frac{1}{4} \operatorname{Subst}\left (\int \frac{\sqrt{3-4 x^2}}{-1+x^2} \, dx,x,\sin (x)\right )-\operatorname{Subst}\left (\int \sqrt{7-8 x^2} \, dx,x,\sin (x)\right )-\operatorname{Subst}\left (\int \sqrt{3-4 x^2} \, dx,x,\sin (x)\right )-\operatorname{Subst}\left (\int \frac{\sqrt{7-8 x^2}}{-1+x^2} \, dx,x,\sin (x)\right )-\operatorname{Subst}\left (\int \frac{\sqrt{3-4 x^2}}{-1+x^2} \, dx,x,\sin (x)\right )\\ &=-\frac{1}{2} \sin (x) \sqrt{7-8 \sin ^2(x)}-\frac{1}{2} \sin (x) \sqrt{3-4 \sin ^2(x)}-\frac{1}{4} \operatorname{Subst}\left (\int \frac{1}{\sqrt{7-8 x^2} \left (-1+x^2\right )} \, dx,x,\sin (x)\right )-\frac{1}{4} \operatorname{Subst}\left (\int \frac{1}{\sqrt{3-4 x^2} \left (-1+x^2\right )} \, dx,x,\sin (x)\right )-\frac{3}{2} \operatorname{Subst}\left (\int \frac{1}{\sqrt{3-4 x^2}} \, dx,x,\sin (x)\right )-2 \operatorname{Subst}\left (\int \frac{1}{\sqrt{7-8 x^2}} \, dx,x,\sin (x)\right )-\frac{7}{2} \operatorname{Subst}\left (\int \frac{1}{\sqrt{7-8 x^2}} \, dx,x,\sin (x)\right )+4 \operatorname{Subst}\left (\int \frac{1}{\sqrt{3-4 x^2}} \, dx,x,\sin (x)\right )+8 \operatorname{Subst}\left (\int \frac{1}{\sqrt{7-8 x^2}} \, dx,x,\sin (x)\right )-\operatorname{Subst}\left (\int \frac{1}{\sqrt{3-4 x^2}} \, dx,x,\sin (x)\right )+\operatorname{Subst}\left (\int \frac{1}{\sqrt{7-8 x^2} \left (-1+x^2\right )} \, dx,x,\sin (x)\right )+\operatorname{Subst}\left (\int \frac{1}{\sqrt{3-4 x^2} \left (-1+x^2\right )} \, dx,x,\sin (x)\right )\\ &=-\frac{11 \sin ^{-1}\left (2 \sqrt{\frac{2}{7}} \sin (x)\right )}{4 \sqrt{2}}+2 \sqrt{2} \sin ^{-1}\left (2 \sqrt{\frac{2}{7}} \sin (x)\right )+\frac{3}{4} \sin ^{-1}\left (\frac{2 \sin (x)}{\sqrt{3}}\right )-\frac{1}{2} \sin (x) \sqrt{7-8 \sin ^2(x)}-\frac{1}{2} \sin (x) \sqrt{3-4 \sin ^2(x)}-\frac{1}{4} \operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,\frac{\sin (x)}{\sqrt{7-8 \sin ^2(x)}}\right )-\frac{1}{4} \operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,\frac{\sin (x)}{\sqrt{3-4 \sin ^2(x)}}\right )+\operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,\frac{\sin (x)}{\sqrt{7-8 \sin ^2(x)}}\right )+\operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,\frac{\sin (x)}{\sqrt{3-4 \sin ^2(x)}}\right )\\ &=-\frac{11 \sin ^{-1}\left (2 \sqrt{\frac{2}{7}} \sin (x)\right )}{4 \sqrt{2}}+2 \sqrt{2} \sin ^{-1}\left (2 \sqrt{\frac{2}{7}} \sin (x)\right )+\frac{3}{4} \sin ^{-1}\left (\frac{2 \sin (x)}{\sqrt{3}}\right )-\frac{3}{4} \tan ^{-1}\left (\frac{\sin (x)}{\sqrt{7-8 \sin ^2(x)}}\right )-\frac{3}{4} \tan ^{-1}\left (\frac{\sin (x)}{\sqrt{3-4 \sin ^2(x)}}\right )-\frac{1}{2} \sin (x) \sqrt{7-8 \sin ^2(x)}-\frac{1}{2} \sin (x) \sqrt{3-4 \sin ^2(x)}\\ \end{align*}
Mathematica [A] time = 0.344358, size = 156, normalized size = 1.39 \[ \frac{1}{8} \left (5 \sqrt{2} \sin ^{-1}\left (2 \sqrt{\frac{2}{7}} \sin (x)\right )+6 \sin ^{-1}\left (\frac{2 \sin (x)}{\sqrt{3}}\right )-4 \sin (x) \sqrt{2 \cos (2 x)+1}-4 \sin (x) \sqrt{4 \cos (2 x)+3}+3 \tan ^{-1}\left (\frac{7-8 \sin (x)}{\sqrt{4 \cos (2 x)+3}}\right )+3 \tan ^{-1}\left (\frac{3-4 \sin (x)}{\sqrt{2 \cos (2 x)+1}}\right )-3 \tan ^{-1}\left (\frac{4 \sin (x)+3}{\sqrt{2 \cos (2 x)+1}}\right )-3 \tan ^{-1}\left (\frac{8 \sin (x)+7}{\sqrt{4 \cos (2 x)+3}}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 4.062, size = 97512, normalized size = 870.6 \begin{align*} \text{output too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 4.09137, size = 632, normalized size = 5.64 \begin{align*} -\frac{5}{32} \, \sqrt{2} \arctan \left (\frac{{\left (512 \, \sqrt{2} \cos \left (x\right )^{4} - 576 \, \sqrt{2} \cos \left (x\right )^{2} + 113 \, \sqrt{2}\right )} \sqrt{8 \, \cos \left (x\right )^{2} - 1}}{16 \,{\left (128 \, \cos \left (x\right )^{4} - 88 \, \cos \left (x\right )^{2} + 9\right )} \sin \left (x\right )}\right ) - \frac{1}{2} \, \sqrt{8 \, \cos \left (x\right )^{2} - 1} \sin \left (x\right ) - \frac{1}{2} \, \sqrt{4 \, \cos \left (x\right )^{2} - 1} \sin \left (x\right ) + \frac{3}{8} \, \arctan \left (\frac{4 \,{\left (8 \, \cos \left (x\right )^{2} - 5\right )} \sqrt{4 \, \cos \left (x\right )^{2} - 1} \sin \left (x\right ) - 9 \, \cos \left (x\right ) \sin \left (x\right )}{64 \, \cos \left (x\right )^{4} - 71 \, \cos \left (x\right )^{2} + 16}\right ) + \frac{3}{8} \, \arctan \left (\frac{\sin \left (x\right )}{\cos \left (x\right )}\right ) + \frac{3}{8} \, \arctan \left (\frac{9 \, \cos \left (x\right )^{2} - 2}{2 \, \sqrt{8 \, \cos \left (x\right )^{2} - 1} \sin \left (x\right )}\right ) + \frac{3}{4} \, \arctan \left (\frac{\sqrt{4 \, \cos \left (x\right )^{2} - 1}}{\sin \left (x\right )}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cos{\left (3 x \right )}}{\sqrt{- \sin ^{2}{\left (x \right )} + 3 \cos ^{2}{\left (x \right )}} - \sqrt{8 \cos ^{2}{\left (x \right )} - 1}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int -\frac{\cos \left (3 \, x\right )}{\sqrt{8 \, \cos \left (x\right )^{2} - 1} - \sqrt{3 \, \cos \left (x\right )^{2} - \sin \left (x\right )^{2}}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]