Finding an Antiderivative
Calculate \int\!{\frac{1}{1-\sin x}}d x\,.
It is not obvious how to proceed. The trick here is to multiply and divide by 1 + sin x , as follows:
\begin{array}{r l}{\int{\frac{1}{1-\sin x}}d x\ =\ \int\!{\frac{1}{1-\sin x}}{\frac{1+\sin x}{1+\sin x}}d x\ =\ \int\!{\frac{1+\sin x}{1-\sin^{2}x}}d x\,.}\end{array}
We use the fundamental identity sin² x + cos² x = 1 to simplify the denominator to cos² x . Thus we can split up the integral into 2 pieces.
\int{\frac{1}{1-\sin x}}d x= \int{\frac{1+\sin x}{\cos^{2}x}}d x= \int{\frac{1}{\cos^{2}x}}d x+ \int{\frac{\sin x}{\cos^{2}x}}d x
=\int\sec^{2}x\,d x+\int\sec x\tan x\,d x=\tan x+\sec x+C
This answer can also be written as {\frac{-\cos x}{\sin x-1}}+C_{1}. You are asked to show that both answers are correct in the problems below.