Prove $\int\cos^n x \ dx = \frac{1}n \cos^{n-1}x \sin x + \frac{n-1}{n}\int\cos^{n-2} x \ dx$
How about verifying using differentiation? We are asked to show $$\int_0^x \cos^n t dt = \frac{1}{n} \cos^{n-1} x \sin x + \frac{n-1}{n} \int^x_0 \cos^{n-2} t dt + C$$ for some constant $C$. This is true iff the derivatives of each side are equal.
Differentiating the right side, we get using the product rule $$RHS = \frac{n-1}{n} \cos^{n-2} x (-\sin x) \sin x + \frac{1}{n} \cos^{n-1} x \cos x + \frac{n-1}{n} \cos^{n-2} x,$$ then combining, $$RHS = \frac{n-1}{n} (1-\sin^2 x) \cos^{n-2} x + \frac{1}{n} \cos^n x$$ and finally using $\cos^2 x + \sin^2 x = 1$, $$RHS = \frac{n-1}{n}\cos^n x+\frac{1}{n} \cos^nx = \cos^n x,$$ which is the what we want.
I guess your problem is step four:
$$I_n = \sin x \ \cos^{n-1} x + (n-1)\int(1-\cos^2 x) \ \cos^{n-2} x \ dx \tag{4}$$
Note that $$\begin{align}\int(1-\cos^2 x) \ \cos^{n-2} x \ dx & = \int \cos^{n-2} x \ dx-\int \cos^2 x\; \cos^{n-2} x \ dx \\ & =\int \cos^{n-2} x \ dx-\int \cos^{n} x \ dx \end{align}$$
so we get
$$\begin{align}I_n & = \sin x \ \cos^{n-1} x + (n-1)\int \cos^{n-2} x \ dx-(n-1)\int \cos^{n} x \ dx \\ I_n & = \sin x \ \cos^{n-1} x + (n-1)I_{n-2}-(n-1)I_n \end{align}$$
or
$$nI_n = \sin x \ \cos^{n-1} x + (n-1)I_{n-2}$$
$$I_n =\frac{ \sin x \ \cos^{n-1} x}n + \frac{n-1}nI_{n-2}$$