# Simple integration by parts problem?

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.

-

The reduction formula (which you were sure about :)) has a typo (edit: now corrected). The correct formula is: $$\int{\sec^nx}dx=\frac{1}{n-1}\sec^{n-2}x\tan x+\frac{n-2}{n-1}\int{\sec^{n-2}xdx},$$ for $n \geq 2$. (Note that the second term should carry a "$+$" sign and the exponent of $\sec x$ is $n-2$.) You can confirm the formula and find its derivation here.

Also, as Brian points out, if you want $16 \int \sec^3 x dx$ rather than $\int \sec^3 x dx$ (which is what both the methods are really calculating), you should multiply the answer by $16$. I will record the correct answer here for easy reference: $$\int 16\ \sec^3 x dx = 8 \sec x \tan x + 8 \ln |\sec x + \tan x| + C.$$

-
Yes, you are correct about the formula being wrong, I have now edited my post to reflect this. However, I still don't see what I did wrong. Could you explain what you mean by having to multiply by 16? –  Hautdesert Sep 21 '11 at 5:59
Ok. See, you did nothing wrong in the second method; in particular, the correct answer is in the very last equation. Now, your very first equation which is supposed to be a general formula to integrate $\sec^n x$, has a typo. Moreover, you multiplied that formula by 16 for some reason that I don't understand. Can you clarify what the exact integrand is: $\sec^3 x$ or $16\sec^3 x$? @Haut –  Srivatsan Sep 21 '11 at 6:03
I got it now. Thank you for your help. –  Hautdesert Sep 21 '11 at 6:10
Ok, the correct answer is: $$16 \int \sec^3 x = 8 \sec x \tan x + 8 \ln |\tan x + \sec x| + C.$$ If you correct the original formula (change the - sign to + and also change the exponent), then you will get the exact same answer. @Haut –  Srivatsan Sep 21 '11 at 6:11

It's not the same answer because it’s not the same question: your first result was for $16\int \sec^3 x dx$, your second for $\int \sec^3 x dx$. Multiply your second result by $16$, and you’ll be fine.

Added: Well, you would have been fine if you’d got the sign right in the reduction formula, which I carelessly failed to check. See Srivatsan’s answer for details. (I’m leaving mine up on account of the note below.)

Technical note: In your integration by parts, $dv$ is not $\sec^2 x$: it’s $\sec^2 x dx$. Similarly, $du$ is not $\tan x \sec x$ but rather $\tan x \sec x dx$.

-
Actually, the answers are not the same even after multiplying by 16. The second term in the very first formula is negative, but it seems it should be positive. –  Srivatsan Sep 21 '11 at 5:44
@Srivatsan: That’s what I get for not double-checking the part of which he was certain. (The $n-1$ exponent ought to have been a dead giveaway that it needed a second look.) sigh –  Brian M. Scott Sep 21 '11 at 6:00
I integrated $\int{sec^3x}dx$ by parts, and then I multiplied all of that by 16. I'm sure the typos had nothing to do with the answers not being the same since I did this on paper with the proper formula, I just mistyped it. Could you help me understand what you mean? –  Hautdesert Sep 21 '11 at 6:05
@Brian Actually even I took that on faith. Only after checking that the signs on the right hand side did not match (and noting that the integration by parts approach looks ok), did I suspect that something is off with the formula. –  Srivatsan Sep 21 '11 at 6:06
@Hautdesert: You multiplied the result of integrating $\int\sec^3 x dx$ by parts by $16$, but then you solved for $\int\sec^3 x dx$ instead of for $16\int\sec^3 x dx$. Your original result using the reduction formula was for $16\int\sec^3 x dx$. –  Brian M. Scott Sep 21 '11 at 6:22