\[\begin{align*} \boxed{\int \sec(2x) \: dx = \frac{1}{2}\ln \left|\tan \left(2x\right)+\sec \left(2x\right)\right|+C} \end{align*}\]
where \( C \) is the constant of integration.
Solving for the Integral
To solve many integrals that involve composite functions, we turn to $u$-substitution. It is a little easier to work with $\sec(x)$ instead so we set $u = 2x$ and $du = 2 \: dx$.
\[\begin{align*} \int \sec(2x) \: dx &= \int \dfrac12 \sec u \: du\\ &= \dfrac12 \int \sec u \: du\\ \end{align*}\]
If you already know the integral of $\sec u$, then the result is immediate. Assuming we do not know this common trigonometric integral, we may proceed by multiplying our integrand with $\dfrac{\sec u + \tan u}{\sec u + \tan u}$ and setting another substitution, $v = \sec u + \tan u$ and $dv = \sec u \tan u + \sec^2 u \: du$.
\[\begin{align*} \int \sec(2x) &= \dfrac12 \int \sec u \cdot \dfrac{\sec u + \tan u}{\sec u + \tan u} \: du\\ &= \dfrac12 \int \dfrac1v \: dv\\ &= \dfrac12 \ln |v| + C\\ &= \dfrac12 \ln|\tan u + \sec u| + C\\ &= \boxed{\dfrac12 \ln|\tan(2x) + \sec (2x)| + C} \end{align*}\]
Note on $\sec x$
While not too difficult to figure out the integral of $\sec x$ on your own, it is much easier to memorize common trigometric integrals such as $\sec x$ as sometimes the steps to solve the integral are unintuitive, such as the multiplication by $\dfrac{\sec u + \tan u}{\sec u + \tan u}$. We recommend memorizing all the standard trig integrals for an easier time in solving problems such as these!