# Why is $(\sec x)' = \tan x\sec x$ and not $\tan x$?

As far as I understood, the Fundamental Theorem of Calculus states that the integral of a function is its anti-derivative. And yet, although the integral of $\tan x$ is $\sec x$, the derivative of $\sec x$ is $\tan x\sec x$. I understand the calculation and you get $\tan x\sec x$ as the derivative, but how does it make sense in light of the fundamental theorem? What am I missing here?

• The integral of $\tan{x}$ is NOT $\sec{x}$. – David H Jun 22 '14 at 8:11
• Well, embarrassingly enough, you are right... Thanks. – Uziya Jun 22 '14 at 8:29

The actual anti-derivative of $\tan{x}$ is:

$$\int\tan{x}\,\mathrm{d}x=\int\frac{\sin{x}}{\cos{x}}\,\mathrm{d}x=\int\frac{-\mathrm{d}(\cos{x})}{\cos{x}}=-\ln{(\cos{x})}+\text{constant}.$$

This gives us the definite integral,

$$\int_{0}^{x}\tan{u}\,\mathrm{d}u=-\ln{(\cos{x})}=\ln{\left(\frac{1}{\cos{x}}\right)}=\ln{(\sec{x})}.$$

Applying the fundamental theorem of calculus to this integral gives us:

\begin{align} \frac{d}{dx}\int_{0}^{x}\tan{u}\,\mathrm{d}u&=\frac{d}{dx}\ln{(\sec{x})}\\ \implies \tan{x}&=\frac{\frac{d}{dx}(\sec{x})}{\sec{x}}. \end{align}

Multiplying both sides by $\sec{x}$ yields:

$$\frac{d}{dx}(\sec{x})=\tan{x}\sec{x}.$$