# 殊途同归：用两种不同的分部积分方法计算同一道题

## 二、解析

### 解法一

\begin{aligned} I \\ \\ & = \int \frac{\sin ^{2} x}{\left( x \cos x – \sin x \right) ^{2}} \mathrm{~d} x \\ \\ & = \int \frac{\frac{\sin ^{2} x}{\cos ^{2} x}}{\left( \frac{x \cos x – \sin x}{\cos x} \right) ^{2}} \mathrm{~d} x \\ \\ & = \int \frac{\frac{\sin ^{2} x + \cos ^{2} x – \cos ^{2} x}{\cos ^{2} x}}{\left( x – \tan x \right) ^{2}} \mathrm{~d} x \\ \\ & = \int \frac{\frac{1}{\cos ^{2} x} – 1}{\left( x – \tan x \right) ^{2}} \mathrm{~d} x \end{aligned}

$$\textcolor{pink}{ \left( \frac{1}{x – \tan x} \right) ^{\prime} = \frac{- (1 – \frac{1}{\cos ^{2} x})}{(x – \tan x) ^{2}} = \frac{\frac{1}{\cos ^{2} x} – 1}{(x – \tan x) ^{2}} }$$

\begin{aligned} I \\ \\ & = \int \frac{\frac{1}{\cos ^{2} x} – 1}{\left( x – \tan x \right) ^{2}} \mathrm{~d} x \\ \\ & = \int \mathrm{~d} \left( \frac{1}{x – \tan x} \right) \\ \\ & = \textcolor{springgreen}{\boldsymbol{ \frac{1}{x – \tan x} + C }} \end{aligned}

### 解法二

\textcolor{pink}{ \begin{aligned} \left( \frac{1}{x \cos x – \sin x} \right) ^{\prime} \\ \\ & = \frac{-(\cos x – x \sin x – \cos x)}{(x \cos x – \sin x) ^{2}} \\ \\ & = \frac{x \sin x}{(x \cos x – \sin x) ^{2}} \end{aligned} }

\begin{aligned} I \\ \\ & = \int \frac{\sin ^{2} x}{\left( x \cos x – \sin x \right) ^{2}} \mathrm{~d} x \\ \\ & = \int \frac{\sin x}{x} \mathrm{~d} \left( \frac{1}{x \cos x – \sin x} \right) \\ \\ & = \frac{\sin x}{x} \times \frac{1}{x \cos x – \sin x} – \int \frac{1}{x \cos x – \sin x} \mathrm{~d} \left( \frac{\sin x}{x} \right) \end{aligned}

$$\textcolor{pink}{ \left( \frac{\sin x}{x} \right) ^{\prime} = \frac{x \cos x – \sin x}{x ^{2}} }$$

\begin{aligned} I \\ \\ & = \frac{\sin x}{x} \times \frac{1}{x \cos x – \sin x} – \int \frac{1}{x ^{2}} \mathrm{~d} x \\ \\ & = \frac{\sin x}{x} \times \frac{1}{x \cos x – \sin x} + \frac{1}{x} + C \\ \\ & = \frac{1}{x} \left( \frac{\tan x}{x – \tan x} + 1 \right) + C \\ \\ & = \frac{1}{x} \left( \frac{\tan x + x – \tan x}{x – \tan x} \right) + C \\ \\ & = \textcolor{springgreen}{\boldsymbol{ \frac{1}{x – \tan x} + C }} \end{aligned}