Decompose $\frac{1}{a \sin x +b}$ into sum of trigonometric functions I am wondering if it is possible to write
$$f(x)=\frac{1}{a \sin x +b}$$
as a sum of functions that don't have trigonometric functions in the denominator? Or just pure trigonometric functions, without a constant added. So maybe something like this:
$$\frac{1}{a \sin x +b}=A\sin^3 x \cos^2x + B\sin x \cos ^4 x + C\frac{1}{\cos x}+ D\frac{\cos^2 x }{\sin x}+\dots $$
The reason I'm asking is that I need to integrate products of $f(x)$ with powers $\cos^n x$, and it would be really neat to get rid of the constant in the denominator, as integrals of the form $\int\frac{\cos^n x}{a \sin x +b}dx$ are extremely hard to solve, whereas integral tables contain solutions to $\int \sin^p x \cos^q x dx$ and similar integrals.
One potential starting point could be
$$\frac{1}{a \sin x +b}=\frac{a \sin x -b}{(a \sin x +b)(a \sin x -b)}=\frac{a \sin x -b}{(a^2 \sin^2 x -b^2)}=...$$
with the goal to eventually make the replacement $\sin^2 x +\cos^2 x =1$. Can such a method be formalized? Or is the decomposition I have in mind provable not possible? Thanks for your help!
 A: Consider
$$f(x)=\frac{1}{\sin (x)+k}$$
If $k\ll 1$, you could use  expansions and write
$$f(x)=\sum_{n=0}^\infty (-1)^n \csc^{n+1} (x)\,k^n$$
If $k\gg 1$, you could use  expansions and write
$$f(x)=\sum_{n=0}^\infty (-1)^n \sin^{n}(x) \,k^{-(n+1)} $$
A: Assume $b>a$ such that $b+a\sin(x)\ne0$. Then, per the Fourier series
$$\frac{\sqrt{b^2-a^2}}{b+a\sin(x)}=1+2\sum_{n=1}^{\infty}\left(\frac{\sqrt{b^2-a^2}-b}{a}\right)^n[\sin\frac{n\pi}2\sin{(nx )}+ \cos\frac{n\pi}2\cos{(nx )} ]$$
A: An idea for a solution just came to my mind, which I am going to post here hoping it might be useful for somebody in the future. Unfortunately, the condition doesn't work in my case, so that I might go with the Fourier series solution. But for $a\geq b$, we can write
$$\frac{1}{a \sin x +b}=\frac{1}{a}\frac{1}{\sin x +\frac{b}{a}}=\frac{1}{a}\frac{1}{\sin x +\sin\left(\arcsin\left(\frac{b}{a}\right)\right)}=\frac{1}{a}\frac{1}{2\sin\left(\frac{x+\arcsin\left(\frac{b}{a}\right)}{2}\right) \cos\left(\frac{x-\arcsin\left(\frac{b}{a}\right)}{2}\right)}.$$
Trigonometric expansion with Mathematica yields
$$\frac{1}{2\sin\left(\frac{x+\arcsin\left(\frac{b}{a}\right)}{2}\right) \cos\left(\frac{x-\arcsin\left(\frac{b}{a}\right)}{2}\right)}\\=\frac{1}{2} \sec \left(\frac{c}{2}\right) \sec (c) \sin \left(\frac{x}{2}\right) \sec \left(\frac{c}{2}-\frac{x}{2}\right)-\frac{1}{2} \csc \left(\frac{c}{2}\right) \sec (c) \sin \left(\frac{x}{2}\right) \csc \left(\frac{c}{2}+\frac{x}{2}\right)+\csc (c)$$
with $c=\arcsin\left(\frac{b}{a}\right)$.
