Complex Integration by Substitution

Definition
Let $\left[{a \,.\,.\, b}\right]$ be a closed real interval.

Let $\phi: \left[{a \,.\,.\, b}\right] \to \R$ be a real function which has a derivative on $\left[{a \,.\,.\, b}\right]$.

Let $f : \operatorname{Im} \left({\phi}\right) \to \C$ be a continuous complex function, where $\operatorname{Im} \left({\phi}\right)$ denotes the image of $\phi$.

If $\phi \left({a}\right) \le \phi \left({b}\right)$, then:


 * $\displaystyle \int_{\phi \left({a}\right)}^{\phi \left({b}\right)} f \left({t}\right) \ \mathrm dt = \int_a^b f \left({\phi \left({u}\right)}\right) \phi' \left({u}\right) \ \mathrm du$

If $\phi \left({a}\right) > \phi \left({b}\right)$, then:


 * $\displaystyle \int_{\phi \left({b}\right)}^{\phi \left({a}\right)} f \left({t}\right) \ \mathrm dt = \int_a^b f \left({\phi \left({u}\right)}\right) \phi' \left({u}\right) \ \mathrm du$

Proof
Suppose $\phi \left({a}\right) \le \phi \left({b}\right)$.

When $\Re$ and $\Im$ denote real parts and imaginary parts, we have:

Suppose instead $\phi \left({a}\right) > \phi \left({b}\right)$.

Then: