Optimal. Leaf size=48 \[ \frac{x}{\sqrt{2}}+\frac{\tan ^{-1}\left (\frac{\sin (3 x+2) \cos (3 x+2)}{\sin ^2(3 x+2)+\sqrt{2}+1}\right )}{3 \sqrt{2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0255043, antiderivative size = 48, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.048, Rules used = {203} \[ \frac{x}{\sqrt{2}}+\frac{\tan ^{-1}\left (\frac{\sin (3 x+2) \cos (3 x+2)}{\sin ^2(3 x+2)+\sqrt{2}+1}\right )}{3 \sqrt{2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rubi steps
\begin{align*} \int \frac{1}{\cos ^2(2+3 x)+2 \sin ^2(2+3 x)} \, dx &=\frac{1}{3} \operatorname{Subst}\left (\int \frac{1}{1+2 x^2} \, dx,x,\tan (2+3 x)\right )\\ &=\frac{x}{\sqrt{2}}+\frac{\tan ^{-1}\left (\frac{\cos (2+3 x) \sin (2+3 x)}{1+\sqrt{2}+\sin ^2(2+3 x)}\right )}{3 \sqrt{2}}\\ \end{align*}
Mathematica [A] time = 0.024852, size = 22, normalized size = 0.46 \[ \frac{\tan ^{-1}\left (\sqrt{2} \tan (3 x+2)\right )}{3 \sqrt{2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.04, size = 17, normalized size = 0.4 \begin{align*}{\frac{\sqrt{2}\arctan \left ( \tan \left ( 2+3\,x \right ) \sqrt{2} \right ) }{6}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.67127, size = 22, normalized size = 0.46 \begin{align*} \frac{1}{6} \, \sqrt{2} \arctan \left (\sqrt{2} \tan \left (3 \, x + 2\right )\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.46917, size = 127, normalized size = 2.65 \begin{align*} -\frac{1}{12} \, \sqrt{2} \arctan \left (\frac{3 \, \sqrt{2} \cos \left (3 \, x + 2\right )^{2} - 2 \, \sqrt{2}}{4 \, \cos \left (3 \, x + 2\right ) \sin \left (3 \, x + 2\right )}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 9.4536, size = 343, normalized size = 7.15 \begin{align*} \frac{2 \sqrt{2} \left (\operatorname{atan}{\left (\frac{\tan{\left (\frac{3 x}{2} + 1 \right )}}{\sqrt{3 - 2 \sqrt{2}}} \right )} + \pi \left \lfloor{\frac{\frac{3 x}{2} - \frac{\pi }{2} + 1}{\pi }}\right \rfloor \right )}{21 \sqrt{2} \sqrt{3 - 2 \sqrt{2}} + 30 \sqrt{3 - 2 \sqrt{2}}} + \frac{3 \left (\operatorname{atan}{\left (\frac{\tan{\left (\frac{3 x}{2} + 1 \right )}}{\sqrt{3 - 2 \sqrt{2}}} \right )} + \pi \left \lfloor{\frac{\frac{3 x}{2} - \frac{\pi }{2} + 1}{\pi }}\right \rfloor \right )}{21 \sqrt{2} \sqrt{3 - 2 \sqrt{2}} + 30 \sqrt{3 - 2 \sqrt{2}}} + \frac{2 \sqrt{2} \sqrt{3 - 2 \sqrt{2}} \sqrt{2 \sqrt{2} + 3} \left (\operatorname{atan}{\left (\frac{\tan{\left (\frac{3 x}{2} + 1 \right )}}{\sqrt{2 \sqrt{2} + 3}} \right )} + \pi \left \lfloor{\frac{\frac{3 x}{2} - \frac{\pi }{2} + 1}{\pi }}\right \rfloor \right )}{21 \sqrt{2} \sqrt{3 - 2 \sqrt{2}} + 30 \sqrt{3 - 2 \sqrt{2}}} + \frac{3 \sqrt{3 - 2 \sqrt{2}} \sqrt{2 \sqrt{2} + 3} \left (\operatorname{atan}{\left (\frac{\tan{\left (\frac{3 x}{2} + 1 \right )}}{\sqrt{2 \sqrt{2} + 3}} \right )} + \pi \left \lfloor{\frac{\frac{3 x}{2} - \frac{\pi }{2} + 1}{\pi }}\right \rfloor \right )}{21 \sqrt{2} \sqrt{3 - 2 \sqrt{2}} + 30 \sqrt{3 - 2 \sqrt{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.09728, size = 77, normalized size = 1.6 \begin{align*} \frac{1}{6} \, \sqrt{2}{\left (3 \, x + \arctan \left (-\frac{\sqrt{2} \sin \left (6 \, x + 4\right ) - 2 \, \sin \left (6 \, x + 4\right )}{\sqrt{2} \cos \left (6 \, x + 4\right ) + \sqrt{2} - 2 \, \cos \left (6 \, x + 4\right ) + 2}\right ) + 2\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]