The following indefinite integral is a great exercise for students in introductory calculus since it requires most of the techniques they learn in order to integrate.
First rewrite the integral in order to use a trigonometric substitution.
$$ \int \sqrt{ x^2 + 6x + 5 } \ dx = \int \sqrt{ \left( x + 3 \right)^2 – 4 } \ dx $$
Substituting and simplifying yields
$$ x = 2 \sec \theta – 3 \hspace{ 20 mm } dx = 2 \sec \theta \tan \theta \ d \theta $$
$$ 2 \int \sqrt{ 4 \sec^2 \theta – 4 } \sec \theta \tan \ \theta d \theta $$
$$ 4 \left( \int \tan^2 \theta \sec \theta \ d \theta \right) = 4 \left( \int \left( \sec^2 \theta – 1 \right) \sec \theta \ d \theta \right) $$
From here we need to use integration by parts and the antiderivative of \( \sec \theta \). I assume the \( \int \sec \theta \ d \theta \) is known to the reader. If not, click here for a pop-out window solution.
$$4 \left( \int \sec^3 \theta \ d \theta – \int \sec \theta \ d \theta \right) = 4 \left( \int \sec^3 \theta \ d \theta – \ln \left| \sec \theta + \tan \theta \right| + C \right) $$
Using integration by parts
$$ \int \sec^3 \theta \ d \theta = \int \sec^2 \theta \sec \theta \ d \theta $$
$$ u = \sec \theta \hspace{20 mm } du = \sec \theta \tan \theta \ d \theta $$
$$ dv = \sec^2 \theta \ d \theta \hspace{20 mm } v = \tan \theta $$
$$ \int \sec^3 \theta \ d \theta = \sec \theta \tan \theta \ – \int \tan^2 \theta \sec \theta \ d \theta $$
$$ \int \sec^3 \theta \ d \theta = \sec \theta \tan \theta \ – \int \sec^3 \theta + \int \sec \theta \ d \theta $$
$$ \int \sec^3 \theta \ d \theta = \frac{1}2 \sec \theta \tan \theta + \frac{1}2 \ln \left| \sec \theta + \tan \theta \right| $$
Remembering to multiply through by 4
$$ 4 \int \sec^3 \theta \ d \theta = 2 \sec \theta \tan \theta + 2 \ln \left| \sec \theta + \tan \theta \right| $$
Reassembling the pieces of the original integral and simplifying
$$ 4 \left( \int \tan^2 \theta \sec \theta \ d \theta \right) = 2 \sec \theta \tan \theta + 2 \ln \left| \sec \theta + \tan \theta \right| \ – 4 \ln \left| \sec \theta + \tan \theta \right| + C $$
$$ 4 \left( \int \tan^2 \theta \sec \theta \ d \theta \right) = 2 \sec \theta \tan \theta – 2 \ln \left| \sec \theta + \tan \theta \right| + C $$
Substituting back in for \( x \)
$$ \int \sqrt{ x^2 + 6x + 5 } \ dx = \frac{ x + 3}{2} \sqrt{ x^2 + 6x + 5 } – 2 \ln \left| \frac{ x + 3 }{2} + \frac{ \sqrt{ x^2 + 6x + 5 } }2 \right| + K $$
Using log rules the ratio can be removed from the argument of the log function.
$$ \int \sqrt{ x^2 + 6x + 5 } \ dx = \frac{ x + 3}{2} \sqrt{ x^2 + 6x + 5 } – 2 \left( \ln \left| x + 3 + \sqrt{ x^2 + 6x + 5 } \right| – \ln \left| 2 \right| \right) + K $$
$$ \int \sqrt{ x^2 + 6x + 5 } \ dx = \frac{ x + 3}{2} \sqrt{ x^2 + 6x + 5 } – 2 \ln \left| x + 3 + \sqrt{ x^2 + 6x + 5 } \right| + 2 \ln \left| 2 \right| + K $$
$$ \int \sqrt{ x^2 + 6x + 5 } \ dx = \frac{ x + 3}{2} \sqrt{ x^2 + 6x + 5 } – 2 \ln \left| x + 3 + \sqrt{ x^2 + 6x + 5 } \right| + C_1$$
where \( C_1 = 2 \ln \left| 2 \right| + K \)