# Integral of sec³ x: Formula, Derivation and Examples

> The integral of sec³ x is ½(sec x tan x + ln|sec x + tan x|) + C. See the integration by parts loop step by step, a full check and the arc length application.

Source: https://practicecalculus.com/integrals/sec-cubed-x
Updated: 2026-11-06

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

## At a glance

- **Antiderivative:** $\dfrac{1}{2}\sec x\tan x + \dfrac{1}{2}\ln\lvert\sec x + \tan x\rvert + C$
- **Method:** Integration by parts with $u = \sec x$, $dv = \sec^2 x\,dx$
- **Key identity:** $\tan^2 x = \sec^2 x - 1$
- **From 0 to π/4:** $\dfrac{\sqrt{2} + \ln(1 + \sqrt{2})}{2} \approx 1.148$
- **Reduction formula:** $\int\sec^n x\,dx = \dfrac{\sec^{n-2}x\tan x}{n - 1} + \dfrac{n - 2}{n - 1}\int\sec^{n-2}x\,dx$

## Key takeaways

- The integral of $\sec^3 x$ is $\frac{1}{2}\left(\sec x\tan x + \ln\lvert\sec x + \tan x\rvert\right) + C$.
- Integrate by parts once, use $\tan^2 x = \sec^2 x - 1$, and the original integral appears again on the right.
- Move it to the left side and divide by $2$. This loop trick also works for $\int e^x\sin x\,dx$.
- It appears whenever you integrate $\sqrt{1 + x^2}$, for example in the arc length of a parabola.

The **integral of $\sec^3 x$ is $\dfrac{1}{2}\left(\sec x\tan x + \ln\lvert\sec x + \tan x\rvert\right) + C$**. It is the classic example of integration by parts where the integral comes back around and you solve for it.

$$\int \sec^3 x\,dx = \frac{1}{2}\sec x\tan x + \frac{1}{2}\ln\lvert\sec x + \tan x\rvert + C$$

## Graph of sec³ x and the area under it

```graph
title: 'Area under y = sec³ x from 0 to π/4'
caption: 'The shaded area is $\frac{\sqrt{2} + \ln(1 + \sqrt{2})}{2} \approx 1.148$. The function grows very quickly toward the asymptote at $x = \frac{\pi}{2}$.'
x: [-1.6, 1.6]
y: [-0.5, 6]
functions:
  - expr: sec(x)^3
    label: y = sec³ x
    domain: [-1.05, 1.05]
  - expr: sec(x)
    label: y = sec x (for comparison)
    dashed: true
    domain: [-1.3, 1.3]
shade: {expr: sec(x)^3, from: 0, to: 0.7854}
points:
  - [0, 1, '(0, 1)']
  - [0.7854, 2.828, '(π/4, 2√2)']
```

## Derivation by parts, step by step

Call the integral $I = \int\sec^3 x\,dx$.

1. Split $\sec^3 x = \sec x\cdot\sec^2 x$ and use the [integration by parts rule](/rules/integration-by-parts-rule) with
$$u = \sec x,\quad dv = \sec^2 x\,dx,\qquad du = \sec x\tan x\,dx,\quad v = \tan x$$
2. Apply $\int u\,dv = uv - \int v\,du$:
$$I = \sec x\tan x - \int\sec x\tan^2 x\,dx$$
3. Replace $\tan^2 x$ with $\sec^2 x - 1$:
$$I = \sec x\tan x - \int\sec^3 x\,dx + \int\sec x\,dx = \sec x\tan x - I + \int\sec x\,dx$$
4. The original integral $I$ has appeared on the right. Add $I$ to both sides:
$$2I = \sec x\tan x + \ln\lvert\sec x + \tan x\rvert$$
5. Divide by $2$ and add $C$.

Step 4 uses the [integral of sec x](/integrals/sec-x). The choice $dv = \sec^2 x\,dx$ works because $\sec^2 x$ is the one piece you can integrate easily, to $\tan x$. The [integration by parts guide](/blog/integration-by-parts) has more examples of this loop.

## Check by differentiating

First, by the [product rule](/rules/product-rule):

$$\frac{d}{dx}(\sec x\tan x) = \sec x\tan x\cdot\tan x + \sec x\cdot\sec^2 x = \sec x\tan^2 x + \sec^3 x$$

Replace $\tan^2 x$ with $\sec^2 x - 1$ to get $2\sec^3 x - \sec x$. The log term differentiates to $\sec x$. So

$$\frac{d}{dx}\left[\frac{1}{2}\sec x\tan x + \frac{1}{2}\ln\lvert\sec x + \tan x\rvert\right] = \frac{1}{2}\left(2\sec^3 x - \sec x + \sec x\right) = \sec^3 x \checkmark$$

## Definite integral

At $x = \frac{\pi}{4}$: $\sec = \sqrt{2}$, $\tan = 1$. At $x = 0$: $\sec = 1$, $\tan = 0$, and $\ln 1 = 0$. So

$$\int_0^{\pi/4}\sec^3 x\,dx = \frac{1}{2}\left(\sqrt{2} + \ln(\sqrt{2} + 1)\right) \approx 1.148$$

## Application: integral of √(1 + x²) and arc length

Let $x = \tan\theta$, $dx = \sec^2\theta\,d\theta$. Then $\sqrt{1 + x^2} = \sec\theta$ and

$$\int\sqrt{1 + x^2}\,dx = \int\sec^3\theta\,d\theta = \frac{1}{2}x\sqrt{1 + x^2} + \frac{1}{2}\ln\left(x + \sqrt{1 + x^2}\right) + C$$

The arc length of the parabola $y = \frac{x^2}{2}$ from $x = 0$ to $x = 1$ is $\int_0^1\sqrt{1 + x^2}\,dx$, which is exactly the shaded area above: about $1.148$. More on this in the lesson on [arc length and surface area](/learn/calculus-2/improper-integrals-and-applications/arc-length-and-surface-area).

## The reduction formula

The same steps with $\sec^n x$ give

$$\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$$

With $n = 3$ this is our result. With $n = 5$, it reduces $\sec^5 x$ to $\sec^3 x$, which you now know.

## Common mistakes

1. **Using the power rule: $\frac{\sec^4 x}{4}$.** Its derivative is $\sec^4 x\tan x$, not $\sec^3 x$.
2. **Choosing $u = \sec^2 x$, $dv = \sec x\,dx$.** Then $v = \ln\lvert\sec x + \tan x\rvert$, and the new integral is much harder.
3. **Forgetting to divide by $2$** after collecting the $I$ terms.
4. **Losing the log term.** The $\int\sec x\,dx$ from step 3 is easy to drop.

Practise on [integration by parts problems](/practice-problems/integration-by-parts).

## Frequently asked questions

### What is the integral of sec³ x?

It is $\frac{1}{2}\sec x\tan x + \frac{1}{2}\ln\lvert\sec x + \tan x\rvert + C$.

### Why can't I use the power rule on sec³ x?

The power rule for $\int u^3\,du$ needs $du = \sec x\tan x\,dx$ to be in the integral. It is not, so you need integration by parts instead.

### What is the integral of √(1 + x²)?

With $x = \tan\theta$ it becomes $\int\sec^3\theta\,d\theta$. The answer is $\frac{1}{2}x\sqrt{1 + x^2} + \frac{1}{2}\ln\left(x + \sqrt{1 + x^2}\right) + C$.

### What is the integral of sec³ x from 0 to π/4?

It is $\frac{1}{2}\left(\sqrt{2} + \ln(1 + \sqrt{2})\right) \approx 1.148$.
