3.3.35 \(\int \sqrt {1+\sin (x)} \, dx\) [235]

Optimal. Leaf size=12 \[ -\frac {2 \cos (x)}{\sqrt {1+\sin (x)}} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {2725} \begin {gather*} -\frac {2 \cos (x)}{\sqrt {\sin (x)+1}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[1 + Sin[x]],x]

[Out]

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

Rule 2725

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(40\) vs. \(2(12)=24\).
time = 0.01, size = 40, normalized size = 3.33 \begin {gather*} \frac {2 \left (-\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right ) \sqrt {1+\sin (x)}}{\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[1 + Sin[x]],x]

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.06, size = 17, normalized size = 1.42

method result size
default \(\frac {2 \left (\sin \left (x \right )-1\right ) \sqrt {\sin \left (x \right )+1}}{\cos \left (x \right )}\) \(17\)
risch \(-\frac {i \sqrt {2}\, \sqrt {2+2 \sin \left (x \right )}\, \left ({\mathrm e}^{i x}-i\right ) \left ({\mathrm e}^{i x}+i\right )}{{\mathrm e}^{2 i x}+2 i {\mathrm e}^{i x}-1}\) \(48\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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((1+sin(x))^(1/2),x, algorithm="maxima")

[Out]

integrate(sqrt(sin(x) + 1), x)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 24 vs. \(2 (10) = 20\).
time = 1.11, size = 24, normalized size = 2.00 \begin {gather*} -\frac {2 \, {\left (\cos \left (x\right ) - \sin \left (x\right ) + 1\right )} \sqrt {\sin \left (x\right ) + 1}}{\cos \left (x\right ) + \sin \left (x\right ) + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(sqrt(sin(x) + 1), x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 22 vs. \(2 (10) = 20\).
time = 0.45, size = 22, normalized size = 1.83 \begin {gather*} 2 \, \sqrt {2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, x\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.14, size = 16, normalized size = 1.33 \begin {gather*} \frac {2\,\left (\sin \left (x\right )-1\right )\,\sqrt {\sin \left (x\right )+1}}{\cos \left (x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________