# Help with understanding the evaluation of a real integral using complex analysis

This morning I decided to look up some complex analysis, and I came across this Wikipedia section, where the following integral is evaluated:

$$\int_0^3 \frac{x^{3/4}(3-x)^{1/4}}{5-x}dx$$

There are a couple things I do not quite understand and I was wondering whether someone could clear them up for me. For convenience I shall copy and paste the sections that are troubling me.

Here is the drawing alongside:

We will construct $f(z)$ so that it has a branch cut on $[0, 3]$, shown in red in the diagram. To do this, we choose two branches of the logarithm, setting $z^{\frac{3}{4}} = \exp \left (\frac{3}{4}\log(z) \right )$ where $-\pi \le \arg(z) < \pi$ and $(3-z)^{\frac{1}{4}} = \exp \left (\frac{1}{4} \log(3-z) \right )$ where $0 \le \arg(3-z) < 2\pi$

• I don't understand the branch choice. Looking at the contour, I would have written the opposite: $0\leq \arg z<2\pi$ and $-\pi\leq \arg (3-z)<\pi$. Why is this flawed thinking? Sorry if that's a very silly question.

Let $z=r$ (in the limit, i.e. as the two green circles shrink to radius zero), where $0 ≤ r ≤ 3$. Along the upper segment, we find that $f(z)$ has the value: $$r^{\frac{3}{4}} \exp(\tfrac{3}{4}0 \pi i) (3-r)^{\frac{1}{4}} \exp(\tfrac{1}{4}2 \pi i) = i \, r^{\frac{3}{4}} (3-r)^{\frac{1}{4}}$$ and along the lower segment, $$r^{\frac{3}{4}} \exp(\tfrac{3}{4}0 \pi i) (3-r)^{\frac{1}{4}} \exp(\tfrac{1}{4}0 \pi i) = r^{\frac{3}{4}} (3-r)^{\frac{1}{4}}$$ It follows that the integral of $\dfrac{f(z)}{5-z}$ along the upper segment is $-iI$ in the limit, and along the lower segment, $I$.

• I do not understand why it is $-iI$ along the upper segment rather than $iI$.

$$(1-i) I = -2\pi i \left( \mathrm{Res}\left( \frac{f(z)}{5-z},5\right) + \mathrm{Res}\left( \frac{f(z)}{5-z} ,\infty\right)\right)$$

• This is where I realised that I must be completely misunderstanding the idea. From what I understood, neither the singularity at $2$ nor that at $\infty$ are in the contour, so I do not see how they come into play and how the residue theorem is being used. I realise this is the whole point of all the previous working, but I don't understand what is going on.

• Also, if instead the poles were not on the real line - for instance, if we were considering:

$$\int_0^3 \frac{f(x)}{1+x^4}\,dx$$

How would one adapt the residue calculations? Would we consider all the poles? A big thank you to anyone who answers.

-
The branch $0 \le \arg(3-z) < 2 \pi$ means that there is a cut where $3-z$ is real and positive. Therefore, the cut is on $(-\infty,3]$.