Integral of $$\sec x$$

 

Evaluate the integral $\int \sec x \; dx$
Use $$\sec x = \dfrac{1}{\cos x}$$ to rewrite the integral as
$\int \sec x \; dx = \int \dfrac{1}{\cos x} \; dx$
Multiply both numerator and denominator of the intrgrand on the right by $$\cos x$$ $\int \sec x \; dx = \int \dfrac{\cos x}{\cos^2 x} \; dx$ Use trigonometric identity $$\cos^2 x = 1 - \sin^2 x$$ on the right and write
$\int \sec x \; dx = \int \dfrac{\cos x}{1 - \sin^2 x} \; dx$ Use Integration by Substitution: $$u = \sin x$$ so that $$du = \cos x dx$$, and the given integral can be written as $\int \sec x \; dx = \int \dfrac{1}{1 - u^2} \; du$ Use partial fractions decomposition to write the integrand as $\dfrac{1}{ (1-u^2)} = \dfrac{1}{2\left(u+1\right)}-\dfrac{1}{2\left(u-1\right)}$ Substitute in the integral $\int \sec x \; dx = \dfrac{1}{2} \int \dfrac{1}{u+1} du - \dfrac{1}{2} \int \dfrac{1}{u-1} du$ Use the formula of integration $$\displaystyle\int \dfrac{f'(x)}{f(x)} \; dx = \ln | f(x)| +c$$ to obtain $\int \sec x \; dx = \dfrac{1}{2} \ln |u+1| - \dfrac{1}{2} \ln |u-1| + c$ Group the logarithmic expressions using the properties $$\quad \ln \dfrac{a}{b } = \ln a - \ln b$$ to write $\int \sec x \; dx = \dfrac{1}{2} \ln \dfrac{|u+1|}{|u-1|} + c$ Substitute back $$u = \sin x$$ $\boxed { \int \sec x \; dx = \dfrac{1}{2} \ln \dfrac{|\sin x+1|}{|\sin x-1|} +c }$