Optimal. Leaf size=42 \[ -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)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 42, normalized size of antiderivative = 1.00, 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 = {2725, 2634, 12,
2953, 3060, 2852, 212} \begin {gather*} \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 ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 212
Rule 2634
Rule 2725
Rule 2852
Rule 2953
Rule 3060
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 \text {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] Leaf count is larger than twice the leaf count of optimal. \(87\) vs. \(2(42)=84\).
time = 0.06, size = 87, normalized size = 2.07 \begin {gather*} \frac {2 \left (-\log \left (1+\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )\right )+\log \left (1-\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right )-\cos \left (\frac {x}{2}\right ) (-2+\log (\sin (x)))+(-2+\log (\sin (x))) \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]
[Out]
________________________________________________________________________________________
Mathics [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {cought exception: maximum recursion depth exceeded while calling a Python object} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.04, size = 0, normalized size = 0.00 \[\int \ln \left (\sin \left (x \right )\right ) \sqrt {\sin \left (x \right )+1}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 146 vs.
\(2 (36) = 72\).
time = 0.35, size = 146, normalized size = 3.48 \begin {gather*} -\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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {\sin {\left (x \right )} + 1} \log {\left (\sin {\left (x \right )} \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 94 vs.
\(2 (36) = 72\).
time = 0.02, size = 132, normalized size = 3.14 \begin {gather*} \sqrt {2} \left (8 \left (\frac {-4294967296 \tan \left (\frac {x}{4}\right )+4294967296}{4294967296 \left (\sqrt {2} \left (\tan ^{2}\left (\frac {x}{4}\right )+1\right )\right )}+\frac {\ln \left |\tan \left (\frac {x}{4}\right )+1\right |}{4 \sqrt {2}}-\frac {\ln \left |\tan \left (\frac {x}{4}\right )-1\right |}{4 \sqrt {2}}+\frac {\ln \left |\tan \left (\frac {x}{4}\right )\right |}{4 \sqrt {2}}\right ) \mathrm {sign}\left (\cos \left (-\frac {\pi }{4}+\frac {x}{2}\right )\right )+2 \mathrm {sign}\left (\cos \left (-\frac {\pi }{4}+\frac {x}{2}\right )\right ) \sin \left (-\frac {\pi }{4}+\frac {x}{2}\right ) \ln \left (\sin x\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \ln \left (\sin \left (x\right )\right )\,\sqrt {\sin \left (x\right )+1} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________