求不定积分 $\int\frac{e^{-\frac{x}{2}}(\cos x-\sin x)}{\sqrt{\sin x}}dx$.
\[
\int\frac{e^{-\frac{x}{2}}(\cos x-\sin x)}{\sqrt{\sin x}}dx
\]
[Hint] Note that
\[
(\sqrt{\sin x})'=\frac{\cos x}{2\sqrt{\sin x}}.
\]
\[
\int\frac{e^{-\frac{x}{2}}(\cos x-\sin x)}{\sqrt{\sin x}}dx
\]
[Hint] Note that
\[
(\sqrt{\sin x})'=\frac{\cos x}{2\sqrt{\sin x}}.
\]
1
\[
\begin{split}
\int\frac{e^{-\frac{x}{2}}(\cos x-\sin x)}{\sqrt{\sin x}}dx &=\int e^{-\frac{x}{2}}\frac{\cos x}{\sqrt{\sin x}}dx-\int e^{-\frac{x}{2}}\sqrt{\sin x}dx\\
&=2\int e^{-\frac{x}{2}}d\sqrt{\sin x}-\int e^{-\frac{x}{2}}\sqrt{\sin x}dx\\
&=2\biggl[e^{-\frac{x}{2}}\sqrt{\sin x}-\int\sqrt{\sin x}de^{-\frac{x}{2}}de^{-\frac{x}{2}}\biggr]-\int e^{-\frac{x}{2}}\sqrt{\sin x}dx\\
&=2e^{-\frac{x}{2}}\sqrt{\sin x}-2\int\sqrt{\sin x}e^{-\frac{x}{2}}(-\frac{1}{2})dx-\int e^{-\frac{x}{2}}\sqrt{\sin x}dx+C\\
&=2e^{-\frac{x}{2}}\sqrt{\sin x}+C
\end{split}
\]