a. To rewrite \(\sqrt{g(x)}\) in the form \(\sqrt{b^2 - (x+a)^2}\), we need to complete the square for the quadratic expression \(15 - 2x - x^2\).
b. For the trigonometric substitution, we can use \(x + a = b \sin(\theta)\) where \(b\) and \(a\) are constants determined from the completed square form. Then, we substitute and integrate using trigonometric identities and finally convert back to \(x\).
Given \( g(x) = 15 - 2x - x^2 \), we need to rewrite it in the form \(\sqrt{b^2 - (x + a)^2}\).
First, complete the square for \( g(x) \):
\[
g(x) = 15 - 2x - x^2 = -\left(x^2 + 2x - 15\right)
\]
Complete the square inside the parentheses:
\[
x^2 + 2x - 15 = (x^2 + 2x + 1) - 1 - 15 = (x + 1)^2 - 16
\]
Thus,
\[
g(x) = -\left((x + 1)^2 - 16\right) = 16 - (x + 1)^2
\]
So,
\[
\sqrt{g(x)} = \sqrt{16 - (x + 1)^2}
\]
We use the trigonometric substitution \( x + 1 = 4 \sin \theta \). Then,
\[
dx = 4 \cos \theta \, d\theta
\]
Substitute \( x + 1 = 4 \sin \theta \) into the integral:
\[
\int \frac{x}{\sqrt{16 - (x + 1)^2}} \, dx = \int \frac{4 \sin \theta - 1}{\sqrt{16 - 16 \sin^2 \theta}} \cdot 4 \cos \theta \, d\theta
\]
Simplify the square root:
\[
\sqrt{16 - 16 \sin^2 \theta} = \sqrt{16 (1 - \sin^2 \theta)} = \sqrt{16 \cos^2 \theta} = 4 \cos \theta
\]
The integral becomes:
\[
\int \frac{4 \sin \theta - 1}{4 \cos \theta} \cdot 4 \cos \theta \, d\theta = \int (4 \sin \theta - 1) \, d\theta
\]
Separate the integral:
\[
\int 4 \sin \theta \, d\theta - \int 1 \, d\theta
\]
Evaluate each part:
\[
\int 4 \sin \theta \, d\theta = -4 \cos \theta
\]
\[
\int 1 \, d\theta = \theta
\]
Thus, the integral is:
\[
-4 \cos \theta - \theta + C
\]
Recall the substitution \( x + 1 = 4 \sin \theta \):
\[
\sin \theta = \frac{x + 1}{4}
\]
Using the right triangle, we have:
\[
\cos \theta = \sqrt{1 - \sin^2 \theta} = \sqrt{1 - \left(\frac{x + 1}{4}\right)^2} = \sqrt{\frac{16 - (x + 1)^2}{16}} = \frac{\sqrt{16 - (x + 1)^2}}{4}
\]
So,
\[
\cos \theta = \frac{\sqrt{16 - (x + 1)^2}}{4}
\]
And,
\[
\theta = \arcsin \left(\frac{x + 1}{4}\right)
\]
Substitute back into the integral:
\[
-4 \cos \theta - \theta + C = -4 \left(\frac{\sqrt{16 - (x + 1)^2}}{4}\right) - \arcsin \left(\frac{x + 1}{4}\right) + C
\]
Simplify:
\[
-\sqrt{16 - (x + 1)^2} - \arcsin \left(\frac{x + 1}{4}\right) + C
\]
\[
\boxed{-\sqrt{16 - (x + 1)^2} - \arcsin \left(\frac{x + 1}{4}\right) + C}
\]