I've seen many videos calculating this integral: $\int \sec x\, dx = \ln |\sec x + \tan x| + C$
But I've never understood why you multiply and divide by $\sec x + \tan x$
And then substitute $\sec x + \tan x$ by $u$
How can I think about this? Is there some rule or something because I wouldn't have thought about doing that. Is evaluating integrals just memorizing something someone has already done?
Great Question! We multiply and divide the integral by $\sec(x)+\tan(x)$ in order to make the numerator the derivative of the denominator. But of course it would not have come to mind on first thought. There is no need to memorize, as we could have taken any one of the several methods to solve this integral. We could also multiply and divide by $\sec(x)$, and use the identity $\sec x = \sqrt{1+\tan^2x}$ in the denominator, and substitute $\tan(x)$ by a variable, say $z$. The numerator becomes $dz$ and the denominator $\sqrt{1+z^2}$ then we solve using the standard formula.