JustToThePoint English Website Version
JustToThePoint en español

Complex integration

Arithmetic is where numbers fly like pigeons in and out of your head, Carl Sandburg

image info

Complex integration

Complex integration is a cornerstone of complex analysis, with deep applications in physics, engineering, number theory, and pure mathematics. It extends the concept of integration from real-valued functions to complex-valued functions.

A complex number is a number of the form z = x + yi, where x and y are real numbers, and i is the imaginary unit with the property $i^2=-1$. .

Definition. Let $f : [a, b] \to \mathbb{C}$ be a complex-valued function of a real variable t. We can express f(t) in terms of its real and imaginary parts as f(t) = u(t) + iv(t) where $u, v : [a, b] \to \mathbb{R}$ are real-valued functions. The complex integral is defined as: $\boxed{\int_a^b f(t)\,dt := \int_a^b u(t)\,dt + i\int_a^b v(t)\,dt}$. In other words, to integrate a complex function over [a, b], we integrate its real part and imaginary part separately and then recombine.

This definition essentially treats the complex integral as a linear combination of two real integrals. This definition requires only that $u$ and $v$ are (Riemann) integrable, which is the case whenever they are continuous or piecewise continuous. All the standard properties and techniques of real integration (linearity, substitution, integration by parts, etc.) carry over to complex-valued functions.

Note that $c$ may be a complex constant — this follows from the definition by distributing $c = \alpha + i\beta$ across the real and imaginary integrals.

Proof. Let $I = \int_a^b f(t)\,dt$. If $I = 0$, the inequality is trivial. If $I \neq 0$, write $I = |I|e^{i\alpha}$ for some $\alpha \in \mathbb{R}$.

Multiply by $e^{-i\alpha}$, and we get: $|I| = e^{-i\alpha}I$. This rotates the complex number I to lie on the positive real axis.

$|I| = e^{-i\alpha}I = \int_a^b e^{-i\alpha}f(t)\,dt$

Since |I| is real, $|I| = \operatorname{Re}(\int_a^b e^{-i\alpha}f(t)\,dt) = \int_a^b \operatorname{Re}(e^{-i\alpha}f(t))\,dt \leq \int_a^b |e^{-i\alpha}f(t)|\,dt = \int_a^b |f(t)|\,dt,$

For any complex number, $Re(w) \le |w|.$ Besides, $|e^{-i\alpha}f(t)| = |e^{-i\alpha}| |f(t)| = |f(t)|$ since $|e^{-i\alpha}| = 1$.

Then, we conclude $|I| \le \int_a^b |f(t)|\,dt \quad\square$

Examples

We compute the integral by separating the real and imaginary parts:

$$ \begin{aligned} \int_{2\pi}^{4\pi} f(t)dt &=\int_{2\pi}^{4\pi}t\cos (t)dt + i\int_{2\pi}^{4\pi} t\sin(t)dt \\[2pt] &\text{Real part. Use integration by parts: Let u=t, (du = dt) dv=cos(t)dt, (v =sin(t))} \\[2pt] &\int_{2\pi}^{4\pi}t\cos (t)dt = t\sin(t)\Big|_{2\pi}^{4\pi}-\int_{2\pi}^{4\pi}\sin (t)dt \\[2pt] &\text{Imaginary part. Use integration by parts: Let u=t, (du=dt) dv=sin(t)dt, (v = -cos(t))} \\[2pt] &\int_{2\pi}^{4\pi} t\sin (t)dt =-t\cos(t)\Big|_{2\pi}^{4\pi}-\int_{2\pi}^{4\pi}(-cos(t))dt \\[2pt] &=t\sin(t)\Big|_{2\pi}^{4\pi}-\int_{2\pi}^{4\pi}\sin(t)dt +i\Bigl[-t\cos(t)\Big|_{2\pi}^{4\pi}-\int_{2\pi}^{4\pi}(-cos(t))dt\Bigr]\\[2pt] &=(4π)sin(4π)−(2π)sin(2π)+\cos t\Big|_{2\pi}^{4\pi}+i\bigl[-4\pi\cos(4\pi)+2\pi\cos(2\pi)+\sin t\big|_{2\pi}^{4\pi}\bigr]\\[2pt] &[\sin(2\pi) = \sin(4\pi) = 0; \cos(4\pi) = \cos(2\pi) = 1] \\[2pt] &=0+i(-2\pi)=-2\pi i. \end{aligned} $$

