Math Help - Trig Substitution with Completing the Square

1. Trig Substitution with Completing the Square

Integral of:

$dx/(sqrt(x^2+2x+65)$

I completed the square on the denominator to rewrite it as:

$sqrt((x+1)^2+64)$

When I try to solve this, I let:

$u=x+1$
$du=dx$

So we get the integral of:

$du/sqrt(u^2+64)$

Then I set:
$u=8tan(theta)$
$du=8sec^2(theta)d(theta)$

This simplifies to just the integral of:

$sec(theta)d(theta)$

The integral of this is:

$ln(abs(tan(theta)sec(theta)) + C$

When I setup a right triangle, I get the following sides:

Hypotenuse:sqrt((x+1)^2+64)
Opposite: x+1

When I use these values to replace tan(theta) and sec(theta) my final answer is:

$ln(abs((x+1)/8) * (sqrt((x+1)^2+64)/8)) + C$

However, the online website has a different answer. It has the same basic terms but without dividing by 8. Where am I going wrong?

2. Re: Trig Substitution with Completing the Square

The two forms are equivalent, as you may write:

$\ln\left(\frac{f(x)}{8} \right)+C=\ln(f(x))-\ln(8)+C=\ln(f(x))+C$

Since $\ln(8)$ in a constant, it may be combined with the constant of integration.

3. Re: Trig Substitution with Completing the Square

Hello, vesperka!

Your final line should have a Plus (+).

$\ln\left|\frac{x+1}{8} + \frac{\sqrt{x^2+2x +65}}{8}\right| + C$

However, the online website has a different answer.
It has the same basic terms but without dividing by 8.

They did some "invisible" (very sneaky) simplifying.

You had: . $\ln\left|\frac{x+1}{8} + \frac{\sqrt{x^2+2x +65}}{8}\right| +\;c$

. . . . . . $=\;\ln\left|\frac{x+1 + \sqrt{x^2+2x+65}}{8}\right| +\; c$

. . . . . . $=\;\ln\left|x + 1 + \sqrt{x^2 + 2x + 65}\right|\; - \underbrace{\ln(8)\;+\;c}_{\text{This is a constant}}$

. . . . . . $=\;\ln\left|x + 1 + \sqrt{x^2+2x+65}\right| + C$

Yes . . . just one more thing to watch for.

4. Re: Trig Substitution with Completing the Square

Thanks for the replies guys. I didn't realize this, but for the integral of sec(theta) I was multiplying the tangent and secant inside of the natural log when they actually should be added together. Thanks for the explanation on why -ln(8) is a constant that can be factored out!