The following is what I have tried to prove the reduction formula of $\tan^n(\theta)$.

For the last step, how to convert the $\int sec^2(\theta) tan^{n-1}(\theta)d\theta $ to $\frac {tan^{n-1}\theta}{n-1}$?
Thank you for your help.
The following is what I have tried to prove the reduction formula of $\tan^n(\theta)$.

For the last step, how to convert the $\int sec^2(\theta) tan^{n-1}(\theta)d\theta $ to $\frac {tan^{n-1}\theta}{n-1}$?
Thank you for your help.
HINT: Since $$\frac{d}{d\theta}\tan \theta=\sec^2\theta$$, you have $$\int \sec^2\theta \tan^{n-2}\theta\ d\theta=\int \tan^{n-2}\theta\ d(\tan\theta)$$