I was given the following problem: $$\int\sqrt{1-7w^2}\ dw$$ I used the sin substitution - getting $w=\frac1{\sqrt{7}}\sin\theta$. I then needed to change the $dw$ to a $d\theta$, so I got this: $dw=\frac1{\sqrt{7}}\cos\theta\ d\theta$. My new problem looks like this: $$\int\sqrt{1-7(\frac1{\sqrt{7}}\sin\theta)^2}(\frac1{\sqrt{7}}\cos\theta)\ d\theta$$
Continuing, I get: $$\int\sqrt{1-\sin^2\theta}(\frac1{\sqrt{7}}\cos\theta)\ d\theta$$ $$=\int\sqrt{\cos^2\theta}(\frac1{\sqrt{7}}\cos\theta)\ d\theta$$$$=\int\frac1{\sqrt7}|\sin^2\theta|\cos\theta\ d\theta$$ If I now set $u=\sin\theta$ I get: $$\frac1{\sqrt7}\int u^2 \ du$$$$=\frac1{3\sqrt7}u^3$$$$=\frac{\sin\theta}{3\sqrt7}+c$$
This is not the correct answer. Why not? Where did I go wrong? What is the proper way to do a problem like this one?
Let us consider the general case where $a > 0$, $b > 0$, $a^{2}-b^{2}x^{2} \geq 0$ and $a/b \leq 1$: \begin{align*} \int\sqrt{a^{2} - b^{2}x^{2}}\mathrm{d}x \end{align*}
According to the substitution $\displaystyle x = \frac{a\sin(\theta)}{b}$, we get $\displaystyle\mathrm{d}x = \frac{a\cos(\theta)}{b}\mathrm{d}\theta$. Thus we have \begin{align*} \int\sqrt{a^{2}-b^{2}x^{2}}\mathrm{d}x & = a\int\sqrt{\displaystyle 1 - \left(\frac{bx}{a}\right)^{2}} = \frac{a^{2}}{b}\int\sqrt{1 - \sin^{2}(\theta)}\cos(\theta)\mathrm{d}\theta\\\\ & = \frac{a^{2}}{b}\int\cos^{2}(\theta)\mathrm{d}\theta = \frac{a^{2}}{b}\int\frac{\cos(2\theta) + 1}{2}\mathrm{d}\theta\\\\ & = \frac{a^{2}}{b}\left[\frac{\sin(2\theta)}{4} + \frac{\theta}{2}\right] = \left[\frac{x\sqrt{a^{2}-b^{2}x^{2}}}{2} + \frac{a^{2}\arcsin\left(\displaystyle\frac{bx}{a}\right)}{2b}\right] \end{align*}
In your case, $a = 1$ and $b = \sqrt{7}$.