Step 1: Complete the square for the denominator
The expression inside the square root is \(x^2 + 6x\). Completing the square: \[ x^2 + 6x = (x+3)^2 - 9. \] So, the integral becomes: \[ \int \frac{2x+1}{\sqrt{(x+3)^2 - 9}}\,dx. \]
Step 2: Substitution
Let \( u = x + 3 \), so that \( du = dx \). Substituting into the integral: \[ \int \frac{2(x+3) - 5}{\sqrt{(x+3)^2 - 9}}\,dx = \int \frac{2u - 5}{\sqrt{u^2 - 9}}\,du. \] Now, separate the integral: \[ \int \frac{2u}{\sqrt{u^2 - 9}}\,du - 5\int \frac{1}{\sqrt{u^2 - 9}}\,du. \]
Step 3: Solve the first integral
For the first integral, use the substitution \( v = u^2 - 9 \) with \( dv = 2u\,du \), which simplifies to: \[ \int \frac{2u}{\sqrt{u^2 - 9}}\,du = \sqrt{u^2 - 9}. \]
Step 4: Solve the second integral
For the second integral, use the standard result: \[ \int \frac{1}{\sqrt{u^2 - 9}}\,du = \text{arcosh}\left(\frac{u}{3}\right). \]
Step 5: Final solution
Substituting back \( u = x + 3 \) into both integrals: \[ \sqrt{(x+3)^2 - 9} - 5 \, \text{arcosh}\left(\frac{x+3}{3}\right) + C. \]
Final Answer:
\[ \sqrt{x^2 + 6x + 9 - 9} - 5 \, \text{arcosh}\left(\frac{x+3}{3}\right) + C \] \[ = \sqrt{x^2 + 6x} - 5 \, \text{arcosh}\left(\frac{x+3}{3}\right) + C. \]