# How to evaluate $\int \sec^3x \, \mathrm{d}x$? [duplicate]

How to evaluate $\int \sec^3x \, \mathrm{d}x$ ?

I tried integration by parts and then I got $$\int \sec^3x \, \mathrm{d}x=\sec x \tan x - \int\sec x \tan^2 x \, \mathrm{d}x.$$ Now I'm stuck solving $\int\sec x \tan^2 x \, \mathrm{d}x$? How to solve that and how to solve my initial question? What is the smartest way solving $\int \sec^3x \, \mathrm{d}x$?

• en.wikipedia.org/wiki/Integral_of_secant_cubed – lab bhattacharjee Dec 23 '14 at 15:59
• The smartest way to solve the integral is to look it up in an integral table. – vadim123 Dec 23 '14 at 16:07
• You can solve a lot of integrals like this using the Weierstrass substitution. This one has a relatively easier solution, see below, but this trick is a useful one to know. – Thomas Andrews Dec 23 '14 at 16:37
• hint: $$\int \sec^3x \, \mathrm{d}x=\sec x \tan x - \int\sec x \tan^2 x \, \mathrm{d}x=\sec x \tan x - \int\sec x (\sec^2 x-1) \, \mathrm{d}x=\dots$$ – John Joy Dec 23 '14 at 17:37

This is a well-known problem. Using $\left( u, v \right) = \left( \sec x, \tan x \right)$ gives \begin {align*} \displaystyle\int \sec^3 \, \mathrm{d}x &= \displaystyle\int \sec x \tan x - \displaystyle\int \sec x \tan^2 x \, \mathrm{d}x \\&= \sec x \tan x - \displaystyle\int \sec^3 x \, \mathrm{d}x + \displaystyle\int \sec x \, \mathrm{d}x. \end {align*}If we let our integral be $I$, then, $2I = \sec x \tan x + \displaystyle\int \sec x \, \mathrm{d}x = \sec x \tan x + \ln \left| \sec x + \tan x \right| + \mathcal{C}_0$, so we have $$\displaystyle\int \sec^3 x \, \mathrm{d}x = \boxed {\dfrac {\sec x \tan x + \ln \left| \sec x + \tan x \right|}{2} + \mathcal{C}}.$$

Since $$\sec^3 x = \frac{1}{\cos^3 x}=\frac{\cos x}{\cos^4 x}=\frac{\cos x}{(1-\sin^2 x)^2},$$ we just need a primitive for $$f(t) = \frac{1}{(1-t^2)^2}$$ that is: $$F(t) = \frac{1}{4}\left(\frac{2t}{1-t^2}+\log\frac{1+t}{1-t}\right).$$

• Probably better to not use $x$ after the substitution, but otherwise nice. – Thomas Andrews Dec 23 '14 at 16:39
• @ThomasAndrews: you're right, fixed. – Jack D'Aurizio Dec 23 '14 at 16:42

$$\int\sec^3 x dx = \sec x \tan x - \int \sec x \tan ^2 x dx$$ using $\tan^2 x+1 = \sec^2 x$ we find $$I = \sec x \tan x - \int \sec x \tan ^2 x dx = \sec x \tan x - \int \sec x \left(\sec^2 x-1\right)dx = \sec x \tan x- I + \int \sec x dx$$ thus we get $$2I = \sec x \tan x + \int \sec x dx$$ now (an interesting derivation and a lot harder than you think to solve try it yourself) $$\int \sec x dx = \ln|\sec x + \tan x| + C$$ thus $$I = \frac{1}{2}\left(\sec x \tan x + \ln|\sec x + \tan x| + C\right)$$

Here is a straight way you are looking for:

a) Show that $(\sec x)^{\prime \prime }=2\sec ^{3}(x)-\sec x;$

b) Deduce $\int \sec ^{3}x\mathsf{d}x.$

Answer: Recall that $(\sec x)^{\prime }=\sec x\tan x,$ so \begin{eqnarray*} (\sec x)^{\prime \prime } &=&\left( (\sec x)^{\prime }\right) ^{\prime }=\left( \sec x\tan x\right) ^{\prime }=(\sec x)^{\prime }\tan x+\sec x\left( \tan x\right) ^{\prime } \\ &=&\sec x\tan x\tan x+\sec x\sec ^{2}x=\sec x(\sec ^{2}x-1)+\sec ^{3}x \\ &=&\sec ^{3}x-\sec x+\sec ^{3}x=2\sec ^{3}(x)-\sec x \end{eqnarray*}

b) We compute the integral of the second derivative like this $$\int (\sec x)^{\prime \prime }\mathsf{d}x=\int (2\sec ^{3}(x)-\sec x)\mathsf{ d}x,$$ but the integral of a derivative is the function itself! then $$\int (\sec x)^{\prime \prime }\mathsf{d}x=(\sec x)^{\prime }+c=\sec x\tan x+c$$ therefore $$\sec x\tan x+c=2\int \sec ^{3}x\mathsf{d}x-\int \sec x\mathsf{d}x=2\int \sec ^{3}x\mathsf{d}x-\ln (\sec x+\tan x)$$ from which it follows $$\int \sec ^{3}x\mathsf{d}x=\frac{1}{2}\sec x\tan x+\frac{1}{2}\ln (\sec x+\tan x)+c.$$

• you can compute in the same way the integral of $csc^3(x)$ – Idris Addou Dec 23 '14 at 16:15

Since I mentioned it in comments, there is a general approach to such problems, the Weierstrass half-angle substitution.

Let $u=\tan \frac{x}{2}$ then $\cos x = \frac{1-u^2}{1+u^2}$ and $dx=\frac{2du}{1+u^2}$.

So:

$$\int \sec^3 x \,dx = \int \frac{2(1+u^2)^2du}{(1-u^2)^3}$$

You are still going to need to do a partial fraction decomposition.

It's messy. but this trick is worth knowing because it can be used in so many questions.

Cheating to keep this brief, Wolfram Alpha gives the partial fraction decomposition as:

$$\frac{2(1+u^2)^2}{(1-u^2)^3} = \frac{1}{2(u+1)} -\frac{1}{2(u+1)^2} + \frac{1}{(u+1)^3} - \frac{1}{2(u-1)} - \frac{1}{2(u-1)^2} - \frac{1}{(u-1)^3}$$