Calculus is Cool

Integration of the secant function

by Evan Pfeuffer

Let’s start with integration of the \sec(x):

\int \sec(x) \,dx

We can express this as

\int \frac{1}{\cos(x)} \,dx

If we multiply the integrand by \frac{\cos(x)}{\cos(x)} then we obtain:

\int \frac{\cos(x)}{\cos^2(x)} \, dx

Using our trigonometric identity \sin^2(x) + \cos^2(x) = 1 we can convert the integrand into:

\int \frac{\cos(x)}{1-\sin^2(x)} \,dx

This allows us to make the substitution u = \sin(x), du = \cos(x) \, dx

Continuing with the substitution:

\int \frac{\cos(x)}{1-\sin^2(x)} \,dx = \int \frac{1}{1-u^2} \,du

Next we need to continue with a partial fraction decomposition of \frac{1}{1-u^2} = \frac{1}{(1-u)(1+u)}:

Let A and B be constants such that:

\frac{A}{1-u} + \frac{B}{1+u} = \frac{1}{(1-u)(1+u)}

Cross-multiplying and setting the numerators equals yields:

A(1+u) + B(1-u) = 1

Letting u = -1 implies that A(0) + 2B = 1 or B = 1/2

Letting u = 1 implies that A(2) + B(0) = 1 or A = 1/2

Now we can restate our integral as:

\int \frac{1}{1-u^2} \,du = \int \frac{1/2}{1-u} + \frac{1/2}{1+u} \,du = \frac{1}{2} \int \frac{1}{1-u} + \frac{1}{1+u} \,du

Using the fact that \int \frac{1}{x} \,dx = \ln |x| + C

We can integrate as follows:

\frac{1}{2} \int \frac{1}{1-u} + \frac{1}{1+u} \,du = -\frac{1}{2} \ln|1-u| + \frac{1}{2}\ln|1+u| + C

-\frac{1}{2} \ln|1-u| + \frac{1}{2}\ln|1+u| + C = \frac{1}{2} \ln |\frac{1+u}{1-u}| + C

Remembering our original substitution u = \sin(x) we finally have:

\int \sec(x) \,dx  = \frac{1}{2} \ln |\frac{1+\sin(x)}{1-\sin(x)}| + C

Another common result for \int \sec(x) \,dx is \ln|\sec(x) + \tan(x)| + C

Here’s how they are equivalent:

\frac{1}{2} \ln |\frac{1+\sin(x)}{1-\sin(x)}| + C = \ln \sqrt{\frac{1+\sin(x)}{1-\sin(x)}}+ C

\ln \sqrt{\frac{1+\sin(x)}{1-\sin(x)}}+ C = \ln \sqrt{\frac{1+\sin(x)}{1-\sin(x)} \times \frac{1+\sin(x)}{1+\sin(x)}}+ C = \ln \sqrt{\frac{(1+\sin(x))^2}{1-\sin^2(x)}} +C

\ln \sqrt{\frac{(1+\sin(x))^2}{1-\sin^2(x)}} +C = \ln \sqrt{\frac{(1+\sin(x))^2}{\cos^2(x)}} +C = \ln \bigl| \frac{1+\sin(x)}{\cos(x)} \bigr| + C

And finally,

\ln \bigl| \frac{1+\sin(x)}{\cos(x)} \bigr|  + C = \ln \bigl| \sec(x) + \tan(x) \bigr| + C

One response to “Integration of the secant function”

  1. witchscrumptiouslya332e1e0c6 Avatar
    witchscrumptiouslya332e1e0c6

    nice web

    b

    Like

Leave a comment

Navigation

About

Writing on the Wall is a newsletter for freelance writers seeking inspiration, advice, and support on their creative journey.