Let $ f(x) = \large\frac{\cos x}{1+\sin x}$

By quotient rule,

$f'(x) = \large\frac{(1+ \sin x) \large\frac{d}{dx} (\cos x)-(\cos x) \large\frac{d}{dx}(1+ \sin x)}{(1+ \sin x)^2}$

$ = \large\frac{(1+\sin x) (-\sin x)-(\cos x)(\cos x)}{(1+\sin x)^2}$

$ = \large\frac{-\sin x - \sin^2x-\cos^2x}{(1+\sin x)^2}$

$ = \large\frac{-\sin x -(\sin ^2x+ \cos^2x)}{(1+\sin x)^2}$

$ = \large\frac{-\sin x-1}{(1+ \sin x)^2}$

$ = \large\frac{-( 1+\sin x)}{(1+\sin x)^2}$

$ = \large\frac{-1}{(1+ \sin x)}$