Is there a way to integrate $$\int_{-1}^1\frac{1}{a + bx }dx,\,\,\,\,(*) $$ where $a,b\in \mathbb{C}$ without using branch-cuts? I was approached with such an integral relatively early in my text, and there has not been a formal treatment on branch cuts or complex $log$, etc. This integral came from a problem in which I had to integrate a non-holomorphic function over a rectangle. I split the integral into four parts (along the sides) and some of the integrals were of the form $(*)$.
Attempt 1: $\int_{-1}^1\frac{1}{a + bx }dx=\frac{1}{b}\log(a+bx)\Bigg\vert_{-1}^{1}$ but since $a,b\in \mathbb{C}$, this isn't correct since I am not choosing a branch of log (i.e., $\log z$ is not well-defined).
Attempt 2: An idea that occurred is that I can try to rewrite this integral as another integral of a different function along a different curve, but I don't see how to do that in a nice way. I am used to writing contour integrals as (standard) integrals on closed intervals in the real line, not the other way around.
Any answer is appreciated, but I would like something that can apply to other integrals that a calculus student could not do correctly or is computationally feasible.
Here is an approach which avoids branch cuts. However, I'm sure there is a simpler way to this, but the approach atleast show how one can go about to realify complex integrals. Assuming $b\not= 0$ and that not both of $a$ and $b$ are real (for which it becomes trivial).
First write $\frac{a}{b} = A + iB$ then by using $(x+A+iB)(x+A-iB)=(x+A)^2 + B^2$ we get
$$I = \int_{-1}^{1}\frac{dx}{bx + a} = b^{-1}\int_{-1}^{1}\frac{dx}{x + A + iB} = b^{-1}\int_{-1}^{1}\frac{(x+A-iB)dx}{(x + A)^2 + B^2}$$
if we now write $b^{-1} = C + iD$ then
$$I = \int_{-1}^{1}\frac{(Cx+AC+BD)dx}{(x + A)^2 + B^2} + i \int_{-1}^{1}\frac{(Dx+AD-BC)dx}{(x + A)^2 + B^2}$$
which is now just two real integrals. These can be solved by making the substitution $z = \frac{x+A}{B}$ which gives
$$I = \int_{-1/B + A/B}^{1/B+A/B}\frac{(Cz+ D)}{z^2 + 1} + i \frac{(Dz-C)}{z^2 + 1}dz$$
and which evaluates to
$$I = \left[\frac{b^{-1}}{2}\log(1+z^2) - ib^{-1}\arctan z\right]_{-1/B + A/B}^{1/B+A/B}$$
since $\int \frac{dz}{1+z^2}=\arctan z$ and $\int \frac{2zdz}{1+z^2} = \log(1+z^2)$. Written out this gives the expected result
$$I = \frac{b^{-1}}{2}\log\left|\frac{1 + \frac{a}{b}}{-1 + \frac{a}{b}}\right| - ib^{-1}\left(\arctan \left(\frac{A+1}{B}\right)-\arctan \left(\frac{A-1}{B}\right)\right)$$
since $\arctan\frac{A\pm 1}{B}$ is the argument of $\pm 1 + \frac{a}{b}$.