The complex integral is linear, allowing separation into real and imaginary parts. Standard techniques like integration by parts apply directly to each component. The trigonometric functions’ periodicity simplified the evaluation at the bounds 2π and 4π. The purely imaginary result indicates the integral’s net effect is entirely in the imaginary direction, i.e., the area under the curve f(t) over [2π, 4π] has no net real component, only an imaginary component.

  1. The Inner Product Analogy. The dot product of two distinct perpendicular vectors is zero. If the dot product of a vector with itself is taken, $v \cdot v = ||v||^2$, it yields the square of the vector’s magnitude.
    For complex-valued functions on the interval $[a, b]$, we define an inner product that acts as a continuous version of the dot product:

    $$\langle f, g \rangle = \int_{a}^{b} f(t)\overline{g(t)} dt$$


    where $\overline{g(t)}$ is the complex conjugate of $g(t)$.
    If $\langle f, g \rangle = 0$, we say the functions $f$ and $g$ are orthogonal.

  2. Setting up the integral.
    In this specific instance, our interval is $[0, 2\pi]$, our first function is $f(t) = e^{imt}$, and our second function is $g(t) = e^{int}$.
    The complex conjugate of our second function flips the sign of the imaginary exponent: $\overline{g(t)} = \overline{e^{int}} = e^{-int}$. Therefore, their inner product is exactly the integral we want to evaluate:

    $$\langle e^{imt}, e^{int} \rangle = \int_0^{2\pi} e^{imt} e^{-int} dt$$


    Using the basic properties of exponents, we combine the integrands: $\int_0^{2\pi} e^{i(m-n)t} dt$
    To evaluate this, we must consider two distinct cases based on the integer difference $m - n$.

  3. Evaluating the Cases. When $m = n$ (Magnitude Squared).
    If $m = n$, then $m - n = 0$. The integrand simplifies completely: $e^{i(m-n)t} = e^0 = 1$.
    The integral evaluates to the length of the interval: $\langle e^{int}, e^{int} \rangle = \int_{0}^{2\pi} 1 dt = \left[ t \right]_{0}^{2\pi} = 2\pi$
    Why does this equal the “magnitude squared”?
    Just like vectors, taking the inner product of a function with itself gives its squared norm: $||f||^2 = \langle f, f \rangle$.
    Because $|e^{int}|^2 = e^{int} \cdot e^{-int} = e^0 = 1$, the function $e^{int}$ has a constant magnitude of 1 everywhere.
    It simply traces the unit circle in the complex plane. Therefore, integrating this constant unit magnitude over an interval of length $2\pi$ naturally yields $2\pi$.

  4. If $m \neq n$ (Orthogonality), the difference $m - n$ is a non-zero integer.
    Let’s define this integer as $k = m - n$. The integral becomes: $\int_{0}^{2\pi} e^{ikt} dt = \left[ \frac{1}{ik} e^{ikt} \right]_{0}^{2\pi}$
    Now, we evaluate this expression at the limits of integration: $\frac{1}{ik} (e^{i2\pi k} - e^{i0}) = \frac{1}{ik} (e^{i2\pi k} - 1)$
    By Euler’s formula, $e^{i2\pi k} = \cos(2\pi k) + i\sin(2\pi k)$. Since $k$ is an integer: $\cos(2\pi k) = 1, \sin(2\pi k) = 0$, hence $e^{i2\pi k} = 1$.
    Substituting this back into our evaluated limits: $\frac{1}{ik} (1 - 1) = 0$

  5. Conclusion. We have successfully demonstrated that $\langle e^{imt}, e^{int} \rangle = 0$ when $m \neq n$, and equals $2\pi$ when $m = n$. This confirms that the set of complex exponentials forms an orthogonal basis on $[0, 2\pi]$.

Furthermore, if we wanted to create an orthonormal set (where the “magnitude squared” is exactly 1 instead of $2\pi$), we would simply multiply each function in the set by the normalization factor $\frac{1}{\sqrt{2\pi}}$.

Solution: The integrand is f(t) = $e^{2t}+ie^{3t}$. We can integrate it by treating the real and imaginary parts separately (linearity allows this split).

$$ \begin{aligned} \int_{0}^{1} (e^{2t}+ie^{3t})dt = \int_{0}^{1} e^{2t}dt+ i\int_{0}^{1} e^{3t}dt &[\text{Each integral is a standard real exponential integral}] \\[2pt] &=\frac{1}{2}e^{2t}\Big|_{0}^{1} +i\frac{1}{3}e^{3t}\Big|_{0}^{1}\\[2pt] &=\frac{1}{2}(e^2-e^0)+i\frac{1}{3}(e^3-e^0)\\[2pt] &=\frac{e^2-1}{2}+i\frac{e^3-1}{3}\\[2pt] &\approx 3.195 + 6.362i. \end{aligned} $$

