3.5.3 \(\int \frac {\cos (x)}{\sqrt {\sin (2 x)}} \, dx\) [403]

Optimal. Leaf size=31 \[ -\frac {1}{2} \sin ^{-1}(\cos (x)-\sin (x))+\frac {1}{2} \log \left (\cos (x)+\sin (x)+\sqrt {\sin (2 x)}\right ) \]

[Out]

-1/2*arcsin(cos(x)-sin(x))+1/2*ln(cos(x)+sin(x)+sin(2*x)^(1/2))

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {4390} \begin {gather*} \frac {1}{2} \log \left (\sin (x)+\sqrt {\sin (2 x)}+\cos (x)\right )-\frac {1}{2} \text {ArcSin}(\cos (x)-\sin (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[x]/Sqrt[Sin[2*x]],x]

[Out]

-1/2*ArcSin[Cos[x] - Sin[x]] + Log[Cos[x] + Sin[x] + Sqrt[Sin[2*x]]]/2

Rule 4390

Int[cos[(a_.) + (b_.)*(x_)]/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[-ArcSin[Cos[a + b*x] - Sin[a + b*
x]]/d, x] + Simp[Log[Cos[a + b*x] + Sin[a + b*x] + Sqrt[Sin[c + d*x]]]/d, x] /; FreeQ[{a, b, c, d}, x] && EqQ[
b*c - a*d, 0] && EqQ[d/b, 2]

Rubi steps

\begin {align*} \int \frac {\cos (x)}{\sqrt {\sin (2 x)}} \, dx &=-\frac {1}{2} \sin ^{-1}(\cos (x)-\sin (x))+\frac {1}{2} \log \left (\cos (x)+\sin (x)+\sqrt {\sin (2 x)}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 29, normalized size = 0.94 \begin {gather*} \frac {1}{2} \left (-\sin ^{-1}(\cos (x)-\sin (x))+\log \left (\cos (x)+\sin (x)+\sqrt {\sin (2 x)}\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[x]/Sqrt[Sin[2*x]],x]

[Out]

(-ArcSin[Cos[x] - Sin[x]] + Log[Cos[x] + Sin[x] + Sqrt[Sin[2*x]]])/2

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 4 vs. order 3.
time = 0.11, size = 98, normalized size = 3.16

method result size
default \(\frac {\sqrt {-\frac {\tan \left (\frac {x}{2}\right )}{\tan ^{2}\left (\frac {x}{2}\right )-1}}\, \left (\tan ^{2}\left (\frac {x}{2}\right )-1\right ) \sqrt {1+\tan \left (\frac {x}{2}\right )}\, \sqrt {-2 \tan \left (\frac {x}{2}\right )+2}\, \sqrt {-\tan \left (\frac {x}{2}\right )}\, \EllipticF \left (\sqrt {1+\tan \left (\frac {x}{2}\right )}, \frac {\sqrt {2}}{2}\right )}{\sqrt {\tan \left (\frac {x}{2}\right ) \left (\tan ^{2}\left (\frac {x}{2}\right )-1\right )}\, \sqrt {\tan ^{3}\left (\frac {x}{2}\right )-\tan \left (\frac {x}{2}\right )}}\) \(98\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)/sin(2*x)^(1/2),x,method=_RETURNVERBOSE)

[Out]

(-tan(1/2*x)/(tan(1/2*x)^2-1))^(1/2)*(tan(1/2*x)^2-1)/(tan(1/2*x)*(tan(1/2*x)^2-1))^(1/2)*(1+tan(1/2*x))^(1/2)
*(-2*tan(1/2*x)+2)^(1/2)*(-tan(1/2*x))^(1/2)/(tan(1/2*x)^3-tan(1/2*x))^(1/2)*EllipticF((1+tan(1/2*x))^(1/2),1/
2*2^(1/2))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/sin(2*x)^(1/2),x, algorithm="maxima")

[Out]

integrate(cos(x)/sqrt(sin(2*x)), x)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 137 vs. \(2 (25) = 50\).
time = 1.48, size = 137, normalized size = 4.42 \begin {gather*} \frac {1}{4} \, \arctan \left (-\frac {\sqrt {2} \sqrt {\cos \left (x\right ) \sin \left (x\right )} {\left (\cos \left (x\right ) - \sin \left (x\right )\right )} + \cos \left (x\right ) \sin \left (x\right )}{\cos \left (x\right )^{2} + 2 \, \cos \left (x\right ) \sin \left (x\right ) - 1}\right ) - \frac {1}{4} \, \arctan \left (-\frac {2 \, \sqrt {2} \sqrt {\cos \left (x\right ) \sin \left (x\right )} - \cos \left (x\right ) - \sin \left (x\right )}{\cos \left (x\right ) - \sin \left (x\right )}\right ) - \frac {1}{8} \, \log \left (-32 \, \cos \left (x\right )^{4} + 4 \, \sqrt {2} {\left (4 \, \cos \left (x\right )^{3} - {\left (4 \, \cos \left (x\right )^{2} + 1\right )} \sin \left (x\right ) - 5 \, \cos \left (x\right )\right )} \sqrt {\cos \left (x\right ) \sin \left (x\right )} + 32 \, \cos \left (x\right )^{2} + 16 \, \cos \left (x\right ) \sin \left (x\right ) + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/sin(2*x)^(1/2),x, algorithm="fricas")

[Out]

1/4*arctan(-(sqrt(2)*sqrt(cos(x)*sin(x))*(cos(x) - sin(x)) + cos(x)*sin(x))/(cos(x)^2 + 2*cos(x)*sin(x) - 1))
- 1/4*arctan(-(2*sqrt(2)*sqrt(cos(x)*sin(x)) - cos(x) - sin(x))/(cos(x) - sin(x))) - 1/8*log(-32*cos(x)^4 + 4*
sqrt(2)*(4*cos(x)^3 - (4*cos(x)^2 + 1)*sin(x) - 5*cos(x))*sqrt(cos(x)*sin(x)) + 32*cos(x)^2 + 16*cos(x)*sin(x)
 + 1)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cos {\left (x \right )}}{\sqrt {\sin {\left (2 x \right )}}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/sin(2*x)**(1/2),x)

[Out]

Integral(cos(x)/sqrt(sin(2*x)), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/sin(2*x)^(1/2),x, algorithm="giac")

[Out]

integrate(cos(x)/sqrt(sin(2*x)), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int \frac {\cos \left (x\right )}{\sqrt {\sin \left (2\,x\right )}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)/sin(2*x)^(1/2),x)

[Out]

int(cos(x)/sin(2*x)^(1/2), x)

________________________________________________________________________________________