a harmonic function
Picture a thin metal plate that has reached a steady temperature: nowhere is it heating up or cooling down anymore, the heat has settled. The temperature at each point is then a harmonic function. The defining feature is a kind of perfect balance — the value at any point is exactly the average of the values just around it, so no point is a local hot spot or cold spot of its own making. The same shape describes the electrostatic potential in empty space and the velocity potential of a smooth, swirl-free fluid.
Precisely, a real-valued function u(x, y) of two real variables is harmonic on an open region if it has continuous second partial derivatives there and satisfies Laplace's equation u_xx + u_yy = 0. The combination u_xx + u_yy is called the Laplacian of u; setting it to zero is what enforces the averaging balance. A quick way to manufacture harmonic functions: take any holomorphic function f = u + i v; both its real part u and its imaginary part v are automatically harmonic. For example f(z) = z^2 = (x^2 - y^2) + i (2 x y) hands you two harmonic functions at once, u = x^2 - y^2 and v = 2 x y, and you can check u_xx + u_yy = 2 + (-2) = 0.
Harmonic functions are the real-variable shadow of holomorphic functions, and they inherit much of their rigidity: a mean-value property, a maximum principle, smoothness, and uniqueness once you fix boundary data. They are the bread and butter of potential theory and of physics — steady temperature, electrostatics, gravitation, and ideal fluid flow all live here. The honest caveat: harmonic refers to real-valued functions and a second-order condition; do not confuse it with holomorphic, which is a complex-valued, first-order (Cauchy-Riemann) condition. Every holomorphic function gives harmonic parts, but a harmonic u is the real part of a holomorphic function only locally, or globally only when the domain is nice enough (simply connected).
u(x, y) = e^x cos y is harmonic: u_xx = e^x cos y and u_yy = -e^x cos y, so u_xx + u_yy = 0. It is in fact the real part of the holomorphic function f(z) = e^z = e^x cos y + i e^x sin y.
A harmonic function obtained as the real part of e^z; the Laplacian cancels term by term.
Harmonic always means real-valued here; |z|^2 = x^2 + y^2 is NOT harmonic (its Laplacian is 4), even though it is built from a holomorphic-looking expression — the conjugate spoils harmonicity.