The real and imaginary parts of a complex analytic function both satisfy the Laplace equation. That is, if z = x + iy, and if f ( z ) = u ( x , y ) + i v ( x , y ) , then the necessary condition that f (z) be analytic is that u and v be differentiable and that the Cauchy–Riemann equations be satisfied: u x = v y , v x = − − u y . where u x is the first partial derivative of u with respect to x. It follows that u y y = ( − − v x ) y = − − ( v y ) x = − − ( u x ) x . Therefore u satisfies the Laplace equation. A similar calculation shows that v also satisfies the Laplace equation. Conversely, given a harmonic function, it is the real part of an analytic function, f (z) (at least locally). If a trial form is f ( z ) = φ φ ( x , y ) + i ψ ψ ( x , y ) , then the Cauchy–Riemann equations will be satisfied if we set ψ ψ x = − − φ φ y , ψ ψ y = φ φ x . This relation does not determine ψ, but only its increments: d ψ ψ = − − φ φ y d x + φ φ x d y . The Laplace equation for φ implies that the integrability condition for ψ is satisfied: ψ ψ x y = ψ ψ y x , and thus ψ may be defined by a line integral. The integrability condition and Stokes' theorem implies that the value of the line integral connecting two points is independent of the path. The resulting pair of solutions of the Laplace equation are called conjugate harmonic functions. This construction is only valid locally, or provided that the path does not loop around a singularity. For example, if r and θ are polar coordinates and φ φ = log ⁡ ⁡ r , then a corresponding analytic function is f ( z ) = log ⁡ ⁡ z = log ⁡ ⁡ r + i θ θ .