Use Integration by parts to prove the following reduction formula... Use integration by parts to prove the reduction formula $$\int\sin^n(x)\ dx = - {\sin^{n-1}(x)\cos(x)\over n}+{n-1\over n}\int\sin^{n-2}(x)\ dx$$
So I'm definitely on the right track because I'm very close to this result, and I also found an example of this exact question in one of my textbooks.
I made f(x)=$\sin^{n-1}(x)$ and g'(x)=$\sin(x)$. And with that I got to the point of having 
$\int\sin^n(x)\ dx = - \sin^{n-1}(x)\cos(x)+(n-1)\int\cos^2(x)\sin^{n-2}(x)\ dx$
(sorry I haven't shown how I got to this stage, It's taking me way too long to write out these formulas, but the textbook done the same thing)
Then the textbook then uses the identity $\cos^2(x)=1-\sin^2(x)$. 
Which would give: 
$\int\sin^n(x)\ dx = - \sin^{n-1}(x)\cos(x)+(n-1)\int(1-\sin^2(x))\sin^{n-2}(x)\ dx$
And then I would have thought expanding that last integral would give
$\int\sin^n(x)\ dx = - \sin^{n-1}(x)\cos(x)+(n-1)\int\sin^{n-2}(x)-\int\sin^n(x))\\ dx$
However the textbook says you should get
$\int\sin^n(x)\ dx = - \sin^{n-1}(x)\cos(x)+(n-1)\int\sin^{n-2}(x)-(n-1)\int\sin^n(x))\\ dx$
Lots of information but essentially my question is just this, where did that extra (n-1) come from? I can't figure it out and its preventing me from finishing the question.
Thanks in advance :)
 A: the $n-1$ term is multiplying everything against the integral on the right hand side; namely the term
\begin{equation}
(n-1)\left(\int(1-\sin^2(x))\sin^{n-2}(x)dx\right) 
\end{equation} 
As such once multiplied out; the $n-1$ term appears agains the $-\int \sin^{n}(x)dx$ term too.
A: Let $$\displaystyle I_{n} = \int \sin^n xdx = \int \sin^{n-1}x\cdot \sin xdx $$
Now Using Integration by parts , we get
$$\displaystyle I_{n}  = -\sin^{n-1}x\cdot \cos x+(n-1)\int \sin^{n-2}x\cdot \cos x\cdot \cos xdx$$
So we get $$\displaystyle I_{n}  = -\sin^{n-1}x\cdot \cos x+(n-1)\int \sin^{n-2}x\cdot \cos^ 2x\cdot dx$$
So $$\displaystyle I_{n}  = -\sin^{n-1}x\cdot \cos x+(n-1)\int \sin^{n-2}x\cdot \left(1-\sin^ 2 x\right)dx$$
So $$\displaystyle I_{n}  = -\sin^{n-1}x\cdot \cos x+(n-1)\int \sin^{n-2}xdx-(n-1)\int \sin^2 xdx$$
So $$\displaystyle I_{n} = -\sin^{n-1}x\cdot \cos x+(n-1)I_{n-2}-(n-1)I_{n}$$
So $$\displaystyle (1+n-1)I_{n} = -\sin^{n-1}x\cdot \cos x+(n-1)I_{n-2}$$
So $$\displaystyle I_{n} = -\frac{1}{n}\sin^{n-1}x\cos x+\frac{n-1}{n}I_{n-2}$$
A: Yes you are on the right track.
We have
$$
\int_{x} \sin^{n}x = -\int_{x}\sin^{n-1}x D\cos x = -\cos x \sin^{n-1}(x) + (n-1) \int_{x} \cos^{2}x \sin^{n-2}x =\\ -\cos x\sin^{n-1}x + {\color{red}{(n-1)\int_{x}(1-\sin^{2}x)\sin^{n-2}x}}.
$$
