# Discrete Harmonic function

Let $$(n)=\{1, \ldots , n \}$$ with $$\{0,n\}$$ frontier points and $$(n) \setminus \{0,n\}$$ interior points, we say that a function $$f: (n) \rightarrow \mathbb{R}$$ is a harmonic function if $$f(x)=\frac{f(x-1)+f(x+1)}{2}$$ for all interior points of $$(n)$$
show that

1. Every harmonic function reaches its maximum and minimum values at the frontier
2. If f and g are harmonic functions and coincide at the frontier then they are equal

First i try to found a recurrence relation $$2f(k) - f(k-1)=f(k+2)$$ and now i proceded by induction on cardinality of $$(n)$$ these is correct for 1?

For 2 i have problems i try the induction but i fail

Any hint or help i will be very grateful

• A little typo: $(n)$ is probably $\{0, \dots, n\}$ rather than $\{1, \dots, n \}$, to be consistent with the rest of the first sentence. Then hints: question 1 can be done by contradiction; question 2: study $f-g$. Commented Nov 9, 2022 at 19:12
• Note that the discrete harmonic functions are exactly the linear functions. Commented Nov 9, 2022 at 19:36

1. Assume the minimum occurs at some point $$i$$ in the interior, i.e., $$f(i) < f(j)$$ for all $$j \in (n) \setminus \{i\}$$. Since $$f$$ is harmonic, $$f(i) = \frac{f(i + 1) + f(i - 1)}{2} > \frac{f(i) + f(i)}{2} = f(i),$$ implying a contradiction. Hence, the minimum cannot occur at an interior point. You can use the same logic for maximum.
2. Consider the function $$h = f - g$$. Note that $$h$$ is also harmonic with $$h(0) = h(n) = 0$$. We claim that for any harmonic function $$h$$ with $$h(0) = 0$$, $$h(i) = ih(1)$$ for all $$i \in \{1,2,\dots,n\}$$. We prove this claim using induction. The base case for $$i = 1$$ follows immediately. Assume true for $$1, \dots, k$$ and we show it for $$k + 1$$. Using the recurrence relation you derived, we have, $$h(k+1) = 2h(k) - h(k-1) = 2kh(1) - (k-1)h(1) = (k+1)h(1)$$, as required. Hence, $$h(i) = ih(1)$$ for all $$i \in \{1,2,\dots,n\}$$. In particular, $$h(n) = nh(1)$$. But it is given that $$h(n) = 0$$ implying $$h(1) = 0$$ and consequently, $$h(i) = 0$$ for all $$i \in (n)$$. Hence, $$f - g = 0$$, or equivalently, $$f = g$$.