# 积分运算去根号的方式之一：三角函数凑平方去根号

## 一、题目

$$I=\int_{0}^{\pi} \sqrt{1-\sin x} \mathrm{~d} x=?$$

## 二、解析

$$\sin 2 \alpha=2 \sin \alpha \cos \alpha \Rightarrow$$

\begin{aligned} (\sin \alpha-\cos \alpha)^{2} & = \sin ^{2} \alpha+\cos ^{2} \alpha-2 \sin \alpha \cos \alpha \\ & = 1 – \sin 2 \alpha \end{aligned}

\begin{aligned} I & = \int_{0}^{\pi} \sqrt{1-\sin x} \mathrm{~d} x \\ & = \int_{0}^{\pi} \sqrt{\left(\sin \frac{x}{2}-\cos \frac{x}{2}\right)^{2}} \mathrm{~d} x \\ & = \int_{0}^{\pi}\left|\sin \frac{x}{2}-\cos \frac{x}{2}\right| \mathrm{~d} x \end{aligned}

\begin{aligned} & \left\{\begin{array}{ll}\cos x>\sin x, & x \in\left(0, \frac{\pi}{4}\right) \\ \sin x>\cos x, & x \in\left(\frac{\pi}{4}, \frac{\pi}{2}\right) \end{array} \Rightarrow \right. \\ \\ & \left\{\begin{array}{ll}\cos \frac{x}{2}>\sin \frac{x}{2}, & \frac{x}{2} \in\left(0, \frac{\pi}{4}\right) \\ \sin \frac{x}{2}>\cos \frac{x}{2}, & \frac{x}{2} \in\left(\frac{\pi}{4}, \frac{\pi}{2}\right)\end{array} \Rightarrow \right. \\ \\ & \left\{\begin{array}{ll}\cos \frac{x}{2}>\sin \frac{x}{2}, & x \in\left(0, \frac{\pi}{2}\right) \\ \sin \frac{x}{2}>\cos \frac{x}{2}, & x \in\left(\frac{\pi}{2}, \pi\right) \end{array}\right. \end{aligned}

\begin{aligned} I & = \int_{0}^{\frac{\pi}{2}} \left(\cos \frac{x}{2}-\sin \frac{x}{2}\right) \mathrm{~d} x+\int_{\frac{\pi}{2}}^{\pi}\left(\sin \frac{x}{2}-\cos \frac{x}{2}\right) \mathrm{~d} x \\ & = 2 \int_{0}^{\frac{\pi}{2}} \cos \frac{x}{2} \mathrm{~d} \left( \frac{x}{2} \right) – 2 \int_{0}^{\frac{\pi}{2}} \sin \frac{x}{2} \mathrm{~d} \left(\frac{x}{2}\right) \\ & + 2 \int_{ \frac{\pi}{2} }^{ \pi } \sin \frac{x}{2} \mathrm{~d} \left(\frac{x}{2}\right) – 2 \int_{\frac{\pi}{2}}^{\pi} \cos \frac{x}{2} \mathrm{~d} \left(\frac{x}{2}\right) \\ & = 2\left[\left.\sin \frac{x}{2}\right|_{0} ^{\frac{\pi}{2}}+\left.\cos \frac{x}{2}\right|_{0} ^{\frac{\pi}{2}}-\left.\cos \frac{\pi}{2}\right|_{\frac{\pi}{2}} ^{\pi}\right. \left.-\left.\sin \frac{x}{2}\right|_{\frac{\pi}{2}} ^{\pi}\right] \\ & = 2\left[\frac{\sqrt{2}}{2}-0+\frac{\sqrt{2}}{2}-1+\frac{\sqrt{2}}{2}-1+\frac{\sqrt{2}}{2}\right] \\ & = 4 \sqrt{2}-4 \end{aligned}