Let $(M,g)$ be a compact, orientable Riemannian surface with non-empty boundary $\partial M$.
Question. Does there always exist a smooth function $f:M\rightarrow \mathbb{R}$ with $\Delta_gf=0$ in the interior of $M$ and $d_pf\neq 0$ for all $p\in M$?
- For $M\subset \mathbb{R}^2$, equipped with the Euclidean metric, this is clear (just take an affine linear map).
- Given a finite subset $P\subset M$, one can always find a smooth function $f:M\rightarrow \mathbb{R}$ such that, for all $p\in P$ we have $\Delta f = 0$ near $p$ and $d_pf\neq 0$. (This follows from a well known trick used to construct isothermal coordinates, see below.)
- If $M$ is contractible, this is equivalent to the existence of global isothermal coordinates on $(M,g)$.
Proof of 2)
Extend $M$ to a closed surface $(N,g)$ and write $R:H_\perp^3(N)\rightarrow \mathbb{R}^{\vert P \vert}$ for the map that sends $f$ to the list $(\vert d_p f\vert: p\in P)\in \mathbb{R}^{\vert P \vert}$. Here $H^s_\perp(N)$ consists of Sobolev-functions of regularity $s$ with zero mean (i.e. $\perp\{\mathrm{constants}\}$). Further write $F:H_\perp^1(N)\rightarrow H_\perp^3(N)$ for the map that sends $h$ to the solution $f$ of $\Delta f = h$. Now the point is that the set $D_P=\{h\in H_\perp^1(N)\cap C^\infty(N):h \text{ vanishes near } P\}$ is dense in $H_\perp^1(N)$, which implies that $RF(D_P)\subset \mathbb{R}^{\vert P\vert}$ is dense (as both $R$ and $F$ are continuous and surjective). In particular there is a vector in $RF(D_P)\subset\mathbb{R}^{\vert P\vert}$ with all coordinates non-zero and an $R$-preimage $f\in F(D_P)$ satisfies the desired requirements.