How to Find the Recurrence Formula for $\int \frac{dx} {(1+\sin x)^n}$? 
$$\int \frac{dx} {(1+\sin x)^n}$$

I know that I should use the following step:

$$\int\frac{\sin^2(x)\, dx}{(1+\sin x)^n} +\int\frac{\cos^2(x)\, dx} {(1+\sin x)^n} $$

but here I get stuck. I do not know how shall I proceed.

Let $I_n$ be the sequence given by the integral 
$$I_n=\int \frac{1}{(1+\sin(x))^n}\,dx \tag 1$$
First, we enforce the substitution $x=2y+\pi/2$ into $(1)$ to obtain
$$I_n=\int \frac{2}{(1+\cos(2y))^n}\,dy \tag 2$$
Noting that $1+\cos(2y)=2\cos^2(y)$, we write $(2)$ as
$$I_n=\frac{1}{2^{n-1}}\int \sec^{2n}(y)\,dy$$
Next, we integrate by parts with $u=\sec^{2n-2}(y)$ and $v=\tan(y)$ to obtain
$$\begin{align}
I_n&=\frac{1}{2^{n-1}}\left(\sec^{2n-2}(y)\tan(y)-(2n-2)\int \sec^{2n-2}(y)\tan^2(y)\,dy \right)\\\\
&=\frac{1}{2^{n-1}}\left(\sec^{2n-2}(y)\tan(y)-(2n-2)2^{n-1}I_n+(2n-2)2^{n-2}I_{n-1} \right)\\\\
&=\frac{n-1}{2n-1}I_{n-1}+\left(\frac{1}{2^{n-1}(2n-1)}\right)\,\sec^{2n-2}(x/2-\pi/4)\tan(x/2-\pi/4)
\end{align}$$