We will apply integration by parts directly to the complex integrand. Recall the integration by parts formula for real functions: ∫udv = uv − ∫vdu. This formula remains valid for complex-valued integrals as well. Here, let’s choose u(t) = t and dv = $e^{it}dt$.

Then, du = dt, $v(t) = \frac{e^{it}}{i}$. Therefore,

$$ \begin{aligned} \int_{0}^{1} te^{it}dt &=uv\Big|_{0}^{1} -\int_{0}^{1}vdu\\[2pt] &=t\frac{e^{it}}{i}\Big|_{0}^{1} -\int_{0}^{1}\frac{e^{it}}{i}dt\\[2pt] &=1·\frac{e^{i}}{i}-0·\frac{1}{i} -\frac{1}{i}\Big[\frac{e^{i t}}{i}\Big]_{0}^{1}\\[2pt] &=\frac{e^{i}}{i}-\frac{e^{i} - 1}{i^2}\\[2pt] &=\frac{ie^{i}-(e^{i} - 1)}{-1}= -ie^{i}+(e^{i} - 1)\\[2pt] &=e^{i}(1-i)-1 \\[2pt] &[\text{Using } e^i = \cos 1 + i\sin 1 \approx 0.5403 + 0.8415i, e^i(1-i) = (\cos 1 + i\sin 1)(1 - i) = (\cos 1 + \sin 1) + i(\sin 1 - \cos 1).] \\[2pt] &=(\cos 1 + \sin 1 - 1) + i(\sin 1 - \cos 1) \approx 0.3818 + 0.3012i. \end{aligned} $$

We have simplified $\frac{e^{i}}{i}$ by multiplying numerator and denominator by i.

Solution:

Case n = 0, $I_0 = \int_{0}^{2\pi} tdt = \frac{1}{2}t^2\Big|_{0}^{2\pi} = 2\pi^2$

Case n ≠ 0, integrate by parts with u = t, $dv = e^{int}dt \leadsto du = dt, v = \frac{e^{int}}{in}$

$$ \begin{aligned} I_n = \int_{0}^{2\pi} te^{int}dt &=uv\Big|_{0}^{1} -\int_{0}^{1}vdu\\[2pt] &=t\frac{e^{int}}{in}\Big|_{0}^{2\pi} -\int_{0}^{2\pi}\frac{e^{int}}{in}dt\\[2pt] &=\frac{2\pi e^{in(2\pi)}}{in}-\frac{1}{in}\frac{e^{int}}{in}\Big|_{0}^{2\pi}\\[2pt] &=\frac{2\pi}{in}-\frac{1}{in}·\frac{1-1}{in}\\[2pt] &=\frac{2\pi}{in} = \frac{-2\pi i}{n} \end{aligned} $$

In conclusion, $\boxed{I_n = \int_0^{2\pi} t\,e^{int}\,dt = \begin{cases} 2\pi^2 & \text{if } n = 0, \\[4pt] \dfrac{-2\pi i}{n} & \text{if } n \neq 0. \end{cases}}$

Solution.

1. Complete the Square. Write the integrand as $e^{-t^2 + it}$. Complete the square in the exponent: $-t^2 + it =[\text{factor out the negative sign}] -\left(t^2 - it\right) =[-(t^2 - it) = -\left(t^2 - it - \frac{1}{4} + \frac{1}{4}\right)] -\left(t - \frac{i}{2}\right)^2 - \frac{1}{4}.$

Substitute this back into the integral, and pull the constant part out: $\int_0^\infty e^{-t^2+it}\,dt = e^{-1/4}\int_0^\infty e^{-(t - i/2)^2}\,dt.$

2. Change of Variables. Now, set $z=t-\frac{i}{2},\quad \mathrm{so}\quad t=z+\frac{i}{2},\quad dt=dz.$

Now, let’s have a closer look at the limits of integration. When t goes from 0 to $\infty$, z goes from $-\frac{i}{2}$ to $\infty -\frac{i}{2}$. Thus, $I=e^{-1/4}\int _{-i/2}^{\infty -i/2}e^{-z^2}\, dz.$

This is a path in the complex plane. It’s a horizontal line starting at the y-axis (at $y = -1/2$) and extending infinitely to the right.

3. The Contour Shift. Cauchy’s Integral Theorem states that if a function is “entire” (meaning it has no poles or undefined points anywhere in the complex plane, which $e^{-z^2}$ is), the integral around any closed loop is exactly zero.

