Integral of complex function over the real line

I want to calculate the following integral

$$\int_{-1}^1\frac i{-1+it}dt.$$

I tried it by substitution of the denominator but didn't get the correct result. I think i can't substitute a complex function like a real function? Sorry for this simple question, but i've never done such an integral and don't know how to approach. I hope i can calculate it by myself with a little help.

Thx

• Multiply numerator and denominator by $-1-it$ Commented Sep 7, 2021 at 8:55
• You can decompose the integrand in a real and an imaginary part, and integrate separately as real integrals. Using a change of variable is indeed more tricky, as the integration path is no more along the real axis. But for analytic functions, the fundamental theorem of calculus still holds.
– user958916
Commented Sep 7, 2021 at 9:27

Hint $$:$$ $$\frac {d} {dt} (-1 + it) = i.$$ Take an appropriate analytic branch of logarithm to conclude. For instance you could have taken the branch of logarithm on the branch cut $$\mathbb C \setminus \{z \geq 0\}.$$ Recall that the argument in this branch cut will lie in $$(-2 \pi, 0).$$ You could equivalently take any branch cut obtained from the complex plane by deleting any half ray from the origin lying entirely on the right half plane or any branch cut obtained from the complex plane by deleting any half ray from the origin lying on the left half plane which doesn't intersect the line joining $$[-1-i,-1+i].$$

If $$\ell$$ is the branch of logarithm with branch of argument $$\theta$$ on $$\mathbb C \setminus \{z \geq 0\}$$ then by complex analytic analogue of second fundamental theorem of calculus we have \begin {align*} \int_{-1}^{1} \frac {i} {-1 + it}\ dt & = \ell (-1 + i) - \ell (-1 - i) \\ & = i (\theta (-1 + i) - \theta (-1 - i))\ \ (\because \ln (|-1 + i|) = \ln (|-1 - i|)) \\ & = i\left (-\frac {5 \pi} {4} + \frac {3 \pi} {4} \right ) \\ & = - \frac {\pi} {2} i. \end{align*}

\begin{align}\int_{-1}^1\frac i{-1+it}dt&=\int_{-1}^1\frac {t-i}{1+t^2}\\&=\int_{-1}^1\frac t{1+t^2} - \int_{-1}^1\frac i{1+t^2}\\&=\left[\frac 12 \ln(1+t^2)\right]_{-1}^1-i \left[\arctan t\right]_{-1}^1\\&=-\frac \pi2i \end{align}