\[\begin{align*} \int \sec^2(x) dx = \boxed{\tan(x) + C}. \end{align*}\]
To find the indefinite integral of $\sec^2(x)$, let’s first recall that the derivative of $\tan x$ is
\[\begin{align*} \dfrac{d}{dx}(\tan(x)) = \sec^2(x) \end{align*}\]
The First Fundamental Theorem of Calculus states that
\[\begin{align*} f(x) = \dfrac{d}{dx} \displaystyle\int_a^x f(x) dx. \end{align*}\]
In other words, derivatives and integrals are inverse operations. Thus,
\[\begin{align*} \int\dfrac{d}{dx}\left(\tan(x)\right) dx &= \int \sec^2(x) dx\\ \dfrac{d}{dx} \int\left(\tan(x)\right) dx &= \int \sec^2(x) dx\\ \tan(x) &= \int \sec^2(x) dx \end{align*}\]
This means that the indefinite integral of $\sec^2(x)$ is $\tan x$. We are not done as we need to add the constant term, which is denoted $C$. This is because $\dfrac{d}{dx}(C) = 0$ for any constant $C$. As an example, it would be true that $\dfrac{d}{dx}(\tan(x) + 1) = \dfrac{d}{dx}(\tan(x) + 2)$. To account for the family of all solutions, we add $C$:
\[\begin{align*} \int \sec^2(x) dx = \boxed{\tan(x) + C}. \end{align*}\]