Integrating sec x from 0 to pi/6

Brain Teaser · Easy · Free problem

Evaluate $$\int_{0}^{\pi/6} \sec x \, dx.$$ Give the exact value.

Hints

  1. You need an antiderivative of $\sec x$. It is not $\ln|\cos x|$ or anything you get from a naive substitution; recall the classic trick of multiplying and dividing by $\sec x + \tan x$.
  2. Compute $\frac{d}{dx}(\sec x + \tan x) = \sec x \tan x + \sec^2 x = \sec x(\sec x + \tan x)$. So $\sec x = \frac{(\sec x + \tan x)'}{\sec x + \tan x}$.
  3. Hence $\int \sec x\,dx = \ln|\sec x + \tan x| + C$. Evaluate at $\pi/6$ using $\cos(\pi/6) = \sqrt{3}/2$ and $\tan(\pi/6) = 1/\sqrt{3}$.

Worked Solution

How to Think About It: Recognize $\sec x$ as a logarithmic derivative in disguise: $\sec x = \dfrac{(\sec x + \tan x)'}{\sec x + \tan x}$. Then the definite integral is just a difference of logs.

Quick Estimate: On $[0, \pi/6]$ the integrand runs from $\sec 0 = 1$ to $\sec(\pi/6) = 2/\sqrt{3} \approx 1.155$. The interval has length $\pi/6 \approx 0.524$, so the integral is between $0.524$ and $0.605$, roughly $0.55$. The exact answer $\tfrac{1}{2}\ln 3 \approx 0.549$ fits.

Formal Solution:

*Step 1 -- Find the antiderivative.* Differentiate $\sec x + \tan x$: $$\frac{d}{dx}(\sec x + \tan x) = \sec x \tan x + \sec^{2} x = \sec x\,(\tan x + \sec x).$$ Therefore $$\sec x = \frac{\frac{d}{dx}(\sec x + \tan x)}{\sec x + \tan x} \quad \Longrightarrow \quad \int \sec x\,dx = \ln|\sec x + \tan x| + C.$$

*Step 2 -- Evaluate the endpoints.* At $x = \pi/6$: $\sec(\pi/6) = \dfrac{2}{\sqrt{3}}$ and $\tan(\pi/6) = \dfrac{1}{\sqrt{3}}$, so $\sec x + \tan x = \dfrac{3}{\sqrt{3}} = \sqrt{3}$. At $x = 0$: $\sec 0 + \tan 0 = 1$.

*Step 3 -- Subtract.* $$\int_{0}^{\pi/6} \sec x\,dx = \ln\sqrt{3} - \ln 1 = \ln \sqrt{3} = \tfrac{1}{2}\ln 3 \approx 0.5493.$$

Answer: $\displaystyle \int_{0}^{\pi/6} \sec x\,dx = \ln\sqrt{3} = \tfrac{1}{2}\ln 3 \approx 0.549$.

Intuition

The antiderivative of $\sec x$ is one of the few standard integrals worth memorizing because it cannot be guessed: it comes from noticing that $\sec x + \tan x$ is its own derivative up to a factor of $\sec x$, which makes the integrand a logarithmic derivative. Logarithmic-derivative patterns $f'/f$ are everywhere in quant work, from log returns $dS/S$ to score functions $\partial \ln L / \partial \theta$ in maximum likelihood.

Open the full interactive solver →