Optimal. Leaf size=19 \[ 2 \tanh ^{-1}\left (\frac {\sin (x)}{\sqrt {\sin ^2(x)+2 \sin (x)}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {3258, 620, 206} \[ 2 \tanh ^{-1}\left (\frac {\sin (x)}{\sqrt {\sin ^2(x)+2 \sin (x)}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 620
Rule 3258
Rubi steps
\begin {align*} \int \frac {\cos (x)}{\sqrt {2 \sin (x)+\sin ^2(x)}} \, dx &=\operatorname {Subst}\left (\int \frac {1}{\sqrt {2 x+x^2}} \, dx,x,\sin (x)\right )\\ &=2 \operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {\sin (x)}{\sqrt {2 \sin (x)+\sin ^2(x)}}\right )\\ &=2 \tanh ^{-1}\left (\frac {\sin (x)}{\sqrt {2 \sin (x)+\sin ^2(x)}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.02, size = 40, normalized size = 2.11 \[ \frac {2 \sqrt {\sin (x)} \sqrt {\sin (x)+2} \sinh ^{-1}\left (\frac {\sqrt {\sin (x)}}{\sqrt {2}}\right )}{\sqrt {\sin (x) (\sin (x)+2)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 2.96, size = 35, normalized size = 1.84 \[ \frac {1}{2} \, \log \left (-2 \, \cos \relax (x)^{2} + 2 \, \sqrt {-\cos \relax (x)^{2} + 2 \, \sin \relax (x) + 1} {\left (\sin \relax (x) + 1\right )} + 4 \, \sin \relax (x) + 3\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 20, normalized size = 1.05 \[ -\log \left (-\sqrt {\sin \relax (x)^{2} + 2 \, \sin \relax (x)} + \sin \relax (x) + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.10, size = 17, normalized size = 0.89 \[ \ln \left (\sin \relax (x )+1+\sqrt {2 \sin \relax (x )+\sin ^{2}\relax (x )}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.31, size = 20, normalized size = 1.05 \[ \log \left (2 \, \sqrt {\sin \relax (x)^{2} + 2 \, \sin \relax (x)} + 2 \, \sin \relax (x) + 2\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.17, size = 14, normalized size = 0.74 \[ \ln \left (\sin \relax (x)+\sqrt {\sin \relax (x)\,\left (\sin \relax (x)+2\right )}+1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos {\relax (x )}}{\sqrt {\left (\sin {\relax (x )} + 2\right ) \sin {\relax (x )}}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________