Consider a rectangle with four corners: $0$, $R$, $R - \frac{i}{2}$, and $-\frac{i}{2}$. Because $e^{-z^2}$ is entire, the sum of the integrals along these four sides must be zero: $\int_{\text{Bottom}} + \int_{\text{Right}} + \int_{\text{Top}} + \int_{\text{Left}} = 0$

As $R$ approaches $\infty$:

  1. The Bottom is our target integral (but backwards, from $\infty - \frac{i}{2}$ to $-\frac{i}{2}$).
  2. The Right side (from $R - \frac{i}{2}$ to $R$) drops to exactly 0. Why? Because $e^{-z^2}$ evaluates to (z = iy) $e^{-(R + iy)^2} = e^{-R^2 + y^2 - 2iRy}$. That $e^{-R^2}$ term gets unimaginably small as $R \to \infty$, crushing the whole segment to zero.
  3. The Top is the real axis from $\infty$ to $0$.
  4. The Left side is the vertical segment from $0$ to $-\frac{i}{2}$.

Because the loop equals zero, taking a “detour” between two points yields the exact same result as going directly there. Therefore, the integral along the direct horizontal line from $-\frac{i}{2}$ to $\infty - \frac{i}{2}$ (the bottom part) is identical to taking the detour:

$$\text{Path} = \left(-\frac{i}{2} \to 0\right) + \left(0 \to \infty\right) + \left(\text{the vanished infinity drop (the right part)}\right)$$

Mathematically, $\int_{-i/2}^{\infty - i/2} e^{-z^2} dz = \int_{-i/2}^0 e^{-z^2} dz + \int_0^\infty e^{-x^2} dx$

Step 4. Evaluating the Detour Pieces.

Piece A: The Real Axis ($0$ to $\infty$). This is the famous Gaussian half-integral, $\boxed{\int_0^\infty e^{-x^2} dx = \frac{\sqrt{\pi}}{2}}$

Piece B: The Vertical Segment ($-\frac{i}{2}$ to $0$). Here, we are moving along the imaginary y-axis. Let’s parametrize it:

Let $z = iy$. This means $dz = i \, dy$. As $z$ goes from $-\frac{i}{2}$ to $0$, $y$ goes from $-\frac{1}{2}$ to $0$.

Substitute this in: $\int_{-i/2}^0 e^{-z^2} dz = \int_{-1/2}^0 e^{-(iy)^2} (i \, dy)$. Since $i^2 = -1$, $-(iy)^2 = -(-y^2) = y^2$. We just need to pull the $i$ out front (the integrand) and we get: $i \int_{-1/2}^0 e^{y^2} dy$

Because $e^{y^2}$ is an even, symmetric function, the area from $-1/2$ to $0$ is identical to the area from $0$ to $1/2$. Let’s flip the limits to make it positive: $i \int_0^{1/2} e^{y^2} dy$

Step 5: The Imaginary Error Function. There is no elementary anti-derivative for $e^{y^2}$. So, mathematicians (“When life gives you lemons, make lemonade”) defined a special function for it called the imaginary error function ($\operatorname{erfi}$): $\operatorname{erfi}(x) = \frac{2}{\sqrt{\pi}} \int_0^x e^{t^2} dt$

To make our integral look like this definition, we multiply by $\frac{\sqrt{\pi}}{2}$: $\boxed{\int_0^{1/2} e^{y^2} dy = \frac{\sqrt{\pi}}{2} \operatorname{erfi}\left(\frac{1}{2}\right)}$

Therefore, our vertical segment evaluates to: $i \frac{\sqrt{\pi}}{2} \operatorname{erfi}\left(\frac{1}{2}\right)$

Step 6: Putting everything together, we have the constant $e^{-1/4}$, the Gaussian and the vertical piece.

$I = e^{-1/4} \left( \int_0^\infty e^{-x^2} dx + \int_{-i/2}^0 e^{-z^2} dz \right) = e^{-1/4} \left( \frac{\sqrt{\pi}}{2} + i \frac{\sqrt{\pi}}{2} \operatorname{erfi}\left(\frac{1}{2}\right) \right)$

Factor out the common $\frac{\sqrt{\pi}}{2}$: $I = \frac{\sqrt{\pi}}{2} e^{-1/4} \left( 1 + i \operatorname{erfi}\left(\frac{1}{2}\right) \right)$

Bitcoin donation

JustToThePoint Copyright © 2011 - 2026 Anawim. ALL RIGHTS RESERVED. Bilingual e-books, articles, and videos to help your child and your entire family succeed, develop a healthy lifestyle, and have a lot of fun. Social Issues, Join us.

This website uses cookies to improve your navigation experience.
By continuing, you are consenting to our use of cookies, in accordance with our Cookies Policy and Website Terms and Conditions of use.