The integral of sec x is ln|sec x + tan x| + C, where C is the integration constant. Here are the steps to derive this formula:
- Rewrite sec x as 1/cos x.
- Multiply the numerator and denominator of 1/cos x by (cos x + sin x)/(cos x + sin x), which is equal to sec x + tan x.
- Substitute u = sec x + tan x, and du/dx = sec x tan x + sec^2 x = u^2 - 1.
- Rewrite the integral in terms of u: ∫(u^2 - 1)/u du.
- Simplify the integrand: ∫(u - 1/u) du.
- Integrate: u^2/2 - ln|u| + C.
- Substitute back u = sec x + tan x: (sec^2 x + tan^2 x)/2 + ln|sec x + tan x| + C.
- Simplify using the identity sec^2 x = 1 + tan^2 x: tan^2 x/2 + ln|sec x + tan x| + C.
Therefore, the integral of sec x is ln|sec x + tan x| + C.