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

Complex integration is a cornerstone of complex analysis, extending the concept of integration from real-valued functions to complex-valued functions. It plays a pivotal role in solving problems in physics, engineering, and pure mathematics.
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 i2 = -1.
A complex function is a function that takes a complex number as input and returns a complex number as output. In other words, it is a function of the form f(z), where z is a complex variable. Complex functions can be represented in the form f(z) = u(x, y) + iv(x, y), where u and v are real-valued functions and i is the imaginary unit.
Definition. Let f : [a, b] → ℂ be a complex-valued function of a real variable. We can express f(t) in terms of its real and imaginary parts as f(t) = u(t) + iv(t) where u(t) and v(t) are real-valued functions. The complex integral is defined as: $\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. As a consequence, if both u(t) and v(t) are integrable, then f(t) is integrable on [a, b]. All the usual properties and techniques of real integration (linearity, substitution, integration by parts, etc.) carry over to complex-valued functions. We can pull out constants (including complex constants) from the integral and handle sums term-by-term:
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] &=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.
Solution:
Orthogonality means that the inner product of two functions over an interval is zero. For complex-valued functions on [0, 2π], the standard inner product is $\langle f, g \rangle = \int_{0}^{2\pi} f(t)\overline{g(t)}dt$ where $\overline{g(t)}$ is the complex conjugate of g(t). In this particular instance, $f(t) = e^{imt}$ and $g(t) = e^{int}$, so the complex conjugate is $\overline{g(t)} = \overline{e^{int}} = e^{-int}$, so their inner product is exactly the above integral and can be written as $\langle e^{imt}, e^{int} \rangle$.
Recall the analogy with perpendicular vectors in ℝn. The dot product of two distinct perpendicular vectors (e.g., the i and j unit vectors) is zero. The concept of orthogonality for functions is quite similar, this integral acts as a kind of “dot product” (more formally, an inner product). if the inner product ⟨f, g⟩ = 0, we say f and g are orthogonal.
The dot product of v with itself is: v · v = ||v||². This gives the square of the vector’s length (magnitude)
For functions, we define an inner product that works similarly:
$$\langle f, g \rangle = \int_{0}^{2\pi} f(t)\overline{g(t)}dt$$When we take the inner product of a function with itself:
$$\langle f, f \rangle = \int_{0}^{2\pi} f(t)\overline{f(t)}dt = \int_{0}^{2\pi} |f(t)|^2 dt$$This is analogous to the “magnitude squared” or “norm squared” of the function. We often write ||f||² = ⟨f, f⟩.
Now, let’s evaluate the integral explicitly. We combine the exponentials using properties of exponents, $\int_{0}^{2\pi} e^{imt}\int_{0}^{2\pi} e^{-int} = \int_{0}^{2\pi} e^{i(m-n)t}$.
Consider two cases for the integer difference k = m − n.
Case 1. When m = n, we’re computing:
$$\langle e^{int}, e^{int} \rangle = \int_{0}^{2\pi} e^{int} \cdot \overline{e^{int}} dt = \int_{0}^{2\pi} e^{int} \cdot e^{-int} dt$$This simplifies to:
$$\int_{0}^{2\pi} e^{int} \cdot e^{-int} dt = \int_{0}^{2\pi} e^0 dt = \int_{0}^{2\pi} 1 dt = 2\pi$$This is the situation of taking the inner product of a function with itself: indeed $\langle e^{int}, e^{int} \rangle = 2\pi$. Why is this the “magnitude squared”? Notice that:
$$|e^{int}|^2 = e^{int} \cdot \overline{e^{int}} = e^{int} \cdot e^{-int} = e^0 = 1$$So the function $e^{int}$ has constant magnitude $|e^{int}| = 1$ everywhere (it’s a unit circle in the complex plane). Therefore:
$$||e^{int}||^2 = \int_{0}^{2\pi} |e^{int}|^2 dt = \int_{0}^{2\pi} 1 dt = 2\pi$$$\int_{0}^{2\pi} e^{imt}e^{-int} dt = [\text{Simplify the integrand by combining the exponents}] = \int_{0}^{2\pi} e^{i(m-n)t}dt$
Case 1. m = n ⇒ m - n = 0. The integrand simplifies to $e^{i(m-n)t} = e^0 = 1$. The integral is therefore: $\int_{0}^{2\pi} 1dt = t\Big|_{0}^{2\pi} = 2\pi$.
Case 2: m ≠ n, the difference m - n is a non-zero integer. Let’s call it k, where k = m − n. The integral is $\int_{0}^{2\pi} e^{ikt}dt = \frac{1}{ik}e^{ikt}\Big|_{0}^{2\pi}$
Now, evaluate the expression at the limits of integration:
$$\begin{align} &= \frac{1}{ik}(e^{i2\pi k}-e^{ik0}) = \frac{1}{ik}(e^{ik(2\pi)}-1) \\ &= \frac{1}{ik}(\cos(2\pi k) + i\sin(2\pi k) - 1) \quad \text{(Euler's formula)} \\ &= \frac{1}{ik}(1 - 1) \quad \text{(since } \cos(2\pi k) = 1, \sin(2\pi k) = 0) \\ &= 0 \end{align}$$So for m ≠ n, $\int_{0}^{2\pi} e^{imt}\int_{0}^{2\pi} e^{-int} = 0$. We conclude that $\langle e^{imt}, e^{int} \rangle$ = 0 when m ≠ n and 2π when m = n. This is exactly the condition for an orthogonal set of functions on [0,2π]. In fact, if we normalize each function by $\frac{1}{\sqrt{2\pi}}$, we would have an orthonormal set
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 &=\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}. \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}$. Applying integration by parts:
$$ \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] &=-ie^{i}-(1 - e^{i})\\[2pt] &=-ie^{i} -1 + e^{i} = e^{i}(1-i)-1. \end{aligned} $$We have simplified $\frac{e^{i}}{i}$ by multiplying numerator and denominator by i.
Solution:
For n = 0, $I_0 = \int_{0}^{2\pi} tdt = \frac{1}{2}t^2\Big|_{0}^{2\pi} = 2\pi^2$
For 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} $$