Classify $I(a,b)=\int_{0}^{\frac{\pi}{2}} \frac{dx}{\sin(x)^a\cos(x)^b}$ with $a,b\in \mathbb{R}$.
I'm really lost, this excercise is so different from the others and I can't find any similar questions online, the integral seems to converge if -1< a+b <1 with some exceptions that I can't figure out.
Edit: I solved it using user Greg Martin advice but I can't mark it as if he solved my problem so I'll credit him here.
HINT:
The function $f$, defined as
$$f(x)=\begin{cases} \frac{x}{\sin(x)}&,x\ne 0\\\\1&, x=0\end{cases}$$
is analytic on $[0,\pi,2]$.
Now, write $\frac{1}{(\sin(x))^a}=\left(\frac{x}{\sin(x)}\right)^a\,\frac1{x^a}$.
Similarly, $\cos(x)=\sin(\pi/2-x)$
Can you proceed?