# How do you evaluate the integral of int sqrt (x^2 + 2x) dx?

Jun 12, 2018

$\int \sqrt{{x}^{2} + 2 x} \mathrm{dx} = \frac{\left(x + 1\right) \sqrt{{x}^{2} + 2 x}}{2} - \frac{1}{2} \ln \left\mid \left(x + 1\right) + \sqrt{{x}^{2} + 2 x} \right\mid + C$

#### Explanation:

Complete the square:

$\int \sqrt{{x}^{2} + 2 x} \mathrm{dx} = \int \sqrt{{x}^{2} + 2 x + 1 - 1} \mathrm{dx} = \int \sqrt{{\left(x + 1\right)}^{2} - 1} \mathrm{dx}$

Substitute $x + 1 = \sec t$, $\mathrm{dx} = \sec t \tan t \mathrm{dt}$, with $t \in \left(0 , \frac{\pi}{2}\right)$:

$\int \sqrt{{x}^{2} + 2 x} \mathrm{dx} = \sqrt{{\sec}^{2} t - 1} \sec t \tan t \mathrm{dt}$

Using the trigonometric identity ${\sec}^{2} t - 1 = {\tan}^{2} t$ and as $\tan t > 0$ for $t \in \left(0 , \frac{\pi}{2}\right)$:

$\int \sqrt{{x}^{2} + 2 x} \mathrm{dx} = \int \sqrt{{\tan}^{2} t} \sec t \tan t \mathrm{dt}$:

$\int \sqrt{{x}^{2} + 2 x} \mathrm{dx} = \int \sec t {\tan}^{2} t \mathrm{dt}$

$\int \sqrt{{x}^{2} + 2 x} \mathrm{dx} = \int \sec t \left({\sec}^{2} - 1\right) \mathrm{dt}$

$\int \sqrt{{x}^{2} + 2 x} \mathrm{dx} = \int {\sec}^{3} t \mathrm{dt} - \int \sec t \mathrm{dt}$

Now the first integral is:

$\int \sec t \mathrm{dt} = \int \sec t \frac{\sec t + \tan t}{\sec t + \tan t} \mathrm{dt}$

$\int \sec t \mathrm{dt} = \int \frac{{\sec}^{2} t + \sec t \tan t}{\sec t + \tan t} \mathrm{dt}$

$\int \sec t \mathrm{dt} = \int \frac{d \left(\sec t + \tan t\right)}{\sec t + \tan t} \mathrm{dt}$

$\int \sec t \mathrm{dt} = \ln \left\mid \sec t + \tan t \right\mid + c$

and for the second we can integrate by parts

$\int {\sec}^{3} t \mathrm{dt} = \int \sec t {\sec}^{2} t \mathrm{dt} = \int \sec t \frac{d}{\mathrm{dt}} \left(\tan t\right) \mathrm{dt}$

$\int {\sec}^{3} t \mathrm{dt} = \sec t \tan t - \int \tan t \frac{d}{\mathrm{dt}} \left(\sec t\right) \mathrm{dt}$

$\int {\sec}^{3} t \mathrm{dt} = \sec t \tan t - \int \sec t {\tan}^{2} t \mathrm{dt}$

$\int {\sec}^{3} t \mathrm{dt} = \sec t \tan t - \int \sec t \left({\sec}^{2} - 1\right) \mathrm{dt}$

$\int {\sec}^{3} t \mathrm{dt} = \sec t \tan t - \int {\sec}^{3} t \mathrm{dt} + \int \sec t \mathrm{dt}$

The integral appears on both sides of the equation and we can solve for it:

$\int {\sec}^{3} t \mathrm{dt} = \frac{\sec t \tan t}{2} + \frac{1}{2} \int \sec t \mathrm{dt}$

Putting it together:

$\int \sqrt{{x}^{2} + 2 x} \mathrm{dx} = \frac{\sec t \tan t}{2} - \frac{1}{2} \ln \left\mid \sec t + \tan t \right\mid + C$

To undo the substitution:

$\sec t = x + 1$

$\tan t = \sqrt{{\sec}^{2} - 1} = \sqrt{{\left(x + 1\right)}^{2} - 1} = \sqrt{{x}^{2} + 2 x}$

Finally:

$\int \sqrt{{x}^{2} + 2 x} \mathrm{dx} = \frac{\left(x + 1\right) \sqrt{{x}^{2} + 2 x}}{2} - \frac{1}{2} \ln \left\mid \left(x + 1\right) + \sqrt{{x}^{2} + 2 x} \right\mid + C$