I am stuck on how to integrate the following: $$\int_0^1 x^{a-1} (1-x)^{-a} dx$$ where $a \in (0,1)$. I am aware that this is a variant of the Euler gamma/beta functions and will be equal to $\pi/\sin(a \pi)$. However, I would like to derive this result without using this. After doing a substitution with $e^t = 1/(1-x)$, the integral transforms into $$\int_0^\infty \frac{dt}{(e^t-1)^{1-a}}.$$ I tried using a standard keyhole integral with the branch cut on the positive real line, but I run into issues with the fact that the residues apparently aren't defined. How do I tackle integrals like this?
On a similar note, what is the general technique for integrating something more general, like $$\int_0^1 x^a (1-x)^b dx$$ for real valued $a,b$? I tried doing something with a modified keyhole around the singularities at $0$ and $1$ which agrees with this reference (https://math.mit.edu/classes/18.305/Notes/n00Branch_Points_B_Cuts.pdf), but I keep getting answers that are nonsensical.
Editing to add: the integral in question was originally posed on my department's complex analysis qualifying exam from a couple years ago, with the specific instructions to not use the gamma and beta functions and I was not successful with this.