(法一)
\[
\begin{split}
\int\csc xdx&=\int\frac{1}{\sin x}dx=\int\frac{\sin x}{\sin^2 x}dx=-\int\frac{d\cos x}{1-\cos^2 x}\\
&\stackrel{t=\cos x}{=}\int\frac{dt}{t^2-1}=\frac{1}{2}\int(\frac{1}{t-1}-\frac{1}{t+1})dt\\
&=\frac{1}{2}\ln\biggl|\frac{t-1}{t+1}\biggr|+C\\
&=\frac{1}{2}\ln\biggl|\frac{1-\cos x}{1+\cos x}\biggr|+C.
\end{split}
\]
(法二)
\[
\begin{split}
\int\csc xdx&=\int\frac{1}{\sin x}dx=\int\frac{dx}{2\sin\frac{x}{2}\cos\frac{x}{2}}\\
&=\frac{1}{2}\int\frac{dx}{\tan\frac{x}{2}\cos^2\frac{x}{2}}=\frac{1}{2}\int\frac{1}{\tan\frac{x}{2}}\cdot\sec^2\frac{x}{2}dx\\
&=\int\frac{1}{\tan\frac{x}{2}}d\tan\frac{x}{2}\\
&\stackrel{t=\tan\frac{x}{2}}{=}\int\frac{1}{t}dt=\ln|t|+C\\
&=\ln\biggl|\tan\frac{x}{2}\biggr|+C.
\end{split}
\]
答案虽然从形式上看不一致, 但其实是相同的. 事实上,
\[
\begin{split}
\frac{1}{2}\ln\biggl|\frac{1-\cos x}{1+\cos x}\biggr|&=\frac{1}{2}\ln\biggl|\frac{(1-\cos x)^2}{1-\cos^2 x}\biggr|\\
&=\ln\biggl|\frac{1-\cos x}{\sin x}\biggr|\\
&=\ln\biggl|\frac{2\sin^2\frac{x}{2}}{2\sin\frac{x}{2}\cos\frac{x}{2}}\biggr|\\
&=\ln\biggl|\tan\frac{x}{2}\biggr|.
\end{split}
\]