\(\int \frac {\cos (x) \sin (x)}{\sqrt {1+\sin (x)}} \, dx\) [813]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 13, antiderivative size = 23 \[ \int \frac {\cos (x) \sin (x)}{\sqrt {1+\sin (x)}} \, dx=-2 \sqrt {1+\sin (x)}+\frac {2}{3} (1+\sin (x))^{3/2} \]

[Out]

2/3*(1+sin(x))^(3/2)-2*(1+sin(x))^(1/2)

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {2912, 45} \[ \int \frac {\cos (x) \sin (x)}{\sqrt {1+\sin (x)}} \, dx=\frac {2}{3} (\sin (x)+1)^{3/2}-2 \sqrt {\sin (x)+1} \]

[In]

Int[(Cos[x]*Sin[x])/Sqrt[1 + Sin[x]],x]

[Out]

-2*Sqrt[1 + Sin[x]] + (2*(1 + Sin[x])^(3/2))/3

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2912

Int[cos[(e_.) + (f_.)*(x_)]*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)
])^(n_.), x_Symbol] :> Dist[1/(b*f), Subst[Int[(a + x)^m*(c + (d/b)*x)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[
{a, b, c, d, e, f, m, n}, x]

Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \frac {x}{\sqrt {1+x}} \, dx,x,\sin (x)\right ) \\ & = \text {Subst}\left (\int \left (-\frac {1}{\sqrt {1+x}}+\sqrt {1+x}\right ) \, dx,x,\sin (x)\right ) \\ & = -2 \sqrt {1+\sin (x)}+\frac {2}{3} (1+\sin (x))^{3/2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.35 \[ \int \frac {\cos (x) \sin (x)}{\sqrt {1+\sin (x)}} \, dx=\frac {2 \left (\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right )^2 (-2+\sin (x))}{3 \sqrt {1+\sin (x)}} \]

[In]

Integrate[(Cos[x]*Sin[x])/Sqrt[1 + Sin[x]],x]

[Out]

(2*(Cos[x/2] + Sin[x/2])^2*(-2 + Sin[x]))/(3*Sqrt[1 + Sin[x]])

Maple [A] (verified)

Time = 0.64 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.78

method result size
derivativedivides \(\frac {2 \left (1+\sin \left (x \right )\right )^{\frac {3}{2}}}{3}-2 \sqrt {1+\sin \left (x \right )}\) \(18\)
default \(\frac {2 \left (1+\sin \left (x \right )\right )^{\frac {3}{2}}}{3}-2 \sqrt {1+\sin \left (x \right )}\) \(18\)

[In]

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

[Out]

2/3*(1+sin(x))^(3/2)-2*(1+sin(x))^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.52 \[ \int \frac {\cos (x) \sin (x)}{\sqrt {1+\sin (x)}} \, dx=\frac {2}{3} \, \sqrt {\sin \left (x\right ) + 1} {\left (\sin \left (x\right ) - 2\right )} \]

[In]

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

[Out]

2/3*sqrt(sin(x) + 1)*(sin(x) - 2)

Sympy [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.13 \[ \int \frac {\cos (x) \sin (x)}{\sqrt {1+\sin (x)}} \, dx=\frac {2 \sqrt {\sin {\left (x \right )} + 1} \sin {\left (x \right )}}{3} - \frac {4 \sqrt {\sin {\left (x \right )} + 1}}{3} \]

[In]

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

[Out]

2*sqrt(sin(x) + 1)*sin(x)/3 - 4*sqrt(sin(x) + 1)/3

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.74 \[ \int \frac {\cos (x) \sin (x)}{\sqrt {1+\sin (x)}} \, dx=\frac {2}{3} \, {\left (\sin \left (x\right ) + 1\right )}^{\frac {3}{2}} - 2 \, \sqrt {\sin \left (x\right ) + 1} \]

[In]

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

[Out]

2/3*(sin(x) + 1)^(3/2) - 2*sqrt(sin(x) + 1)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 42 vs. \(2 (17) = 34\).

Time = 0.30 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.83 \[ \int \frac {\cos (x) \sin (x)}{\sqrt {1+\sin (x)}} \, dx=\frac {2 \, {\left (2 \, \sqrt {2} \cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, x\right )^{3} - 3 \, \sqrt {2} \cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, x\right )\right )}}{3 \, \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, x\right )\right )} \]

[In]

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

[Out]

2/3*(2*sqrt(2)*cos(-1/4*pi + 1/2*x)^3 - 3*sqrt(2)*cos(-1/4*pi + 1/2*x))/sgn(cos(-1/4*pi + 1/2*x))

Mupad [B] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.52 \[ \int \frac {\cos (x) \sin (x)}{\sqrt {1+\sin (x)}} \, dx=\frac {2\,\sqrt {\sin \left (x\right )+1}\,\left (\sin \left (x\right )-2\right )}{3} \]

[In]

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

[Out]

(2*(sin(x) + 1)^(1/2)*(sin(x) - 2))/3