I need help integrating the following function:
$\int\frac{2x+5}{\sqrt{16-6x-x^2}}dx$
I need help integrating the following function:
$\int\frac{2x+5}{\sqrt{16-6x-x^2}}dx$
If you let $u=16-6x-x^2$, then $du=(-6-2x)dx=-(2x+6)~dx$. Now you can rewrite your integral:
$\begin{align*} \int\frac{2x+5}{\sqrt{16-6x-x^2}}dx&=\int\frac{(2x+6)-1}{\sqrt{16-6x-x^2}}dx\\ &=-\int\frac{du}{\sqrt{u}}-\int\frac1{\sqrt{16-6x-x^2}}dx\;. \end{align*}$
The first of these two integrals is an easy power rule integration. For the second, start by completing the square in the denominator:
$\begin{align*} \int\frac1{\sqrt{16-6x-x^2}}dx&=\int\frac1{\sqrt{-(x^2+6x-16)}}dx\\ &=\int\frac1{\sqrt{-\left((x+3)^2-25\right)}}dx\\ &=\int\frac1{\sqrt{25-(x+3)^2}}dx\;. \end{align*}$
Now make the trig substitution $x+3=5\sin\theta$.
The bit inside the square root is causing all the trouble, so let's look more closely at it. If we set $u=16-6x-x^2$, then $du=(-2x-6)dx$. Does that suggest what path you might take?
Hint for the last part of the solutions above:
$\frac{1}{\cos{x}}=\frac{d}{dx}\log({\tan{x}+\frac{1}{\cos{x}}})$