I ran into a question with proving the reduction formula: $$ \int \cos^n x \ dx = \frac{1}{n}\cos^{n-1}x\sin x + \frac{n-1}{n}\int\cos^{n-2}x \ dx $$ I then attempted to prove by differentiation with respect to $x$, but something strange happened (have I just violated the Fundamental Theorem of Calculus?)
After differentiation, the resulting expression is:
$\displaystyle\cos^n x=\bigg[\frac{1}{n}\bigg]\bigg[(n-1)\cos^{n-2}x(-\sin x)(\sin x)+\cos^{n-1}x\cos x+\frac{n-1}{n}\cos^{n-2}x\bigg]$
$\displaystyle=\bigg[\frac{n-1}{n}\cos^{n-2}x\bigg]\bigg[\cos^2x+\cos^n x\bigg]$
$\displaystyle \frac{n-1}{n}\bigg[\cos^nx+\cos^{2n-2}x\bigg]$
Edit: I corrected the derivative, but problem not solved.