Happiness is when what you think, what you say, and what you do are in harmony, Gandhi

Definition. Let D ⊆ ℝ² be a domain (open and connected set). A function $\phi (x, y): D \to \real$ is C² on D if $\phi, \frac{\partial \phi}{\partial x}, \frac{\partial \phi}{\partial y}, \frac{\partial^2 \phi}{\partial x^2}, \frac{\partial^2 \phi}{\partial y^2}$ are all continuous on D. According to this definition, the following conditions are met.
The standard (the previous definition is a weaker variant) meaning of C² on D requires all partial derivatives up to order 2 exist and are continuous on D: $\phi, \frac{\partial \phi}{\partial x}, \frac{\partial \phi}{\partial y}, \frac{\partial^2 \phi}{\partial x^2}, \frac{\partial^2 \phi}{\partial y^2}, \frac{\partial^2 \phi}{\partial y \partial x}, \frac{\partial^2 \phi}{\partial x \partial y}$ are continuous.
Definition. The Laplacian of a function $\phi (x, y)$ is $\nabla^2 \phi := \frac{\partial^2 \phi}{\partial x^2} + \frac{\partial \phi^2}{\partial y^2} ↭ \nabla^2 \phi := \phi_{xx}+ \phi_{yy}$. The Laplace’s equation is $\nabla^2 \phi = \frac{\partial^2 \phi}{\partial x^2} + \frac{\partial^2 \phi}{\partial x^2} = 0$.
The standard notations for the Laplacian of a function $\phi (x, y)$ are $\nabla^2 \phi \text{ or } \Delta \phi $, and for its partial derivatives, $\frac{\partial \phi}{\partial x} \text{ or } \phi_x$, and for second partials, $\frac{\partial^2 \phi}{\partial x²} \text{ or } \phi_{xx}$. The superscript 2 should precede the variable to denote the second derivative, not the variable itself.
Definition. A real-valued function $\phi (x, y)$ is harmonic on a domain D ⊆ ℝ if it is C² on D and satisfies Laplace’s equation: $\nabla^2 \phi = \frac{\partial \phi^2}{\partial x^2} + \frac{\partial \phi^2}{\partial y^2} = 0$.
Linear Functions: $f(x, y) = ax + by + c$. The second derivatives cancel out $\frac{\partial^2 f}{\partial x^2} = 0, \frac{\partial^2 f}{\partial y^2} = 0$, so $\nabla^2 f = 0$.
Saddle-Shape Function: $f(x, y) = x^2 - y^2$. The seconds derivatives $\frac{\partial^2 f}{\partial x^2} = 2, \frac{\partial^2 f}{\partial y^2} = -2$, so $ \nabla^2 f = 0 $.
Exponential/Trigonometric Functions: $f(x, y) = e^x \cos (y), \nabla^2 f = e^x \cos (y) - e^x \cos (y) = 0$.
Cross Terms: $u(x, y) = xy$. The seconds derivatives cancel out $\frac{\partial^2 u}{\partial x^2} = 0, \frac{\partial^2 u}{\partial y^2} = 0$, so $ \nabla^2 u = 0$. This confirms u is harmonic.
A harmonic conjugate of u is a function v(x, y) such that u and v satisfy the Cauchy-Riemann equations $\frac{\partial u}{\partial x} = \frac{\partial v}{\partial y}, \frac{\partial u}{\partial y} = -\frac{\partial v}{\partial x}$, making u + iv analytic.
$\frac{\partial u}{\partial x} = y \leadsto \frac{\partial v}{\partial y} = y$. Integrating this expression with respect to y: $\int ydy = \frac{1}{2}y^2 + g(x)$.
Taking the partial derivative with respect to x and using $\frac{\partial u}{\partial y} = x = -\frac{\partial v}{\partial x}$, we get: $g'(x) = -x \leadsto g(x) = -\frac{1}{2}x^2 + C$.
Thus, setting C = 0 for simplicity, a conjugate is $v = \frac{1}{2}(y^2 - x^2)$.
The complex function f(z) = u + iv is analytic and can be expressed in terms of z = x + iy, $f(z) = xy + i\frac{1}{2}(y^2 - x^2)$. $z² = x² - y² + 2ixy, iz² = i(x² - y²) -2xy, -\frac{i}{2}z² = i\frac{1}{2}(y² - x²) + xy, \boxed{f(z) = -\frac{i}{2} z^2}$.
u(x, y) = $log(r) = log(\sqrt{x²+y²}) = \frac{1}{2}log(x²+y²)$ is harmonic on ℝ² \ {(0, 0)}.
Define v = x² + y², so u $= \frac{1}{2}log(v)$
First partial derivatives: $\frac{\partial u}{\partial x} = \frac{1}{2}\frac{1}{v}2x = \frac{x}{v}, \frac{\partial u}{\partial y} = \frac{1}{2}\frac{1}{v}2y = \frac{y}{v}.$
Second partial derivatives: $\frac{\partial^2 u}{\partial x^2} = \frac{v·1-x·2x}{v^2} = \frac{v -2x^2}{v^2}, \frac{\partial^2 u}{\partial y^2} = \frac{v·1-y·2y}{v^2} = \frac{v -2y^2}{v^2}$
Laplacian: $\nabla^2 u = \frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} = \frac{v -2x^2 + v -2y^2}{v^2} = \frac{2v -2(x²+y²)}{v^2} = \frac{2v -2v}{v^2} = 0$. Thus, ∇²u = 0 for (x, y) ≠ (0, 0), u is harmonic on ℝ² \ {(0, 0)}.
However, it fails to be harmonic at the origin due to the singularity there. At the origin, u is undefined because log(r) → -∞ as r → 0+.
Real and imaginary parts of zⁿ: uₙ(r, θ) = rⁿcos(nθ), vₙ(r, θ) = rⁿsin(nθ) are harmonic on ℝ2 for each n ∈ ℕ.
To verify, consider the Laplacian in polar coordinates. $\boxed{\nabla^2 f = \frac{\partial^2 f}{\partial r^2} + \frac{1}{r}\frac{\partial f}{\partial r} + \frac{1}{r^2}\frac{\partial^2 f}{\partial \theta^2}}$
Verification for uₙ(r, θ) = rⁿcos(nθ).
First partial derivatives: $\frac{\partial u_n}{\partial r} = nr^{n-1}cos(n\theta), \frac{\partial u_n}{\partial \theta} = -nr^{n}sin(n\theta)$
Second partial derivatives: $\frac{\partial^2 u_n}{\partial r^2} = n(n-1)r^{n-2}cos(n\theta), \frac{\partial^2 u_n}{\partial \theta^2} = -n^2r^ncos(n\theta)$
Laplacian: $\nabla^2 uₙ = \frac{\partial^2 uₙ}{\partial r^2} + \frac{1}{r}\frac{\partial uₙ}{\partial r} + \frac{1}{r^2}\frac{\partial^2 uₙ}{\partial \theta^2} = n(n-1)r^{n-2}cos(n\theta) + \frac{1}{r}nr^{n-1}cos(n\theta) + \frac{1}{r^2}·(-n^2r^ncos(n\theta)) =[\text{Simplifying}] r^{n-2}cos(n\theta)[n(n-1)+n-n^2] = r^{n-2}cos(n\theta)[n^2 -n +n-n^2] = r^{n-2}cos(n\theta)·0 = 0.$
Mutatis mutandis, $\nabla^2 vₙ = 0.$
The Laplacian is zero for all r > 0 and all θ.
At r = 0, for n ≥ 1, the functions are smooth (as they are homogeneous polynomials in Cartesian coordinates), and Laplace’s equation holds, as verified by direct computation in Cartesian coordinates for specific cases, e.g.,
n = 1: u₁ = rcos(θ) = x =[r = 0] 0, v₁ = rsin(θ) = y = [r = 0] 0.
n = 2: u₂ = $r^2(cos(2θ)) = r^2(cos^2(θ)-sin^2(θ)) = (rcos(θ))^2-(rsin(θ))^2 =$ x² -y² =[r = 0] 0, v₂ = $r^2sin(2θ) = r^2(2sin(θ)cos(θ)) = 2(rcos(θ)rsin(θ)) =$ 2xy=[r = 0] 0. They vanish at the origin. Thus, both uₙ and vₙ are harmonic on ℝ² for each n ∈ ℕ.
$\boxed{u_n(r,\theta) = r^{n}\cos(n\theta) \text{ and } v_n(r,\theta) = r^{n}\sin(n\theta) \text{are harmonic on } \mathbb{R}^2 \quad \text{for each } n \in \mathbb{N}.}$
Laplacian in Polar Coordinates.
Polar to Cartesian: $x = r\cos(\theta), y = r\sin(\theta)$. Cartesian to Polar: $r = \sqrt{x^2+y^2}, \theta = \arctan\left(\frac{y}{x}\right)$
Partial Derivatives of r and θ: $\frac{\partial r}{\partial x} = \frac{\partial}{\partial x}\sqrt{x^2+y^2} = \frac{1}{2\sqrt{x^2+y^2}} \cdot 2x = \frac{x}{r} = \cos(\theta)$, $\frac{\partial r}{\partial y} = \frac{\partial}{\partial y}\sqrt{x^2+y^2} = \frac{1}{2\sqrt{x^2+y^2}} \cdot 2y = \frac{y}{r} = \sin(\theta), \frac{\partial\theta}{\partial x} = \frac{1}{1+(\frac{y}{x})^2} \cdot \frac{\partial}{\partial x}\left(\frac{y}{x}\right) = \frac{1}{1+(\frac{y}{x})^2} \cdot \left(-\frac{y}{x^2}\right) = \frac{x^2}{x^2+y^2} \cdot \left(-\frac{y}{x^2}\right) = -\frac{y}{x^2+y^2} = -\frac{y}{r^2} = -\frac{\sin(\theta)}{r}, \frac{\partial\theta}{\partial y} = \frac{1}{1+(\frac{y}{x})^2} \cdot \frac{\partial}{\partial y}\left(\frac{y}{x}\right) = \frac{1}{1+(\frac{y}{x})^2} \cdot \frac{1}{x} = \frac{x^2}{x^2+y^2} \cdot \frac{1}{x} = \frac{x}{x^2+y^2} = \frac{x}{r^2} = \frac{\cos(\theta)}{r}$. $\frac{\partial r}{\partial x} = \cos(\theta), \frac{\partial r}{\partial y} = \sin(\theta), \frac{\partial\theta}{\partial x} = -\frac{\sin(\theta)}{r}, \frac{\partial\theta}{\partial y} = \frac{\cos(\theta)}{r}$
First-Order Partial Derivatives. Using the chain rule: $\frac{\partial f}{\partial x} = \frac{\partial f}{\partial r}\frac{\partial r}{\partial x} + \frac{\partial f}{\partial \theta}\frac{\partial \theta}{\partial x} = \cos\theta \frac{\partial f}{\partial r} - \frac{\sin\theta}{r} \frac{\partial f}{\partial \theta}, \frac{\partial f}{\partial y} = \frac{\partial f}{\partial r}\frac{\partial r}{\partial y} + \frac{\partial f}{\partial \theta}\frac{\partial \theta}{\partial y} = \sin\theta \frac{\partial f}{\partial r} + \frac{\cos\theta}{r} \frac{\partial f}{\partial \theta}$.
Second-Order Partial Derivatives. Let’s compute $\frac{\partial^2 f}{\partial x^2}$: $\frac{\partial^2 f}{\partial x^2} = \frac{\partial}{\partial x}\left(\cos\theta \frac{\partial f}{\partial r}\right) - \frac{\partial}{\partial x}\left(\frac{\sin\theta}{r} \frac{\partial f}{\partial \theta}\right)$
First term: Using the product rule: $\frac{\partial}{\partial x}\left(\cos\theta \frac{\partial f}{\partial r}\right) = \frac{\partial(\cos \theta)}{\partial x}\frac{\partial f}{\partial r} + \cos \theta \frac{\partial}{\partial x}\left(\frac{\partial f}{\partial r}\right) = -\sin \theta \frac{\partial \theta}{\partial x}\frac{\partial f}{\partial r} + \cos \theta \left[\frac{\partial^2 f}{\partial r^2}\frac{\partial r}{\partial x} + \frac{\partial^2 f}{\partial r\partial \theta}\frac{\partial \theta}{\partial x}\right] = -\sin \theta \cdot \left(-\frac{\sin \theta}{r}\right)\frac{\partial f}{\partial r} + \cos \theta \frac{\partial^2 f}{\partial r^2}\cos \theta + \cos \theta \frac{\partial^2 f}{\partial r \partial \theta}\left(-\frac{\sin \theta}{r}\right) = \frac{\sin^2 \theta}{r}\frac{\partial f}{\partial r} + \cos^2 \theta \frac{\partial^2 f}{\partial r^2} - \frac{\cos \theta \sin \theta}{r}\frac{\partial^2 f}{\partial r \partial \theta}$
Second term: $-\frac{\partial}{\partial x}\left(\frac{\sin\theta}{r} \frac{\partial f}{\partial \theta}\right) = -\frac{\partial}{\partial x}\left(\frac{\sin \theta}{r}\right)\frac{\partial f}{\partial \theta} - \frac{\sin \theta}{r}\frac{\partial}{\partial x}\left(\frac{\partial f}{\partial \theta}\right)$
For $\frac{\partial}{\partial x}\left(\frac{\sin \theta}{r}\right)$: $\frac{\partial}{\partial x}\left(\frac{\sin \theta}{r}\right) = \frac{1}{r}\frac{\partial(\sin \theta)}{\partial x} - \frac{\sin \theta}{r^2}\frac{\partial r}{\partial x}$ $= \frac{\cos \theta}{r} \cdot \left(-\frac{\sin \theta}{r}\right) - \frac{\sin \theta}{r^2} \cdot \cos \theta = -\frac{2\cos \theta \sin \theta}{r^2}$
For $\frac{\partial}{\partial x}\left(\frac{\partial f}{\partial \theta}\right)$: $\frac{\partial}{\partial x}\left(\frac{\partial f}{\partial \theta}\right) = \frac{\partial^2 f}{\partial r \partial \theta}\cos(\theta) + \frac{\partial^2 f}{\partial \theta^2}\left(-\frac{\sin \theta}{r}\right)$
So the second term becomes: $-\left(-\frac{2\cos \theta \sin \theta}{r^2}\right)\frac{\partial f}{\partial \theta} - \frac{\sin \theta}{r}\left[\frac{\partial^2 f}{\partial r \partial \theta}\cos(\theta) - \frac{\partial^2 f}{\partial \theta^2}\frac{\sin \theta}{r}\right] = \frac{2\cos \theta \sin \theta}{r^2} \frac{\partial f}{\partial \theta} - \frac{\sin \theta \cos \theta}{r} \frac{\partial^2 f}{\partial r \partial \theta} + \frac{\sin^2 \theta}{r^2} \frac{\partial^2 f}{\partial \theta^2}$
Combining both terms: $\frac{\partial^2 f}{\partial x^2} = \frac{\sin^2 \theta}{r}\frac{\partial f}{\partial r} + \cos^2 \theta \frac{\partial^2 f}{\partial r^2} - \frac{\cos \theta \sin \theta}{r}\frac{\partial^2 f}{\partial r \partial \theta} + \frac{2\cos \theta \sin \theta}{r^2} \frac{\partial f}{\partial \theta} - \frac{\sin \theta \cos \theta}{r} \frac{\partial^2 f}{\partial r \partial \theta} + \frac{\sin^2 \theta}{r^2} \frac{\partial^2 f}{\partial \theta^2}$
Computing $\frac{\partial^2 f}{\partial y^2}$: $\frac{\partial^2 f}{\partial y^2} = \frac{\partial}{\partial y}\left(\sin\theta \frac{\partial f}{\partial r}\right) + \frac{\partial}{\partial y}\left(\frac{\cos\theta}{r} \frac{\partial f}{\partial \theta}\right)$
First term: $\frac{\partial}{\partial y}\left(\sin\theta \frac{\partial f}{\partial r}\right) = \frac{\partial(\sin \theta)}{\partial y}\frac{\partial f}{\partial r} + \sin \theta \frac{\partial}{\partial y}\left(\frac{\partial f}{\partial r}\right)= \cos \theta \frac{\partial \theta}{\partial y}\frac{\partial f}{\partial r} + \sin \theta \left[\frac{\partial^2 f}{\partial r^2}\frac{\partial r}{\partial y} + \frac{\partial^2 f}{\partial r\partial \theta}\frac{\partial \theta}{\partial y}\right] = \cos \theta \cdot \frac{\cos \theta}{r}\frac{\partial f}{\partial r} + \sin \theta \frac{\partial^2 f}{\partial r^2}\sin \theta + \sin \theta \frac{\partial^2 f}{\partial r \partial \theta}\frac{\cos \theta}{r}= \frac{\cos^2 \theta}{r}\frac{\partial f}{\partial r} + \sin^2 \theta \frac{\partial^2 f}{\partial r^2} + \frac{\sin \theta \cos \theta}{r}\frac{\partial^2 f}{\partial r \partial \theta}$
Second term: $\frac{\partial}{\partial y}\left(\frac{\cos\theta}{r} \frac{\partial f}{\partial \theta}\right) = \frac{\partial}{\partial y}\left(\frac{\cos \theta}{r}\right)\frac{\partial f}{\partial \theta} + \frac{\cos \theta}{r}\frac{\partial}{\partial y}\left(\frac{\partial f}{\partial \theta}\right)$
For $\frac{\partial}{\partial y}\left(\frac{\cos \theta}{r}\right)$: $\frac{\partial}{\partial y}\left(\frac{\cos \theta}{r}\right) = \frac{1}{r}\frac{\partial(\cos \theta)}{\partial y} - \frac{\cos \theta}{r^2}\frac{\partial r}{\partial y}= \frac{(-\sin \theta)}{r} \cdot \frac{\cos \theta}{r} - \frac{\cos \theta}{r^2} \cdot \sin \theta = -\frac{2\sin \theta \cos \theta}{r^2}$
For $\frac{\partial}{\partial y}\left(\frac{\partial f}{\partial \theta}\right)$: $\frac{\partial}{\partial y}\left(\frac{\partial f}{\partial \theta}\right) = \frac{\partial^2 f}{\partial r \partial \theta}\sin(\theta) + \frac{\partial^2 f}{\partial \theta^2}\frac{\cos \theta}{r}$
So the second term becomes: $-\frac{2\sin \theta \cos \theta}{r^2} \frac{\partial f}{\partial \theta} + \frac{\cos \theta}{r}\left[\frac{\partial^2 f}{\partial r \partial \theta}\sin(\theta) + \frac{\partial^2 f}{\partial \theta^2}\frac{\cos \theta}{r}\right]= -\frac{2\sin \theta \cos \theta}{r^2} \frac{\partial f}{\partial \theta} + \frac{\sin \theta \cos \theta}{r} \frac{\partial^2 f}{\partial r \partial \theta} + \frac{\cos^2 \theta}{r^2} \frac{\partial^2 f}{\partial \theta^2}$
Combining both terms: $\frac{\partial^2 f}{\partial y^2} = \frac{\cos^2 \theta}{r}\frac{\partial f}{\partial r} + \sin^2 \theta \frac{\partial^2 f}{\partial r^2} + \frac{\sin \theta \cos \theta}{r}\frac{\partial^2 f}{\partial r \partial \theta}$ $- \frac{2\sin \theta \cos \theta}{r^2} \frac{\partial f}{\partial \theta} + \frac{\sin \theta \cos \theta}{r} \frac{\partial^2 f}{\partial r \partial \theta} + \frac{\cos^2 \theta}{r^2} \frac{\partial^2 f}{\partial \theta^2}$
Theorem. Let $f(z) = u(x,y) + i\,v(x,y)$ be analytic on a domain D (with z = x + iy). Then:
Harmonic functions possess several important properties that make them useful in various applications:
Example: For $f(x, y) = x^2 - y^2$, the average of f over a circle of radius r centered at (0, 0) is zero, matching f(0, 0) = 0.
A function u(x, y) is harmonic if it satisfies Laplace’s equation, which states that the sum of its second partial derivatives is zero: $\frac{\partial^2 u}{\partial x^2}+\frac{\partial^2 u}{\partial y^2} = 2 - 2 = 0$, so $f(x, y) = x^2 - y^2$ is indeed a harmonic function.
The Mean Value Property states that the value of the function at the center of a circle of radius r centered at (0, 0) is equal to the average of its values over that circle. u(0, 0) = $\frac{1}{2\pi} \int_{0}^{2\pi} f(rcos(\theta), rsin(\theta))d\theta = \frac{1}{2\pi} \int_{0}^{2\pi} (rcos(\theta))^2 - (rsin(\theta))^2d\theta = \frac{1}{2\pi} \int_{0}^{2\pi} r^2(cos(\theta)^2 - sin(\theta)^2)d\theta = \frac{1}{2\pi} \int_{0}^{2\pi} r^2cos(2\theta)d\theta = \frac{r^2}{2\pi} \frac{1}{2}sin(2\theta)\bigg|_{0}^{2\pi}$
Average Value = $\frac{r^2}{2\pi} \frac{1}{2}(sin(4\pi)-sin(0)) = \frac{r^2}{4\pi} (0 - 0) = 0.$ The average value of the function over the circle is 0. Now, let’s find the value of the function at the center, (0, 0): f(0, 0) = 0² - 0² = 0. The average value (0) matches the value of the function at the center (0), confirming the Mean Value Property. This property is a fundamental characteristic of harmonic functions and plays a crucial role in complex analysis.
Proof:
Assume, for contradiction, that u is non-constant and attains a local maximum at an interior point z₀ ∈ D. By continuity there is a radius r > 0 such that $\overline{B_r(z₀)}⊂D$ and u(z) ≤ u(z₀) for every z ∈ Bᵣ(z₀).
Apply the Mean Value Property on the circle of radius r: $u(z₀) = \frac{1}{2\pi} \int_{0}^{2\pi} u(z₀+re^{i\theta})d\theta$. Because each integrand satisfies $u(z₀+re^{i\theta}) ≤ u(z₀)$, equality in the integral forces $u(z₀+re^{i\theta}) = u(z₀)$.
Vary r arbitrarily small; the same argument shows u is constant on every concentric circle, hence u is constant on the entire disk Bᵣ(z₀).
Spreading the constancy via connectedness (a domain D is an open and connected subset of ℂ). The set E = {z ∈ D | u(z) = u(z₀)} is open (because every point in E is contained in a disk on which u is constant, as shown previously). The set F = {z ∈ D | u(z) ≠ u(z₀)} is also open (by continuity of u).
u is a harmonic function on D ⊆ ℂ. A singleton set (just one real number) {$x \in \mathbb{R} \mid x = u(z_0)$} is closed in ℝ. The complement of a closed set is open, so ℝ \ {u(z₀)} is open in ℝ. F = u-1(ℝ \ {u(z₀)}) is the pre-image of an open set under the continuous map u, therefore open in the domain D.
The domain D is connected and is the disjoint union E ∪ F. Since E is not-empty (it contains z₀), connectedness (A topological space is connected if it cannot be written as the union of two non-empty disjoint open sets) forces F = ∅; hence E = D. Therefore u is constant on the entire domain D, contradicting the initial assumption that u is non-constant.
Example: f(x, y) = x has no local maxima/minima, and its extrema depend on the domain’s edges.
A function u(x, y) is harmonic if it satisfies Laplace’s equation, which states that the sum of its second partial derivatives is zero: $\frac{\partial^2 u}{\partial x^2}+\frac{\partial^2 u}{\partial y^2} = 0 - 0 = 0$, so f(x, y) = x is indeed a harmonic function.
Consider this function on a closed rectangular domain, such as the set of all points (x, y) where 0 ≤ x ≤ 1 and 0 ≤ y ≤ 1.
The extrema of the function are entirely determined by the boundary of the domain. This beautifully demonstrates the Maximum Principle. The function f(x, y) = x on this domain has a maximum of 1 and a minimum of 0, both of which are achieved on the boundary and not in the interior.
Smoothness: Harmonic functions are infinitely differentiable, which means all their partial derivatives of all orders exist and are continuous and analytic (can be represented by power series). It also means that they are very “well-behaved” functions, without sharp corners or discontinuities in their derivatives.
Uniqueness for the Dirichlet problem. If u and v are harmonic on D and agree on ∂D, then u≡v on D. The Dirichlet problem is a type of boundary value problem that seeks to find a harmonic function in a given domain D that takes on specified values on the boundary ∂D. This uniqueness theorem proves that if you find one such harmonic function, it’s the only one.
Let’s prove this by contradiction. Assume that u and v are two different harmonic functions on a domain D that both satisfy the same boundary conditions, meaning u=v on ∂D.