The integral of secant cubed is a frequent and challenging[1] indefinite integral of elementary calculus:

${\displaystyle \int \sec ^{3}x\,dx={\frac {1}{2))(\sec x\tan x+\ln \left|\sec x+\tan x\right|)+C.}$

There are a number of reasons why this particular antiderivative is worthy of special attention:

• The technique used for reducing integrals of higher odd powers of secant to lower ones is fully present in this, the simplest case. The other cases are done in the same way.
• The utility of hyperbolic functions in integration can be demonstrated in cases of odd powers of secant (powers of tangent can also be included).
• This is one of several integrals usually done in a first-year calculus course in which the most natural way to proceed involves integrating by parts and returning to the same integral one started with (another is the integral of the product of an exponential function with a sine or cosine function; yet another the integral of a power of the sine or cosine function).
• This integral is used in evaluating any integral of the form
${\displaystyle \int {\sqrt {a^{2}+x^{2))}\,dx,}$
where ${\displaystyle a}$ is a constant. In particular, it appears in the problems of:

## Derivations

### Integration by parts

This antiderivative may be found by integration by parts, as follows:[2]

${\displaystyle \int \sec ^{3}x\,dx=\int u\,dv=uv-\int v\,du}$

where

${\displaystyle u=\sec x,\quad dv=\sec ^{2}x\,dx,\quad v=\tan x,\quad du=\sec x\tan x\,dx.}$

Then

{\displaystyle {\begin{aligned}\int \sec ^{3}x\,dx&{}=\int (\sec x)(\sec ^{2}x)\,dx\\&{}=\sec x\tan x-\int \tan x\,(\sec x\tan x)\,dx\\&{}=\sec x\tan x-\int \sec x\tan ^{2}x\,dx\\&{}=\sec x\tan x-\int \sec x\,(\sec ^{2}x-1)\,dx\\&{}=\sec x\tan x-\left(\int \sec ^{3}x\,dx-\int \sec x\,dx\right)\\&{}=\sec x\tan x-\int \sec ^{3}x\,dx+\int \sec x\,dx.\end{aligned))}

Next add ${\displaystyle \int \sec ^{3}x\,dx}$ to both sides of the equality just derived:[a]

{\displaystyle {\begin{aligned}2\int \sec ^{3}x\,dx&=\sec x\tan x+\int \sec x\,dx\\&=\sec x\tan x+\ln \left|\sec x+\tan x\right|+C,\end{aligned))}

given that the integral of the secant function is ${\displaystyle \int \sec x\,dx=\ln |\sec x+\tan x|+C.}$[2]

Finally, divide both sides by 2:

${\displaystyle \int \sec ^{3}x\,dx={\frac {1}{2))(\sec x\tan x+\ln \left|\sec x+\tan x\right|)+C,}$

which was to be derived.[2]

### Reduction to an integral of a rational function

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

where ${\displaystyle u=\sin x}$, so that ${\displaystyle du=\cos x\,dx}$. This admits a decomposition by partial fractions:

${\displaystyle {\frac {1}{(1-u^{2})^{2))}={\frac {1}{(1+u)^{2}(1-u)^{2))}={\frac {1/4}{1+u))+{\frac {1/4}{(1+u)^{2))}+{\frac {1/4}{1-u))+{\frac {1/4}{(1-u)^{2))}.}$

Antidifferentiating term by-term, one gets

