An integration reduction formula for $\sec^n x$ is
$\int\sec^nx\;dx=\frac{1}{n-1}\sec^{n-2}x\tan x+\frac{n-2}{n-1}\int\sec^{n-2}x\;dx, n≠1$
Using this formula (which I am sure is correct) gives the integral of $16\sec^3x$ to be
$16\int \sec^3 x\;dx=16\left(\frac{1}{2}\sec x\tan x-\frac{1}{2}\int\sec x\;dx\right)=8\sec x\tan x-8\ln|\tan x+\sec x|+C$
Now, if I don't use this reduction formula, and instead opt to do it using the same method used to generalize the formula in the first place (integration by parts) I should get the same answer. But I don't! Aha! There lies my dilemma. Watch:
Letting $u=\sec x$ and $dv=\sec^2x$, then $du=\tan x\sec x$ and $v=\tan x$ and we get
$\int{\sec^3xdx}=\sec x\tan x-\int\sec x\tan^2x\;dx$
Using the Pythagorean trigonometric identity $\tan^2x=\sec^2x-1$
$\int\sec^3x\;dx =\sec x\tan x-\int \sec x(\sec^2x-1)\;dx =\sec x\tan x-\int\sec^3x-\sec x\;dx$
And so, using the integral used earlier, we get
$16\int\sec^3x\;dx=16(\sec x\tan x-\int \sec^3x\;dx +\ln|\tan x+\sec x|)$
However, if I was to multiply the $16$ on the RHS "in" and then absorb the integral on the LHS and divide, I would end up with
$\int\sec^3x \;dx=\frac{1}{2}\sec x\tan x+\frac{1}{2}\ln|\tan x+\sec x|+C$
which isn't the same answer I arrived at earlier. What am I doing wrong? I'm sure that it's probably something very simple, but I cannot figure it out. I apologize in advance if maybe this question is too simple to be asked here. Thanks in advance.