When taking the integral of $\sec(x)$, how do you come up with the crucial step?

Before I learned about $\sec(x)$, the way I used to integrate $\frac{1}{\cos x}$ is to multiply with $\frac{\cos x}{\cos x}$ and substitute $u = \sin x$. You may find that a bit more "natural".


Well, we want to multiply it by some $\frac{f(x)}{f(x)}$ so that $f'(x)=\sec(x)f(x)$ for the $u$-sub.

Let $f(x)$ be of the form $g(x)+h(x)$. We'd want to find some $g(x)$ and $h(x)$ such that $\sec(x)g(x)$ and $\sec(x)h(x)$ have known antiderivatives.

Hm... so what derivatives do we know of that involve $\sec(x)$ multiplied by something...?

Well, that's not particularly hard...

$$\frac{d}{dx}\sec(x)=\sec(x)\tan(x)$$

$$\frac{d}{dx}\tan(x)=\sec^2(x)$$

So we would have $g(x)=\tan(x)$ and $h(x)=\sec(x)$, giving us our $f(x)$.

Then the rest is easy.