3.41 \(\int \log (\sin (x)) \sqrt{1+\sin (x)} \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.153184, antiderivative size = 42, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 7, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.583, Rules used = {2646, 2554, 12, 2874, 2981, 2773, 206} \[ \frac{4 \cos (x)}{\sqrt{\sin (x)+1}}-\frac{2 \cos (x) \log (\sin (x))}{\sqrt{\sin (x)+1}}-4 \tanh ^{-1}\left (\frac{\cos (x)}{\sqrt{\sin (x)+1}}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2646

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]

Rule 2554

Int[Log[u_]*(v_), x_Symbol] :> With[{w = IntHide[v, x]}, Dist[Log[u], w, x] - Int[SimplifyIntegrand[(w*D[u, x]
)/u, x], x] /; InverseFunctionFreeQ[w, x]] /; InverseFunctionFreeQ[u, x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2874

Int[cos[(e_.) + (f_.)*(x_)]^2*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)
, x_Symbol] :> Dist[1/b^2, Int[(d*Sin[e + f*x])^n*(a + b*Sin[e + f*x])^(m + 1)*(a - b*Sin[e + f*x]), x], x] /;
 FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 - b^2, 0] && (ILtQ[m, 0] ||  !IGtQ[n, 0])

Rule 2981

Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.
) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(-2*b*B*Cos[e + f*x]*(c + d*Sin[e + f*x])^(n + 1))/(d*f*(2*n + 3)*Sqr
t[a + b*Sin[e + f*x]]), x] + Dist[(A*b*d*(2*n + 3) - B*(b*c - 2*a*d*(n + 1)))/(b*d*(2*n + 3)), Int[Sqrt[a + b*
Sin[e + f*x]]*(c + d*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] &&
EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] &&  !LtQ[n, -1]

Rule 2773

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

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

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

Mathematica [B]  time = 0.0837142, size = 87, normalized size = 2.07 \[ \frac{2 \sqrt{\sin (x)+1} \left (\sin \left (\frac{x}{2}\right ) (\log (\sin (x))-2)-\log \left (-\sin \left (\frac{x}{2}\right )+\cos \left (\frac{x}{2}\right )+1\right )+\log \left (\sin \left (\frac{x}{2}\right )-\cos \left (\frac{x}{2}\right )+1\right )-\cos \left (\frac{x}{2}\right ) (\log (\sin (x))-2)\right )}{\sin \left (\frac{x}{2}\right )+\cos \left (\frac{x}{2}\right )} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [F]  time = 0.13, size = 0, normalized size = 0. \begin{align*} \int \ln \left ( \sin \left ( x \right ) \right ) \sqrt{1+\sin \left ( x \right ) }\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{\sin \left (x\right ) + 1} \log \left (\sin \left (x\right )\right )\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 2.19592, size = 539, normalized size = 12.83 \begin{align*} -\frac{{\left (\cos \left (x\right ) + \sin \left (x\right ) + 1\right )} \log \left (\frac{\cos \left (x\right )^{2} -{\left (\cos \left (x\right ) - 1\right )} \sin \left (x\right ) + 2 \,{\left (\cos \left (x\right ) - \sin \left (x\right ) + 1\right )} \sqrt{\sin \left (x\right ) + 1} + 2 \, \cos \left (x\right ) + 1}{2 \,{\left (\cos \left (x\right ) + \sin \left (x\right ) + 1\right )}}\right ) -{\left (\cos \left (x\right ) + \sin \left (x\right ) + 1\right )} \log \left (\frac{\cos \left (x\right )^{2} -{\left (\cos \left (x\right ) - 1\right )} \sin \left (x\right ) - 2 \,{\left (\cos \left (x\right ) - \sin \left (x\right ) + 1\right )} \sqrt{\sin \left (x\right ) + 1} + 2 \, \cos \left (x\right ) + 1}{2 \,{\left (\cos \left (x\right ) + \sin \left (x\right ) + 1\right )}}\right ) + 2 \,{\left ({\left (\cos \left (x\right ) - \sin \left (x\right ) + 1\right )} \log \left (\sin \left (x\right )\right ) - 2 \, \cos \left (x\right ) + 2 \, \sin \left (x\right ) - 2\right )} \sqrt{\sin \left (x\right ) + 1}}{\cos \left (x\right ) + \sin \left (x\right ) + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B]  time = 1.66612, size = 2256, normalized size = 53.71 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(pi*sgn(2*tan(1/4*x)^4 - 12*tan(1/4*x)^2 + 2)*sgn(8*tan(1/4*x)^3 - 8*tan(1/4*x))*tan(1/2*x)^2*tan(1/4*x)^2 -
pi*sgn(2*tan(1/4*x)^4 - 12*tan(1/4*x)^2 + 2)*sgn(8*tan(1/4*x)^3 - 8*tan(1/4*x))*tan(1/2*x)*tan(1/4*x)^2 - pi*s
gn(8*tan(1/4*x)^7 - 56*tan(1/4*x)^5 + 56*tan(1/4*x)^3 - 8*tan(1/4*x))*tan(1/2*x)^2*tan(1/4*x)^2 - pi*sgn(8*tan
(1/4*x)^3 - 8*tan(1/4*x))*tan(1/2*x)^2*tan(1/4*x)^2 - pi*sgn(2*tan(1/4*x)^4 - 12*tan(1/4*x)^2 + 2)*sgn(8*tan(1
/4*x)^3 - 8*tan(1/4*x))*tan(1/2*x)^2 + 2*pi*sgn(2*tan(1/4*x)^4 - 12*tan(1/4*x)^2 + 2)*sgn(8*tan(1/4*x)^3 - 8*t
an(1/4*x))*tan(1/2*x)*tan(1/4*x) + pi*sgn(8*tan(1/4*x)^7 - 56*tan(1/4*x)^5 + 56*tan(1/4*x)^3 - 8*tan(1/4*x))*t
an(1/2*x)*tan(1/4*x)^2 + pi*sgn(8*tan(1/4*x)^3 - 8*tan(1/4*x))*tan(1/2*x)*tan(1/4*x)^2 - pi*tan(1/2*x)^2*tan(1
/4*x)^2 - log(8*(tan(1/4*x)^4 + 2*tan(1/4*x)^3 + tan(1/4*x)^2)/(tan(1/4*x)^4 + 2*tan(1/4*x)^2 + 1))*tan(1/2*x)
^2*tan(1/4*x)^2 + log(8*(tan(1/4*x)^2 - 2*tan(1/4*x) + 1)/(tan(1/4*x)^4 + 2*tan(1/4*x)^2 + 1))*tan(1/2*x)^2*ta
n(1/4*x)^2 + pi*sgn(2*tan(1/4*x)^4 - 12*tan(1/4*x)^2 + 2)*sgn(8*tan(1/4*x)^3 - 8*tan(1/4*x))*tan(1/2*x) + pi*s
gn(8*tan(1/4*x)^7 - 56*tan(1/4*x)^5 + 56*tan(1/4*x)^3 - 8*tan(1/4*x))*tan(1/2*x)^2 + pi*sgn(8*tan(1/4*x)^3 - 8
*tan(1/4*x))*tan(1/2*x)^2 - 2*pi*sgn(2*tan(1/4*x)^4 - 12*tan(1/4*x)^2 + 2)*sgn(8*tan(1/4*x)^3 - 8*tan(1/4*x))*
tan(1/4*x) - 2*pi*sgn(8*tan(1/4*x)^7 - 56*tan(1/4*x)^5 + 56*tan(1/4*x)^3 - 8*tan(1/4*x))*tan(1/2*x)*tan(1/4*x)
 - 2*pi*sgn(8*tan(1/4*x)^3 - 8*tan(1/4*x))*tan(1/2*x)*tan(1/4*x) + 4*log(2)*tan(1/2*x)^2*tan(1/4*x) - 2*log(64
*(tan(1/4*x)^6 - 2*tan(1/4*x)^4 + tan(1/4*x)^2)/(tan(1/4*x)^8 + 4*tan(1/4*x)^6 + 6*tan(1/4*x)^4 + 4*tan(1/4*x)
^2 + 1))*tan(1/2*x)^2*tan(1/4*x) + pi*tan(1/2*x)*tan(1/4*x)^2 - 2*log(2)*tan(1/2*x)*tan(1/4*x)^2 + log(64*(tan
(1/4*x)^6 - 2*tan(1/4*x)^4 + tan(1/4*x)^2)/(tan(1/4*x)^8 + 4*tan(1/4*x)^6 + 6*tan(1/4*x)^4 + 4*tan(1/4*x)^2 +
1))*tan(1/2*x)*tan(1/4*x)^2 + 8*tan(1/2*x)^2*tan(1/4*x)^2 - pi*sgn(8*tan(1/4*x)^7 - 56*tan(1/4*x)^5 + 56*tan(1
/4*x)^3 - 8*tan(1/4*x))*tan(1/2*x) - pi*sgn(8*tan(1/4*x)^3 - 8*tan(1/4*x))*tan(1/2*x) + pi*tan(1/2*x)^2 - log(
8*(tan(1/4*x)^4 + 2*tan(1/4*x)^3 + tan(1/4*x)^2)/(tan(1/4*x)^4 + 2*tan(1/4*x)^2 + 1))*tan(1/2*x)^2 + log(8*(ta
n(1/4*x)^2 - 2*tan(1/4*x) + 1)/(tan(1/4*x)^4 + 2*tan(1/4*x)^2 + 1))*tan(1/2*x)^2 + 2*pi*sgn(8*tan(1/4*x)^7 - 5
6*tan(1/4*x)^5 + 56*tan(1/4*x)^3 - 8*tan(1/4*x))*tan(1/4*x) + 2*pi*sgn(8*tan(1/4*x)^3 - 8*tan(1/4*x))*tan(1/4*
x) - 2*pi*tan(1/2*x)*tan(1/4*x) - 4*log(2)*tan(1/2*x)*tan(1/4*x) + 2*log(64*(tan(1/4*x)^6 - 2*tan(1/4*x)^4 + t
an(1/4*x)^2)/(tan(1/4*x)^8 + 4*tan(1/4*x)^6 + 6*tan(1/4*x)^4 + 4*tan(1/4*x)^2 + 1))*tan(1/2*x)*tan(1/4*x) + 8*
tan(1/2*x)^2*tan(1/4*x) + 2*log(2)*tan(1/4*x)^2 - log(64*(tan(1/4*x)^6 - 2*tan(1/4*x)^4 + tan(1/4*x)^2)/(tan(1
/4*x)^8 + 4*tan(1/4*x)^6 + 6*tan(1/4*x)^4 + 4*tan(1/4*x)^2 + 1))*tan(1/4*x)^2 - log(8*(tan(1/4*x)^4 + 2*tan(1/
4*x)^3 + tan(1/4*x)^2)/(tan(1/4*x)^4 + 2*tan(1/4*x)^2 + 1))*tan(1/4*x)^2 + log(8*(tan(1/4*x)^2 - 2*tan(1/4*x)
+ 1)/(tan(1/4*x)^4 + 2*tan(1/4*x)^2 + 1))*tan(1/4*x)^2 + 4*tan(1/2*x)*tan(1/4*x)^2 - pi*tan(1/2*x) + 2*log(2)*
tan(1/2*x) - log(64*(tan(1/4*x)^6 - 2*tan(1/4*x)^4 + tan(1/4*x)^2)/(tan(1/4*x)^8 + 4*tan(1/4*x)^6 + 6*tan(1/4*
x)^4 + 4*tan(1/4*x)^2 + 1))*tan(1/2*x) - 8*tan(1/2*x)^2 + 2*pi*tan(1/4*x) + 8*tan(1/2*x)*tan(1/4*x) + 4*tan(1/
4*x)^2 - 2*log(2) + log(64*(tan(1/4*x)^6 - 2*tan(1/4*x)^4 + tan(1/4*x)^2)/(tan(1/4*x)^8 + 4*tan(1/4*x)^6 + 6*t
an(1/4*x)^4 + 4*tan(1/4*x)^2 + 1)) - log(8*(tan(1/4*x)^4 + 2*tan(1/4*x)^3 + tan(1/4*x)^2)/(tan(1/4*x)^4 + 2*ta
n(1/4*x)^2 + 1)) + log(8*(tan(1/4*x)^2 - 2*tan(1/4*x) + 1)/(tan(1/4*x)^4 + 2*tan(1/4*x)^2 + 1)) - 4*tan(1/2*x)
 + 16*tan(1/4*x) - 4)/(tan(1/2*x)^2*tan(1/4*x)^2 + tan(1/2*x)^2 + tan(1/4*x)^2 + 1)