Answer
$$\tan \theta + \sec \theta + C$$
Work Step by Step
$$\eqalign{
& \int {\left( {{{\sec }^2}\theta + \sec \theta \tan \theta } \right)} d\theta \cr
& {\text{sum rule}} \cr
& \int {{{\sec }^2}\theta } d\theta + \int {\sec \theta \tan \theta } d\theta \cr
& {\text{use the formula for indefinite integrals of trigonometric functions}} \cr
& \tan \theta + \sec \theta + C \cr
& {\text{check by differentiation}} \cr
& {\text{ = }}\frac{d}{{d\theta }}\left( {\tan \theta + \sec \theta + C} \right) \cr
& {\text{ = }}\frac{d}{{d\theta }}\left( {\tan \theta } \right) + \frac{d}{{d\theta }}\left( {\sec \theta } \right) + \frac{d}{{d\theta }}\left( C \right) \cr
& = {\sec ^2}\theta + \sec \theta \tan \theta + 0 \cr
& = {\sec ^2}\theta + \sec \theta \tan \theta \cr} $$