## Calculus: Early Transcendentals (2nd Edition)

$$\frac{1}{3}{\tan ^{ - 1}}\left( {\frac{{x + 3}}{3}} \right) + C$$
\eqalign{ & \int {\frac{{dx}}{{{x^2} + 6x + 18}}} \cr & {\text{completing the square}} \cr & = \int {\frac{{dx}}{{{x^2} + 6x + 9}}} = \int {\frac{{dx}}{{\left( {{x^2} + 6x + 9} \right) + 9}}} \cr & = \int {\frac{{dx}}{{{{\left( {x + 3} \right)}^2} + 9}}} \cr & u = x + 3,{\text{ }}du = dx \cr & = \int {\frac{{du}}{{{u^2} + 9}}} \cr & {\text{substitute }}u = 3\tan \theta ,{\text{ }}du = 3{\sec ^2}\theta d\theta \cr & \int {\frac{{du}}{{{u^2} + 9}}} = \int {\frac{{3{{\sec }^2}\theta d\theta }}{{{{\left( {3\tan \theta } \right)}^2} + 9}}} \cr & = \int {\frac{{3{{\sec }^2}\theta d\theta }}{{9{{\tan }^2}\theta + 9}}} = \int {\frac{{3{{\sec }^2}\theta d\theta }}{{9\left( {{{\tan }^2}\theta + 1} \right)}}} \cr & {\text{pythagorean identity}} \cr & = \int {\frac{{3{{\sec }^2}\theta d\theta }}{{9\left( {{{\sec }^2}\theta } \right)}}} = \frac{1}{3}\int {d\theta } \cr & {\text{integrating}} \cr & = \frac{1}{3}\theta + C \cr & u = 3\tan \theta \cr & = \frac{1}{3}{\tan ^{ - 1}}\left( {\frac{u}{3}} \right) + C \cr & u = x + 3 \cr & = \frac{1}{3}{\tan ^{ - 1}}\left( {\frac{{x + 3}}{3}} \right) + C \cr}