Posted on

# 如何用半角代换（万能代换）求积分？

$\cos\frac{x}{2}=\frac{1}{\sqrt{1+u^2}},\quad \sin\frac{x}{2}=\frac{u}{\sqrt{1+u^2}}$

$\sin x=\sin(2\cdot\frac{x}{2})=2\sin\frac{x}{2}\cos\frac{x}{2}= \frac{u}{\sqrt{1+u^2}} \cdot \frac{1}{\sqrt{1+u^2}} =\frac{u}{1+u^2}$

$\cos x=\cos (2\cdot\frac{x}{2})=\cos^2\frac{x}{2}-\sin^2\frac{x}{2}=\frac{1}{1+u^2}-\frac{u^2}{1+u^2}=\frac{1-u^2}{1+u^2}$

$\sin x=\frac{u}{1+u^2},\quad \cos x=\frac{1-u^2}{1+u^2},\quad dx=\frac{2}{1+u^2}du$

$\int\frac{dx}{3\sin x-4\cos x}$

\begin{align*} \int\frac{dx}{3\sin x-4\cos x} &= \int\frac{1}{3 \frac{u}{1+u^2} -4 \frac{1-u^2}{1+u^2} }\cdot \frac{2}{1+u^2}du \\ &=2\int\frac{1}{6u-4+4u^2}du=\int\frac{1}{ 2u^2+3y-2 }du\\ &=\int\frac{1}{(2u-1)(u+2)}du\end{align*}

$\frac{1}{(2u-1)(u+2)} =\frac{2}{5}\cdot\frac{1}{2u-1}-\frac{1}{5}\cdot\frac{1}{ u+2 }$

\begin{align*} \int\frac{dx}{3\sin x-4\cos x} &= \frac{2}{5}\int\frac{1}{2u-1}du-\frac{1}{5}\int\frac{1}{ u+2 }du \\ &= \frac{1}{5} \ln|2u-1|-\frac{1}{5}\ln|u+1|+C \\&= \frac{1}{5}\ln\left|\frac{2u-1}{u+1}\right|+C \\ &=\frac{1}{5} \ln\left|\frac{2\tan\frac{x}{2}-1}{\tan\frac{x}{2}+1}\right|+C \end{align*}

\begin{align*} \int\frac{dx}{\sin x+\tan x} &= \int\frac{1}{\frac{u}{1+u^2}+\frac{u}{1-u^2}}\cdot\frac{2}{1+u^2}du\\ &=\int\frac{1-u^2}{2u}du=\frac{1}{2}\ln|u|-\frac{1}{4}u^2+C\\ &=\frac{1}{2}\ln\left|\tan\frac{x}{2}\right|-\frac{1}{4}\tan^2\frac{x}{2}+C\end{align*}