{\displaystyle {\begin{aligned}\int \sec ^{3}x\,dx&={\frac {1}{4))\ln |1+u|-{\frac {1/4}{1+u))-{\frac {1}{4))\ln |1-u|+{\frac {1/4}{1-u))+C\\[6pt]&={\frac {1}{4))\ln {\Biggl |}{\frac {1+u}{1-u)){\Biggl |}+{\frac {1}{2))\left({\frac {u}{1-u^{2))}\right)+C\\[6pt]&={\frac {1}{4))\ln {\Biggl |}{\frac {1+\sin x}{1-\sin x)){\Biggl |}+{\frac {1}{2))\left({\frac {\sin x}{\cos ^{2}x))\right)+C\\[6pt]&={\frac {1}{4))\ln \left|{\frac {1+\sin x}{1-\sin x))\right|+{\frac {1}{2))\sec x\tan x+C\\[6pt]&={\frac {1}{4))\ln \left|{\frac {(1+\sin x)^{2)){1-\sin ^{2}x))\right|+{\frac {1}{2))\sec x\tan x+C\\[6pt]&={\frac {1}{4))\ln \left|{\frac {(1+\sin x)^{2)){\cos ^{2}x))\right|+{\frac {1}{2))\sec x\tan x+C\\[6pt]&={\frac {1}{4))\ln \left|{\frac {1+\sin x}{\cos x))\right|^{2}+{\frac {1}{2))\sec x\tan x+C\\[6pt]&={\frac {1}{2))\ln \left|{\frac {1+\sin x}{\cos x))\right|+{\frac {1}{2))\sec x\tan x+C\\[6pt]&={\frac {1}{2))(\ln |\sec x+\tan x|+\sec x\tan x)+C.\end{aligned))}

### Hyperbolic functions

Integrals of the form: ${\displaystyle \int \sec ^{n}x\tan ^{m}x\,dx}$ can be reduced using the Pythagorean identity if ${\displaystyle n}$ is even or ${\displaystyle n}$ and ${\displaystyle m}$ are both odd. If ${\displaystyle n}$ is odd and ${\displaystyle m}$ is even, hyperbolic substitutions can be used to replace the nested integration by parts with hyperbolic power reducing formulas.

{\displaystyle {\begin{aligned}\sec x&{}=\cosh u\\[6pt]\tan x&{}=\sinh u\\[6pt]\sec ^{2}x\,dx&{}=\cosh u\,du{\text{ or ))\sec x\tan x\,dx=\sinh u\,du\\[6pt]\sec x\,dx&{}=\,du{\text{ or ))dx=\operatorname {sech} u\,du\\[6pt]u&{}=\operatorname {arcosh} (\sec x)=\operatorname {arsinh} (\tan x)=\ln |\sec x+\tan x|\end{aligned))}

Note that ${\displaystyle \int \sec x\,dx=\ln |\sec x+\tan x|}$ follows directly from this substitution.

{\displaystyle {\begin{aligned}\int \sec ^{3}x\,dx&{}=\int \cosh ^{2}u\,du\\[6pt]&{}={\frac {1}{2))\int (\cosh 2u+1)\,du\\[6pt]&{}={\frac {1}{2))\left({\frac {1}{2))\sinh 2u+u\right)+C\\[6pt]&{}={\frac {1}{2))(\sinh u\cosh u+u)+C\\[6pt]&{}={\frac {1}{2))(\sec x\tan x+\ln \left|\sec x+\tan x\right|)+C\\\end{aligned))}

## Higher odd powers of secant

Just as the integration by parts above reduced the integral of secant cubed to the integral of secant to the first power, so a similar process reduces the integral of higher odd powers of secant to lower ones. This is the secant reduction formula, which follows the syntax:

${\displaystyle \int \sec ^{n}x\,dx={\frac {\sec ^{n-2}x\tan x}{n-1))\,+\,{\frac {n-2}{n-1))\int \sec ^{n-2}x\,dx\qquad {\text{ (for ))n\neq 1{\text{)))\,\!}$

Alternatively:

${\displaystyle \int \sec ^{n}x\,dx={\frac {\sec ^{n-1}x\sin x}{n-1))\,+\,{\frac {n-2}{n-1))\int \sec ^{n-2}x\,dx\qquad {\text{ (for ))n\neq 1{\text{)))\,\!}$

Even powers of tangents can be accommodated by using binomial expansion to form an odd polynomial of secant and using these formulae on the largest term and combining like terms.