1 Introduction

Partial differential equations on Euclidean space or manifolds are important topics in mathematical physics and differential geometry. As their discrete versions, it is important to study the difference equations on graph, particularly the existence problem for such equations.

About five years ago, joined with Grigor’yan, we systematically raised and studied Kazdan–Warner equations, Yamabe equations and Schördinger equations on graphs in [6,7,8]. We first established the Sobolev spaces and the functional framework. Then the problem of solving the equations is transformed into finding critical points of various functionals. As a consequence, variational methods are applied to these problems. If the graph is finite, then all the Sobolev spaces have finite dimensions, and whence they are pre-compact. For this reason, the variational problems for finite graph are comparatively simple [6, 7]. Since the graph has no concept of dimension, if it includes infinite vertices, the Sobolev embedding theorems becomes unusual. An easy-to-understand one was observed by us [8] under the assumption that the graph is locally finite and its measure has positive lower bound (see next section for details). Any other Sobolev embedding theorem for infinite graph would be extremely interesting.

In recent years, the research in this field has aroused great interest. Motivated by [8, 15], Zhang–Zhao [17] obtained nontrivial solutions to certain nonlinear Schrödinger equation. Similar equations on infinite metric graphs were studied by Akduman–Pankov [2]. The Kazdan–Warner equation was extended by Keller–Schwarz [11] to canonically compactifiable graphs, and by Ge–Jiang [5] to certain infinite graph. For other related works, we refer the reader to [9, 10, 12,13,14, 16] and the references therein.

In this paper, we study various equations on locally finite graphs, say Schrördinger equation, Mean field equation and Yamabe equation. Assuming that the weights of the graph have a positive lower bound and the distance function of the graph belongs to \(L^p\), we derive a Sobolev embedding theorem, which is crucial in our analysis. In addition to the Sobolev embedding theorem, we also employ calculus of variations, including a direct method of variation and the mountain-pass theorem. It is remarkable that we show how to get solutions from local to global by using variational method.

2 Notations and main results

Let \(G=(V,E)\) be a connected graph, where V denotes the vertex set and E denotes the edge set. For any edge \(xy\in E\), we assume that its weight \(w_{xy}>0\) and that \(w_{xy}=w_{yx}\). Let \(\mu :V\rightarrow {\mathbb {R}}^+\) be a finite measure. For any function \(u:V\rightarrow {\mathbb {R}}\), the Laplacian of u is defined as

$$\begin{aligned} \Delta u(x)=\frac{1}{\mu (x)}\sum _{y\sim x}w_{xy}(u(y)-u(x)),\end{aligned}$$
(1)

where \(y\sim x\) means \(xy\in E\) or y is adjacent to x. The gradient form is written by

$$\begin{aligned} \Gamma (u,v)(x)=\frac{1}{2\mu (x)}\sum _{y\sim x}w_{xy}(u(y)-u(x))(v(y)-v(x)).\end{aligned}$$
(2)

Denote \(\Gamma (u)=\Gamma (u,u)\) and \(\nabla u\nabla v=\Gamma (u,v)\). The length of the gradient of u is represented by

$$\begin{aligned} |\nabla u|(x)=\sqrt{\Gamma (u)(x)}=\left( \frac{1}{2\mu (x)}\sum _{y\sim x}w_{xy}(u(y)-u(x))^2\right) ^{1/2}.\end{aligned}$$
(3)

The integral of a function f on V is given as

$$\begin{aligned} \int _V fd\mu =\sum _{x\in V}\mu (x)f(x).\end{aligned}$$
(4)

For any \(q>0\), we let \(L^q(V)\) be a linear space of functions \(f:V\rightarrow {\mathbb {R}}\) with the norm

$$\begin{aligned} \Vert f\Vert _{L^q(V)}=\left( \int _V|f|^qd\mu \right) ^{1/q}. \end{aligned}$$
(5)

While \(L^\infty (V)\) includes all functions \(f:V\rightarrow {\mathbb {R}}\) satisfying

$$\begin{aligned} \Vert f\Vert _{L^\infty (V)}=\sup _{x\in V}|f(x)|<\infty . \end{aligned}$$

If \(x,y\in V\) and y is adjacent to x, then the distance between x and y is defined as 1. While if y is not adjacent to x, then there exists a shortest path \(\gamma \) connecting y and x, and thus the distance between x and y is defined as the number of edges belonging to \(\gamma \). Given any \(O\in V\). Denote the distance between x and O by

$$\begin{aligned} \rho (x)=\rho (x,O). \end{aligned}$$
(6)

For any integer \(k\ge 1\), we denote a ball centered at O with radius k by

$$\begin{aligned} B_k=B_k(O)=\left\{ x\in V: \rho (x)<k\right\} . \end{aligned}$$
(7)

The boundary of \(B_k\) is written as

$$\begin{aligned} \partial B_k=\{x\in V:\rho (x)=k\}. \end{aligned}$$
(8)

According to [7], \(W_0^{1,2}(B_k)\) stands for a Sobolev space including all functions \(u:B_k\rightarrow {\mathbb {R}}\) with \(u=0\) on the boundary \(\partial B_k\) given as in (8). For any fixed k, it is pre-compact. Precisely, if \((u_j)\) is a bounded sequence in \(W_0^{1,2}(B_k)\), i.e.

$$\begin{aligned} \Vert u_k\Vert _{W_0^{1,2}(B_k)}=\left( \int _{B_k}|\nabla u_k|^2d\mu \right) ^{1/2}\le C, \end{aligned}$$
(9)

where the notations in (2), (3) and (4) are used, then there exists a subsequence of \((u_j)\) converging to some function u under the norm in (9).

Recall another important Sobolev space \(W^{1,2}(V)\) including all functions \(u:V\rightarrow {\mathbb {R}}\) with

$$\begin{aligned} \Vert u\Vert _{W^{1,2}(V)}=\left( \int _V(|\nabla u|^2+u^2)d\mu \right) ^{1/2}<+\infty .\end{aligned}$$
(10)

Let \(C_c(V)\) be a set of all functions with finite support, and \(W_0^{1,2}(V)\) be a completion of \(C_c(V)\) under the norm as in (10). Both of \(W^{1,2}(V)\) and \(W_0^{1,2}(V)\) are Hilbert spaces with the same inner product \(\langle u,v\rangle =\int _V(\nabla u\nabla v+uv)d\mu \).

A connected graph is said to be locally finite if for any fixed \(O\in V\), \(B_k\) is a finite subgraph. In [8], we made a key observation under the assumption that G is locally finite, and there exists a constant \(\mu _0>0\) satisfying

$$\begin{aligned} \mu (x)\ge \mu _0\quad \mathrm{for\,\,all}\quad x\in V. \end{aligned}$$
(11)

Namely, a Sobolev embedding theorem holds.

Theorem 1

[8]. Let \(G=(V,E)\) be a connected locally finite graph. If (11) is satisfied, then for any \(u\in W^{1,2}(V)\) and any \(2\le q\le \infty \), there exists a positive constant C depending only on q and \(\mu _0\) satisfying \(\Vert u\Vert _{L^q(V)}\le C\Vert u\Vert _{W^{1,2}(V)}\). In particular,

$$\begin{aligned} \Vert u\Vert _{L^\infty (V)}\le \frac{1}{\sqrt{\mu _0}}\Vert u\Vert _{W^{1,2}(V)}. \end{aligned}$$

If instead of (11), there exists some constant \(w_0>0\) such that

$$\begin{aligned} w_{xy}\ge w_0\quad \mathrm{for\,\, all}\quad y\sim x,\,\,x,y\in V, \end{aligned}$$
(12)

and the distance function \(\rho (x)\) defined as in (6) belongs to \(L^p(V)\), we shall prove a Sobolev embedding as follows.

Theorem 2

Let \(G=(V,E)\) be a connected locally finite graph. If the weights \(w_{xy}\) satisfy (12), and the distance function \(\rho (x)=\rho (x,O)\in L^p(V)\) for some \(p>0\) and some \(O\in V\), then there exists some constant C depending only on \(w_0\), \(\mu (O)\) and p such that

$$\begin{aligned} \Vert u\Vert _{L^p(V)}\le C(\Vert \rho \Vert _{L^p(V)}+1)\Vert u\Vert _{W^{1,2}(V)}. \end{aligned}$$

If a function \(h:V\rightarrow {\mathbb {R}}\) has a positive lower bound on V, then we define a subspace of \(W_0^{1,2}(V)\), which is also a Hilbert space, namely

$$\begin{aligned} {\mathscr {H}}=\left\{ u\in W_0^{1,2}(V): \int _V(|\nabla u|^2+hu^2)d\mu <\infty \right\} \end{aligned}$$
(13)

with an inner product

$$\begin{aligned} \langle u,v\rangle _{{\mathscr {H}}}=\int _V(\nabla u\nabla v+huv)d\mu . \end{aligned}$$
(14)

The first equation we concern is the following linear Schrödinger equation

$$\begin{aligned} \left\{ \begin{array}{l} -\Delta u+hu=f~d\mathrm{in}~ V\\ u\in {\mathscr {H}} ,\end{array}\right. \end{aligned}$$
(15)

where \(\Delta \) is the Laplacian operator defined as in (1), and \({\mathscr {H}}\) is defined as in (13). We now state the following existence result.

Theorem 3

Let \(G=(V,E)\) be a connected locally finite graph. Assume there is some constant \(a_0>0\) such that \(h(x)\ge a_0\) for all \(x\in V\). If one of the following three hypotheses is satisfied:

(i):

\(f\in L^2(V)\);

(ii):

\(\mu (x)\ge \mu _0>0\) for all \(x\in V\), \(f\in L^1(V)\);

(iii):

the weights of the graph satisfies (12), the distance function \(\rho (x)=\rho (x,O)\in L^p(V)\) for some \(p>1\), \(O\in V\), and \(f\in L^{p/(p-1)}(V)\),

then the Eq. (15) has a unique solution. If in addition \(f\ge 0\) and \(f\not \equiv 0\) on V, then \(u(x)>0\) for all \(x\in V\).

The second equation we concern is the mean field equation, which is also known as the Kazdan–Warnar equation, namely

$$\begin{aligned} \Delta u=f-ge^u\quad \mathrm{in}\quad V. \end{aligned}$$
(16)

Theorem 4

Let \(G=(V,E)\) be a locally finite graph. Suppose that \(g\le f<0\) on V and \(g\in L^1(V)\). Then the Eq. (16) has a solution.

We remak that using a method of the heat equation, Ge-Jiang [5] obtained similar result as that of Theorem 4 under different assumptions on f and g. In the case \(g>0\), it is not likely to find a nontrivial solution as in Theorem 4 in general. The main difficulty is that \(\int _V|\nabla u|^2d\mu \) does not control \(\Vert u\Vert _{W^{1,2}(V)}\) if V is an infinite graph. However, it is natural to consider the following mean field equation

$$\begin{aligned} \left\{ \begin{array}{l} -\Delta u+hu=\frac{ge^u}{\int _Vge^ud\mu }-f~\mathrm{in}~\quad V\\ u\in {\mathscr {H}}\cap L^\infty (V), \end{array} \right. \end{aligned}$$
(17)

where h has a positive lower bound, and \({\mathscr {H}}\) is defined as in (13). To seek solutions of (17), we need certain Trudinger–Moser embedding. It suffices to assume (11) for the graph in order to get that kind of embedding. Precisely we have the following:

Theorem 5

Let \(G=(V,E)\) be a connected locally finite graph. Suppose (11) is satisfied, there exists some constant \(a_0>0\) such that \(h(x)\ge a_0\) for all \(x\in V\), \(g\ge 0\) and \(g\not \equiv 0\) on V, \(g\in L^1(V)\), and \(f\in L^q(V)\) for some \(q\in [1,2]\). Then the Eq. (17) has a solution.

Note that in Theorem 5, the function f allows the form \(\sum _{i=1}^\ell c_i\delta _{x_i}\) for some constants \(c_1,\cdots ,c_\ell \), where \(\delta _{x_i}\) stands for the Dirac function satisfying

$$\begin{aligned} \delta _{x_i}(x)=\left\{ \begin{array}{ll} 1&{}\quad \mathrm{if}~x=x_i\\ 0&{}\quad \mathrm{if}~x\not =x_i. \end{array} \right. \end{aligned}$$

As a consequence, it makes sense to consider Chern–Simons–Higgs model in locally finite graph. Such a model in finite graph was recently studied by Huang–Lin–Yau [10].

The third equation we are interested in is the Yamabe equation

$$\begin{aligned} \left\{ \begin{array}{l}-\Delta u+hu=|u|^{q-2}u\quad \mathrm{in}\quad V\\ u\in {\mathscr {H}},\end{array}\right. \end{aligned}$$
(18)

where h has a positive lower bound, \({\mathscr {H}}\) is defined as in (13), and \(q>2\). In order to find a solution to the Eq. (18), we seek the Sobolev embedding theorem, say Theorem 1 or Theorem 2. Inspired by [1, 4, 15], we have solved this problem in [8] by employing Theorem 1. For application of Theorem 2, we state the following:

Theorem 6

Let \(G=(V,E)\) be a connected locally finite graph. Let O be a fixed point of V, the distance function \(\rho (x)=\rho (x,O)\in L^p(V)\) for some \(p>2\). Suppose \(h(x)\ge a_0>0\) for some constant \(a_0\) and all \(x\in V\). If further \(1/h\in L^1(V)\) or \(h(x)\rightarrow +\infty \) as \(\rho (x)\rightarrow +\infty \), then for any q with \(2<q<p\), the Eq. (18) has a nontrivial solution.

The remaining part of this paper is organized as follows: In Sect. 3, a Sobolev embedding theorem (Theorem 2) is proved; In Sect. 4, we study the linear Schrödinger equation, and prove Theorem 3; In Sect. 5, the mean field equations are discussed, and Theorems 4 and 5 are proved; In Sect. 6, we consider the Yamabe equation and prove Theorem 6. Throughout this paper, we do not distinguish sequence and subsequence, and denote various constants by the same C.

3 A Sobolev embedding

In this section, using definitions of \(W^{1,2}(V)\) and \(L^p(V)\), we prove Theorem 2.

Proof of Theorem 2

Let O be a fixed point in V. For any \(x\in V\), we denote the distance between x and O by \(\rho (x)=\rho (x,O)\). Choose a shortest path \(\gamma =\{x_1,\cdots ,x_{k+1}\}\) connecting x and O. In particular \(x_1=x\), \(\cdots \), \(x_{k+1}=O\), \(x_i\) is adjacent to \(x_{i+1}\) for all \(1\le i\le k\), and \(k=\rho (x)\). For any \(u\in W^{1,2}(V)\), we get

$$\begin{aligned} |u(x)|\le |u(x_1)-u(x_2)|+\cdots +|u(x_k)-u(x_{k+1})|+|u(O)|.\end{aligned}$$
(19)

Noting that (10) implies

$$\begin{aligned} \Vert u\Vert _{W^{1,2}(V)}=\left( \sum _{z\in V,\,y\sim z}w_{zy}(u(y)-u(z))^2+\sum _{z\in V}\mu (z)u^2(z)\right) ^{1/2},\end{aligned}$$
(20)

and that \(\mu (z)>0\) for all \(z\in V\), we have

$$\begin{aligned} |u(O)|\le \frac{1}{\sqrt{\mu (O)}}\Vert u\Vert _{W^{1,2}(V)};\end{aligned}$$
(21)

since \(w_{zy}\ge w_0>0\) for all z adjacent to y, in view of (20),

$$\begin{aligned} \sum _{i=1}^k|u(x_i)-u(x_{i+1})|\le & {} k\max _{1\le i\le k}|u(x_i)-u(x_{i+1})|\nonumber \\\le & {} \frac{k}{\sqrt{w_0}}\max _{1\le i\le k}\sqrt{w_{x_ix_{i+1}}}|u(x_i)-u(x_{i+1})|\nonumber \\\le & {} \frac{1}{\sqrt{w_0}}\rho (x)\Vert u\Vert _{W^{1,2}(V)}.\nonumber \\ \end{aligned}$$
(22)

Combining (19), (21) and (22), we obtain

$$\begin{aligned} |u(x)|\le \left( \frac{1}{\sqrt{w_0}}\rho (x)+\frac{1}{\sqrt{\mu (O)}}\right) \Vert u\Vert _{W^{1,2}(V)}.\end{aligned}$$
(23)

Since \(\rho \in L^p(V)\) for some \(p>0\) and \(\rho (x,y)\ge 1\) for all \(x\not =y\), in view of (5), there holds

$$\begin{aligned}\Vert 1\Vert _{L^p(V)}=\left( \sum _{z\in V}\mu (z)\right) ^{1/p}\le & {} \left( \sum _{z\in V}\mu (z)\rho ^p(z)+\mu (O)\right) ^{1/p}\\\le & {} 2^{1/p}\max \left\{ \left( \sum _{z\in V}\mu (z)\rho ^p(z)\right) ^{1/p},\,\mu (O)^{1/p}\right\} \\= & {} 2^{1/p}\max \left\{ \Vert \rho \Vert _{L^p(V)},\,\mu (O)^{1/p}\right\} .\end{aligned}$$

This together with (23) leads to

$$\begin{aligned} \Vert u\Vert _{L^p(V)}\le & {} C\left( \frac{1}{\sqrt{w_0}}\Vert \rho \Vert _{L^p(V)}+\frac{1}{\sqrt{\mu (O)}}\Vert 1\Vert _{L^p(V)}\right) \Vert u\Vert _{W^{12}(V)}\\\le & {} C(\Vert \rho \Vert _{L^p(V)}+1)\Vert u\Vert _{W^{1,2}(V)} \end{aligned}$$

for some constant C depending only on \(w_0\), \(\mu (O)\) and p, as we expected. \(\square \)

4 Schrödinger equation

In this section, we prove Theorem 3 by using a direct method of variation from local to global.

Proof of Theorem 3

Fix some point \(O\in V\). Denote the distance between x and O by \(\rho (x)=\rho (x,O)\). For any positive integer k, we write \(B_k=\{x\in V: \rho (x)<k\}\). Note that \(h(x)\ge a_0>0\) for all \(x\in V\). Let \(W_0^{1,2}(B_k)\) be the Sobolev space including all functions \(u:B_k\rightarrow {\mathbb {R}}\), \(u=0\) on \(\partial B_k\), with the norm

$$\begin{aligned} \Vert u\Vert _{W_0^{1,2}(B_k)}=\left( \int _{B_k}(|\nabla u|^2+hu^2)d\mu \right) ^{1/2}.\end{aligned}$$
(24)

For any fixed k, the norm in (24) is equivalent to that in (9), due to the Poincaré inequality

$$\begin{aligned} \int _{B_k}u^2d\mu \le C_k\int _{B_k}|\nabla u|^2d\mu ,\quad \forall u\in W_0^{1,2}(B_k), \end{aligned}$$

where \(C_k\) is a constant depending on k. In general, \(C_k\) tends to infinity as \(k\rightarrow \infty \). It is convenient for us to use (24) as the norm in \(W_0^{1,2}(B_k)\). Define a functional \(J_k: W_0^{1,2}(B_k)\rightarrow {\mathbb {R}}\) by

$$\begin{aligned} J_k(u)=\frac{1}{2}\int _{B_k}(|\nabla u|^2+hu^2)d\mu -\int _{B_k}fud\mu .\end{aligned}$$
(25)

Set \(\Lambda _k=\inf _{u\in W_0^{1,2}(B_k)}J_k(u)\). Obviously

$$\begin{aligned} \Lambda _k\le J_k(0)=0.\end{aligned}$$
(26)

Case (i). \(f\in L^2(V)\).

By the Hölder inequality and the Young inequality, we have

$$\begin{aligned} \int _{B_k}fud\mu\le & {} \frac{1}{\sqrt{a_0}}\left( \int _Vf^2d\mu \right) ^{1/2}\left( \int _{B_k}hu^2d\mu \right) ^{1/2}\nonumber \\\le & {} \frac{1}{\sqrt{a_0}}\Vert f\Vert _{L^2(V)}\Vert u\Vert _{W_0^{1,2}(B_k)}\nonumber \\\le & {} \frac{1}{4}\Vert u\Vert _{W_0^{1,2}(B_k)}^2+\frac{1}{a_0}\Vert f\Vert _{L^2(V)}^2, \end{aligned}$$
(27)

where \(\Vert u\Vert _{W_0^{1,2}(B_k)}\) is defined as in (24). It follows from (25) and (27) that

$$\begin{aligned} J_k(u)\ge \frac{1}{4}\Vert u\Vert _{W_0^{1,2}(B_k)}^2-\frac{1}{a_0}\Vert f\Vert _{L^2(V)}^2.\end{aligned}$$
(28)

Hence

$$\begin{aligned} \Lambda _k=\inf _{u\in W_0^{1,2}(B_k)}J_k(u)\ge -\frac{1}{a_0}\Vert f\Vert _{L^2(V)}^2.\end{aligned}$$
(29)

Combining (26) and (29), we know that \((\Lambda _k)\) is a bounded sequence of numbers. Now we fix a positive integer k and take a sequence of functions \(({\widetilde{u}}_j)\subset W_0^{1,2}(B_k)\) satisfying

$$\begin{aligned} J_k({\widetilde{u}}_j)\rightarrow \Lambda _k\quad \mathrm{as}\quad j\rightarrow \infty .\end{aligned}$$
(30)

It follows from (28) that \(({\widetilde{u}}_j)\) is bounded in \(W_0^{1,2}(B_k)\). By the Sobolev embedding theorem for finite graph [7], there exists a \(u_k\in W_0^{1,2}(B_k)\) such that up to a subsequence, \({\widetilde{u}}_j\) converges to \(u_k\) under the norm (24). Clearly \(J_k(u_k)=\Lambda _k\), and \(u_k\) satisfies the Euler–Lagrange equation

$$\begin{aligned} \left\{ \begin{array}{ll} -\Delta u_k+hu_k=f&{}\quad \mathrm{in}~ B_k\\ u_k=0&{}\quad \mathrm{on}~ \partial B_k. \end{array}\right. \end{aligned}$$
(31)

Noting that \((\Lambda _k)\) is bounded, in view of (28) and (30), we obtain

$$\begin{aligned} \Vert u_k\Vert _{W_0^{1,2}(B_k)}^2=\int _{B_k}(|\nabla u_k|^2+hu_k^2)d\mu \le C\end{aligned}$$
(32)

for some constant C independent of k. For any finite set \(K\subset V\), there holds \(K\subset B_k\) for sufficiently large k. The power of (32) is evident. It ensures that

$$\begin{aligned} \Vert u_k\Vert _{L^\infty (K)}\le \frac{1}{\sqrt{a_0}\min _{x\in K}\mu (x)}\Vert u_k\Vert ^2_{W_0^{1,2}(B_k)}\le C. \end{aligned}$$

Note that \((u_k)\) is naturally viewed as a sequence of functions defined on V, say \(u_k\equiv 0\) on \(V\setminus B_k\). There would exist a subsequence of \((u_k)\) (which is still denoted by \((u_k)\)) and a function \(u^*\) such that \((u_k)\) converges to \(u^*\) locally uniformly in V, i.e. for any fixed positive integer \(\ell \),

$$\begin{aligned} \lim _{k\rightarrow \infty }u_k(x)=u^*(x)\quad \mathrm{for\,\,all}\quad x\in B_\ell . \end{aligned}$$

Now we show that

$$\begin{aligned} u^*\in {\mathscr {H}}.\end{aligned}$$
(33)

Since \(u_k\) is viewed as a function on the whole V, \(u_k=0\) on \(V\setminus B_k\), and the weights of the graph is symmetric, i.e. \(w_{xy}=w_{yx}\) for all y adjacent to x, we have the following estimate

$$\begin{aligned} \Vert u_k\Vert _{{\mathscr {H}}}^2= & {} \sum _{y\sim x}w_{xy}(u_k(y)-u_k(x))^2+\sum _{x\in V}\mu (x)h(x)u_k^2(x)\nonumber \\= & {} \sum _{y\sim x,\,x\in B_k}w_{xy}(u_k(y)-u_k(x))^2+\sum _{x\in B_k}\mu (x)h(x)u_k^2(x)\nonumber \\&+\sum _{y\sim x,\,x\in \partial B_k}w_{xy}(u_k(y)-u_k(x))^2\nonumber \\\le & {} 2\sum _{y\sim x,\,x\in B_k}w_{xy}(u_k(y)-u_k(x))^2+\sum _{x\in B_k}\mu (x)h(x)u_k^2(x)\nonumber \\\le & {} 2\Vert u_k\Vert ^2_{W_0^{1,2}(B_k)}. \end{aligned}$$
(34)

Up to a subsequence, we assume \((u_k)\) converges to \(u^*\) locally uniformly in V. In view of (32) and (34), we know that \((u_k)\) is bounded in \({\mathscr {H}}\). Since every Hilbert space is weakly compact, it follows that up to a subsequence, \((u_k)\) converges to some function \(u_1^*\) weakly in \({\mathscr {H}}\). This in particular implies

$$\begin{aligned} \int _Vu_k\phi d\mu \rightarrow \int _V u_1^*\phi d\mu ,\quad \forall \phi \in C_c(V). \end{aligned}$$

Let \(z\in V\) be any fixed point. In the above estimate, we take \(\phi \) satisfying \(\phi (x)=1\) at \(x=z\) and \(\phi (x)=0\) at \(x\not =z\). Then \(u_k(z)\rightarrow u_1^*(z)\). Hence by the uniqueness of the limit, \(u_1^*(z)\equiv u^*(z)\) for all \(z\in V\), and (33) follows immediately.

It then follows from (31) that for any fixed \(x\in V\), there holds

$$\begin{aligned} -\Delta u^*(x)+h(x)u^*(x)=f(x). \end{aligned}$$

Therefore \(u^*\) is a solution of (15). To prove that \(u^*\) is a unique solution of (15), it suffices to show the homogenueous equation

$$\begin{aligned} \left\{ \begin{array}{l}-\Delta u+hu=0\\ u\in {\mathscr {H}}\end{array}\right. \end{aligned}$$
(35)

has only one solution \(u\equiv 0\). Since \(u\in {\mathscr {H}}\), there exists a sequence \((\varphi _k)\subset C_c(V)\) such that \(\varphi _k\rightarrow u\) in \({\mathscr {H}}\). Testing (35) by \(\varphi _k\), we have by integration by parts

$$\begin{aligned} \langle \varphi _k,u\rangle _{{\mathscr {H}}}=\int _V(\nabla u\nabla \varphi _k+hu\varphi _k)d\mu =0, \end{aligned}$$

where \(\langle \cdot ,\cdot \rangle _{{\mathscr {H}}}\) is the inner product in \({\mathscr {H}}\) defined as in (14). Passing to the limit \(k\rightarrow \infty \), we conclude \(\langle u,u\rangle _{{\mathscr {H}}}=0\), and thus \(u\equiv 0\). This confirms the uniqueness of \(u^*\).

If \(f(x)\ge 0\) for all \(x\in V\), then applying the maximum principle to (31), we obtain \(u_k(x)\ge 0\) for all \(x\in B_k\). Indeed, suppose there exists some \(x_0\in B_k\) satisfying \(\min _{B_k}u_k=u_k(x_0)<0\), we have by (31) that

$$\begin{aligned} -\Delta u_k(x_0)=f(x_0)-h(x_0)u_k(x_0)>0. \end{aligned}$$

This is impossible, and leads to \(u_k\ge 0\) on \(B_k\). As a consequence, \(u^*(x)\ge 0\) for all \(x\in V\). Since \(f\not \equiv 0\), one has \(u^*\not \equiv 0\). We now prove \(u^*(x)>0\) for all \(x\in V\). Suppose not, there would be a point \(x^*\in V\) such that \(u^*(x^*)=0=\min _Vu^*\) and \(\Delta u^*(x^*)>0\). It follows that

$$\begin{aligned} 0>-\Delta u^*(x^*)=f(x^*)\ge 0, \end{aligned}$$

which is a contradiction, and implies \(u^*(x)>0\) for all \(x\in V\).

Case (ii). \(\mu (x)\ge \mu _0>0\) for all \(x\in V\).

By the Sobolev embedding theorem (Theorem 1), we have for all \(u\in W_0^{1,2}(B_k)\),

$$\begin{aligned} \Vert u\Vert _{L^\infty (B_k)}\le \frac{1}{\sqrt{\mu _0}}\Vert u\Vert _{W_0^{1,2}(B_k)}. \end{aligned}$$

Similar to (27), there holds

$$\begin{aligned}\int _{B_k}fud\mu\le & {} \Vert u\Vert _{L^\infty (B_k)}\Vert f\Vert _{L^1(B_k)}\\\le & {} \frac{1}{\sqrt{\mu _0}}\Vert u\Vert _{W_0^{1,2}(B_k)}\Vert f\Vert _{L^1(V)}\\\le & {} \frac{1}{4}\Vert u\Vert _{W_0^{1,2}(B_k)}^2+\frac{1}{\mu _0}\Vert f\Vert _{L^1(V)}^2.\end{aligned}$$

In the same way, for any \(u\in W_0^{1,2}(B_k)\), we obtain analogs of (28) and (29), namely

$$\begin{aligned} J_k(u)\ge \frac{1}{4}\Vert u\Vert _{W_0^{1,2}(B_k)}^2-\frac{1}{\mu _0}\Vert f\Vert _{L^1(V)}^2 \end{aligned}$$

and

$$\begin{aligned} \Lambda _k=\inf _{u\in W_0^{1,2}(B_k)}J_k(u)\ge -\frac{1}{\mu _0}\Vert f\Vert _{L^1(V)}^2. \end{aligned}$$

The remaining part of the proof is completely analogous to that of the case (i), and is omitted.

Case (iii). \(w_{xy}\ge w_0>0\) for all y adjacent to x, \(\rho \in L^p(V)\) and \(f\in L^{{p}/{(p-1)}}(V)\) for some \(p\in [1,\infty ]\), in particular \(f\in L^\infty (V)\) if \(p=1\).

It follows from the Sobolev embedding (Theorem 2) that there exists some constant C depending only on \(w_0\), \(\mu (O)\), \(\Vert \rho \Vert _{L^p(V)}\) and p satisfying

$$\begin{aligned} \Vert u\Vert _{L^p(B_k)}\le C\Vert u\Vert _{W_0^{1,2}(B_k)},\quad \forall u\in W_0^{1,2}(B_k). \end{aligned}$$

Similar to (27), we have

$$\begin{aligned}\int _{B_k}fud\mu\le & {} \Vert u\Vert _{L^p(B_k)}\Vert f\Vert _{L^{\frac{p}{p-1}}(V)}\\\le & {} C\Vert u\Vert _{W_0^{1,2}(B_k)}\Vert f\Vert _{L^{\frac{p}{p-1}}(V)}\\\le & {} \frac{1}{4}\Vert u\Vert _{W_0^{1,2}(B_k)}^2+C^2\Vert f\Vert _{L^{\frac{p}{p-1}}(V)}^2.\end{aligned}$$

As a consequence, we obtain analogs of (28) and (29) as follows:

$$\begin{aligned} J_k(u)\ge \frac{1}{4}\Vert u\Vert _{W_0^{1,2}(B_k)}^2-C^2\Vert f\Vert _{L^{\frac{p}{p-1}}(V)}^2, \end{aligned}$$

and

$$\begin{aligned} \Lambda _k=\inf _{u\in W_0^{1,2}(B_k)}J_k(u)\ge -C^2\Vert f\Vert _{L^{\frac{p}{p-1}}(V)}^2. \end{aligned}$$

Again the remaining part of the proof in this case is completely analogous to that of Case (i), and thus is omitted. \(\square \)

5 Mean field equation

In this section, we consider mean field equations. Precisely we prove Theorems 4 and 5 by variational method from local to global.

5.1 The case \(g\le f<0\)

Proof of Theorem 4

Fix some point \(O\in V\). For any \(x\in V\), \(\rho (x)=\rho (x,O)\) denotes the distance between x and O. For any positive integer k, we let \(B_k=\{x\in V:\rho (x)<k\}\), and define a functional \(J_k:W_0^{1,2}(B_k)\rightarrow {\mathbb {R}}\) by

$$\begin{aligned} J_k(u)=\frac{1}{2}\int _{B_k}|\nabla u|^2d\mu +\int _{B_k}fud\mu -\int _{B_k}ge^ud\mu . \end{aligned}$$

Step 1. For any positive integer k, \(J_k\) has a lower bound on \(W_0^{1,2}(B_k)\).

Since \(g\le f<0\) and \(g\in L^1(V)\), we have also \(f\in L^1(V)\). An elementary inequality \(e^t\ge 1+t\) for all \(t\in {\mathbb {R}}\) implies that for all \(u\in W_0^{1,2}(B_k)\),

$$\begin{aligned} J_k(u)\ge & {} \int _{B_k}fud\mu -\int _{B_k}ge^ud\mu \nonumber \\\ge & {} \int _{B_k}f(u-e^u)d\mu \nonumber \\\ge & {} \int _{B_k}(-f)d\mu \nonumber \\= & {} \int _V(-f)d\mu +o_k(1), \end{aligned}$$
(36)

where \(o_k(1)\rightarrow 0\) as \(k\rightarrow \infty \). Denoting \(c_k=\int _{B_k}(-f)d\mu \), we obtain \(J_k(u)\ge c_k\) for all \(u\in W_0^{1,2}(B_k)\).

Step 2. For any positive integer k, there exists a function \(u_k\in W_0^{1,2}(B_k)\) such that

$$\begin{aligned} J_k(u_k)=\Lambda _k=\inf _{u\in W_0^{1,2}(B_k)}J_k(u).\end{aligned}$$
(37)

Moreover \(u_k\) satisfies the Euler–Lagrange equation

$$\begin{aligned} \left\{ \begin{array}{ll} \Delta u_k=f-ge^{u_k} &{}\quad \mathrm{in}~B_k\\ u_k=0&{}\quad \mathrm{on}~\partial B_k. \end{array}\right. \end{aligned}$$
(38)

Obviously there holds

$$\begin{aligned} \Lambda _k\le J_k(0)=\int _{B_k}(-g)d\mu \le \int _V(-g)d\mu . \end{aligned}$$

This together with (36) gives

$$\begin{aligned} \Vert f\Vert _{L^1(V)}+o_k(1)\le \Lambda _k\le \Vert g\Vert _{L^1(V)}.\end{aligned}$$
(39)

Take a minimizing sequence \(({\widetilde{u}}_j)\subset W_0^{1,2}(B_k)\) satisfying

$$\begin{aligned} J_k({\widetilde{u}}_j)\rightarrow \Lambda _k=\inf _{u\in W_0^{1,2}(B_k)}J_k(u)\quad \mathrm{as}\quad j\rightarrow \infty .\end{aligned}$$
(40)

For any function \(v:V\rightarrow {\mathbb {R}}\), we write

$$\begin{aligned} v^+(x)=\left\{ \begin{array}{ll} v(x)&{}\quad \mathrm{if}~ v(x)> 0\\ 0&{}\quad \mathrm{if}~ v(x)\le 0; \end{array}\right. \quad v^-(x)=\left\{ \begin{array}{lll} v(x)&{}\quad \mathrm{if}~ v(x)< 0\\ 0&{}\quad \mathrm{if}~ v(x)\ge 0. \end{array}\right. \end{aligned}$$

To see a lower bound of \(J_k({\widetilde{u}}_j)\), we calculate

$$\begin{aligned} J_k({\widetilde{u}}_j)= & {} \frac{1}{2}\int _{B_k}|\nabla {\widetilde{u}}_j|^2d\mu +\int _{B_k}(f{\widetilde{u}}_j^+-ge^{{\widetilde{u}}_j^+})d\mu \nonumber \\&-\int _{B_k}ge^{{\widetilde{u}}_j^-}d\mu +\int _{B_k} f{\widetilde{u}}_j^-d\mu +\int _{B_k}gd\mu \nonumber \\\ge & {} \frac{1}{2}\int _{B_k}|\nabla {\widetilde{u}}_j|^2d\mu +\int _{B_k}(f{\widetilde{u}}_j^+-ge^{{\widetilde{u}}_j^+})d\mu +\int _{B_k} f{\widetilde{u}}_j^-d\mu +\int _{B_k}gd\mu .\nonumber \\ \end{aligned}$$
(41)

Combining (40) and (41), and noting that \(g(x)\le f(x)<0\), \({\widetilde{u}}_j^-(x)\le 0\) for all \(x\in B_k\), we conclude that \(({\widetilde{u}}_j^-)\) is bounded in \(B_k\) with respect to j, or equivalently there exists some constant C depending on k such that

$$\begin{aligned} |{\widetilde{u}}_j^-(x)|\le C\quad \mathrm{for\,\,all}\quad x\in B_k.\end{aligned}$$
(42)

Note also that

$$\begin{aligned} f{\widetilde{u}}_j^+-ge^{{\widetilde{u}}_j^+}\ge f{\widetilde{u}}_j^+-fe^{{\widetilde{u}}_j^+}\ge -\frac{f}{2}{({\widetilde{u}}_j^+)}^2, \end{aligned}$$

which together with (40) and (41) leads to

$$\begin{aligned} {\widetilde{u}}_j^+(x)\le C\quad \mathrm{for\,\,all}\quad x\in B_k,\end{aligned}$$
(43)

where C is some constant depending on k. It follows from (42) and (43) that \((u_j)\) is uniformly bounded in \(B_k\) with respect to j. Hence there exist a subsequence of \(({\widetilde{u}}_j)\), which is still denoted by \(({\widetilde{u}}_j)\), and a function \({u}_k\in W_0^{1,2}(B_k)\) such that \({\widetilde{u}}_j\) converges to \({u_k}\) uniformly in \(B_k\) as \(j\rightarrow \infty \). This together with (40) immediately leads to (37). By a straightforward calculation, \({u}_k\) satisfies the Euler–Lagrange equation (38).

Step 3. For any finite set \(A\subset V\) , \((u_k)\) is uniformly bounded in A .

Let A be a finite subset of V. An obvious analog of (41) reads

$$\begin{aligned} J_k(u_k)\ge & {} \frac{1}{2}\int _{B_k}|\nabla u_k|^2d\mu +\int _{B_k}(fu_k^+-ge^{u_k^+})d\mu +\int _{B_k}fu_k^-d\mu +\int _{B_k}gd\mu \nonumber \\\ge & {} \int _{A}(fu_k^+-ge^{u_k^+})d\mu +\int _{A}fu_k^-d\mu +\int _{B_k}gd\mu , \end{aligned}$$

provided that k is sufficiently large. As a consequence, one derives

$$\begin{aligned} \max _{x\in A}|u_k^-(x)|\le \frac{J_k(u_k)-\int _{B_k}gd\mu }{\min _{x\in A}\mu (x)|f(x)|};\quad \max _{x\in A}u_k^+(x)\le \sqrt{\frac{2J_k(u_k)-2\int _{B_k}gd\mu }{\min _{x\in A}\mu (x)|f(x)|}}.\nonumber \\ \end{aligned}$$
(44)

Combining (37), (39) and (44), we conclude that there exists some constant C depending only on h, g, \(\mu \) and A such that

$$\begin{aligned} \max _{x\in A}|u_k(x)|\le C. \end{aligned}$$

Step 4. There exists a subsequence of \((u_k)\), which is still denoted by \((u_k)\), and a function \(u^*:V\rightarrow {\mathbb {R}}\) such that \((u_k)\) converges to \(u^*\) locally uniformly in V. Moreover, \(u^*\) is a solution of the equation (16).

By Step 3, \((u_k)\) is uniformly bounded in \(B_1\). Hence there exists a subsequence of \((u_k)\), which is written as \((u_{1,k})\), and a function \(u_1^*\) such that \(u_{1,k}\) converges to \(u_1^*\) in \(B_1\). By Step 3 again, \((u_{1,k})\) is uniformly bounded in \(B_2\). Then there would exist a subsequence of \((u_{1,k})\), which is written as \((u_{2,k})\), and a function \(u_2^*\) such that \(u_{2,k}\) convergence to \(u_2^*\) uniformly in \(B_2\). Obviously \(u_{2}^*=u_1^*\) on \(B_1\). Repeating this process, one finds a diagonal subsequence \((u_{k,k})\), which is still denoted by \((u_{k})\), and a function \(u^*:V\rightarrow {\mathbb {R}}\) such that for any finite set \(A\subset V\), \((u_k)\) converges to \(u^*\) uniformly in A. For any fixed \(x\in V\), passing to the limit \(k\rightarrow \infty \) in (38), we obtain

$$\begin{aligned} \Delta u^*(x)=f(x)-g(x)e^{u^*(x)}. \end{aligned}$$

This ends the final step and completes the proof of the theorem. \(\square \)

5.2 The case \(g>0\)

Proof of Theorem 5

Fix some point \(O\in V\). For any \(x\in V\), \(\rho (x)=\rho (x,O)\) denotes the distance between x and O. Let \(B_k=\{x\in V:\rho (x)<k\}\), \(W_0^{1,2}(B_k)\) be the Sobolev space including all functions u satisfying \(u=0\) on \(\partial B_k\), with the norm

$$\begin{aligned} \Vert u\Vert _{W_0^{1,2}(B_k)}=\left( \int _{B_k}(|\nabla u|^2+hu^2)d\mu \right) ^{1/2}, \end{aligned}$$

where \(h(x)\ge a_0>0\), \(\mu (x)\ge \mu _0>0\) for all \(x\in V\). Define a functional \(J_k:W_0^{1,2}(B_k)\rightarrow {\mathbb {R}}\) by

$$\begin{aligned} J_k(u)=\frac{1}{2}\int _{B_k}(|\nabla u|^2+hu^2)d\mu +\int _{B_k}fud\mu -\log \int _{B_k}ge^{u}d\mu .\end{aligned}$$
(45)

Since \(f\in L^q(V)\) for some q with \(1\le q\le 2\), we have by the Sobolev embedding (Theorem 1),

$$\begin{aligned} \left| \int _{B_k}fud\mu \right| \le \Vert f\Vert _{L^q(V)}\Vert u\Vert _{L^p(B_k)}\le C\Vert f\Vert _{L^q(V)}\Vert u\Vert _{W_0^{1,2}(B_k)}\end{aligned}$$
(46)

for some constant C depending only on \(\mu _0\), \(a_0\) and q, where \(1/p+1/q=1\). Since

$$\begin{aligned} \Vert v\Vert _{L^\infty (B_k)}\le \frac{1}{\sqrt{\mu _0a_0}}\Vert v\Vert _{W_0^{1,2}(B_k)},\quad \forall v\in W_0^{1,2}(B_k), \end{aligned}$$

there holds for any \(\epsilon >0\),

$$\begin{aligned} e^{u}\le e^{\frac{u^2}{4\epsilon \Vert u\Vert _{W_0^{1,2}(B_k)}^2}+\epsilon \Vert u\Vert _{W_0^{1,2}(B_k)}^2}\le e^{\frac{1}{4\epsilon \mu _0a_0}+\epsilon \Vert u\Vert _{W_0^{1,2}(B_k)}^2}. \end{aligned}$$

It then follows that

$$\begin{aligned} \log \int _{B_k}ge^ud\mu \le \log \Vert g\Vert _{L^1(V)}+\frac{1}{4\epsilon \mu _0a_0}+\epsilon \Vert u\Vert _{W_0^{1,2}(B_k)}^2.\end{aligned}$$
(47)

Note that \(\Vert g\Vert _{L^1(V)}>0\), since \(g\ge 0\) but \(g\not \equiv 0\). Inserting (46) and (47) into (45), we obtain

$$\begin{aligned} J_k(u)\ge & {} \left( \frac{1}{2}-\epsilon \right) \Vert u\Vert _{W_0^{1,2}(B_k)}^2-\frac{1}{4}\Vert u\Vert _{W_0^{1,2}(B_k)}^2\nonumber \\&-C^2\Vert f\Vert _{L^q(V)}^2-\log \Vert g\Vert _{L^1(V)}-\frac{1}{4\epsilon \mu _0a_0}. \end{aligned}$$

Choosing \(\epsilon =1/8\), we immediately have for any \(u\in W_0^{1,2}(B_k)\),

$$\begin{aligned} J_k(u)\ge \frac{1}{8}\Vert u\Vert _{W_0^{1,2}(B_k)}^2-C^2\Vert f\Vert _{L^q(V)}^2-\log \Vert g\Vert _{L^1(V)}-\frac{2}{\mu _0a_0}.\end{aligned}$$
(48)

Hence \(J_k\) has a lower bound in \(W_0^{1,2}(B_k)\). Take a minimizing sequence \(({\widetilde{u}}_j)\subset W_0^{1,2}(B_k)\) such that

$$\begin{aligned} J_k({\widetilde{u}}_j)\rightarrow \Lambda _k=\inf _{u\in W_0^{1,2}(B_k)}J_k(u)\quad \mathrm{as}\quad j\rightarrow \infty .\end{aligned}$$
(49)

Since \(g\ge 0\) and there exists some \(x_0\in V\) such that \(g(x_0)>0\), there holds

$$\begin{aligned} \mu (x_0)g(x_0)\le \int _{B_k}gd\mu , \end{aligned}$$

and thus

$$\begin{aligned} \Lambda _k\le J_k(0)=-\log \int _{B_k}gd\mu \le -\log (\mu (x_0)g(x_0)).\end{aligned}$$
(50)

Combining (48), (49) and (50), we have

$$\begin{aligned} \Vert {\widetilde{u}}_j\Vert _{W_0^{1,2}(B_k)}\le C \end{aligned}$$

for some constant C independent of k. Hence there exists a subsequence of \(({\widetilde{u}}_j)\), which is still denoted by \(({\widetilde{u}}_j)\), and a function \(u_k\in W_0^{1,2}(B_k)\) such that \(({\widetilde{u}}_j)\) converges to \(u_k\) uniformly in \(B_k\) as \(j\rightarrow \infty \). It is easy to see that \(u_k\) is a minimizer of \(J_k\), or equivalently

$$\begin{aligned} J_k(u_k)=\Lambda _k=\inf _{u\in W_0^{1,2}(B_k)}J_k(u). \end{aligned}$$

Moreover \(u_k\) satisfies the Euler–Lagrange equation

$$\begin{aligned} \left\{ \begin{array}{l} -\Delta u_k+hu_k=\frac{1}{\gamma _k}ge^{u_k}-f~\mathrm{in}~ B_k\\ u_k\in W_0^{1,2}(B_k),~\gamma _k=\int _{B_k}ge^{u_k}d\mu . \end{array} \right. \end{aligned}$$
(51)

Since \((\Lambda _k)\) is bounded due to (48) and (50), we conclude that

$$\begin{aligned} \Vert u_k\Vert _{W_0^{1,2}(B_k)}\le C\end{aligned}$$
(52)

for some constant C independent of k. Using the same argument as Step 4 of the proof of Theorem 4, one easily extracts a subsequence of \(u_k\), which is still denoted by \(u_k\), and finds some function \(u^*\) such that \((u_k)\) converges to \(u^*\) locally uniformly in V. In view of (52), the Sobolev embedding theorem (Theorem 1) implies

$$\begin{aligned} \Vert u_k\Vert _{L^\infty (B_k)}\le \frac{1}{\sqrt{\mu _0}}\Vert u_k\Vert _{W_0^{1,2}(B_k)}\le C.\end{aligned}$$
(53)

This immediately leads to

$$\begin{aligned} e^{-C}\Vert g\Vert _{L^1(B_k)}\le \gamma _k\le e^{C}\Vert g\Vert _{L^1(B_k)}, \end{aligned}$$

where \(\gamma _k\) is given as in (51). Then up to a subsequence, \(\gamma _k\) converges to some number \(\gamma ^*\) with

$$\begin{aligned} e^{-C}\Vert g\Vert _{L^1(V)}\le \gamma ^*\le e^{C}\Vert g\Vert _{L^1(V)}.\end{aligned}$$
(54)

It follows from (51) and (54) that

$$\begin{aligned} -\Delta u^*+hu^*=\frac{1}{\gamma ^*}ge^{u^*}-f\quad \mathrm{in}\quad V.\end{aligned}$$
(55)

We now prove

$$\begin{aligned} \gamma ^*=\int _Vge^{u^*}d\mu .\end{aligned}$$
(56)

On one hand, for any fixed \(\ell >1\), there holds

$$\begin{aligned} \int _{B_\ell }ge^{u^*}d\mu =\lim _{k\rightarrow \infty }\int _{B_\ell }ge^{u_k}d\mu \le \lim _{k\rightarrow \infty }\int _{B_k}ge^{u_k}d\mu =\gamma ^*, \end{aligned}$$

which leads to

$$\begin{aligned} \int _Vge^{u^*}d\mu \le \gamma ^*.\end{aligned}$$
(57)

On the other hand, in view of (53) and the assumption \(g\in L^1(V)\), for any \(\eta >0\), there would exist a sufficiently large \(\ell _0>1\) such that if \(\ell \ge \ell _0\), then

$$\begin{aligned} \int _{B_k}ge^{u_k}d\mu \le \eta +\int _{B_\ell }ge^{u_k}d\mu .\end{aligned}$$
(58)

Indeed, (53) and \(g\in L^1(V)\) lead to

$$\begin{aligned} \int _{B_k\setminus B_\ell }ge^{u_k}d\mu \le e^C\int _{V\setminus B_\ell }gd\mu =o_\ell (1), \end{aligned}$$

where \(o_\ell (1)\rightarrow 0\) as \(\ell \rightarrow \infty \). Thus (58) is satisfied. Passing to the limit \(k\rightarrow \infty \) first, and then \(\ell \rightarrow \infty \) in (58), we obtain

$$\begin{aligned} \gamma ^*\le \eta +\int _Vge^{u^*}d\mu . \end{aligned}$$

Since \(\eta >0\) is arbitrary, there must hold

$$\begin{aligned} \gamma ^*\le \int _Vge^{u^*}d\mu .\end{aligned}$$
(59)

Hence (56) follows from (57) and (59) immediately. Combining (56) and (55), we conclude that \(u^*\) is a solution of

$$\begin{aligned} \left\{ \begin{array}{lll} -\Delta u^*+hu^*=\frac{1}{\gamma ^*}ge^{u^*}-f\,\,\,\mathrm{in}\,\,\, V\\ \gamma ^*=\int _{V}ge^{u^*}d\mu . \end{array} \right. \end{aligned}$$

Since \(u_k\) is naturally viewed as a function on V, using the same argument as the proof of (33), we conclude from (52) and (34) that \(u^*\in {\mathscr {H}}\). This completes the proof of the theorem. \(\square \)

6 Yamabe equation

In this section, using the mountain-pass theorem due to Ambrosetti–Rabinowitz [3], we prove the existence of nontrivial solutions to the Yamabe equation (18). The key estimate is the Sobolev embedding theorem. In [8], we have used Theorem 1 under the assumption (11). Here we shall apply Theorem 2 to the mountain-pass theory. Our assumptions on the locally finite graph are \(w_{xy}\ge w_0>0\) for all y adjacent to x, and

$$\begin{aligned} \int _V\rho ^pd\mu =\sum _{x\in V}\mu (x)\rho ^p(x)<+\infty \end{aligned}$$

for some \(p>2\), where \(\rho (x)=\rho (x,O)\) denotes the distance between x and O. It seems that Theorem 2 has a lot of room for improvement.

To begin with, we have the following compactness embedding for \({\mathscr {H}}\), where \({\mathscr {H}}\) is a Hilbert space defined as in (13).

Lemma 7

If \(h\ge a_0>0\) and \(1/h\in L^1(V)\), then \({\mathscr {H}}\) is embedded in \(L^q(V)\) compactly for all \(1\le q<p\); If \(h\ge a_0>0\) and \(h(x)\rightarrow +\infty \) as \(\rho (x)\rightarrow +\infty \), then \({\mathscr {H}}\) is embedded in \(L^q(V)\) compactly for all \(2\le q<p\).

Proof

Suppose \((u_k)\) is a bounded sequence in \({\mathscr {H}}\), namely

$$\begin{aligned} \Vert u_k\Vert _{{\mathscr {H}}}^2=\int _V(|\nabla u_k|^2+hu_k^2)d\mu \le C.\end{aligned}$$
(60)

Since the Hilbert space \({\mathscr {H}}\) is reflexive, there exists some function \(u\in {\mathscr {H}}\) such that up to a subsequence, \((u_k)\) converges to u weakly in \({\mathscr {H}}\), locally uniformly in V. If \(1/h\in L^1(V)\), then for any \(\epsilon >0\), there exists some \(\ell >1\) such that

$$\begin{aligned} \int _{V\setminus B_\ell }\frac{1}{h}d\mu <\epsilon ^2. \end{aligned}$$

Moreover, there holds

$$\begin{aligned} \int _V|u_k-u|d\mu\le & {} \int _{B_\ell }|u_k-u|d\mu +\left( \int _{V\setminus B_\ell }\frac{1}{h}d\mu \right) ^{1/2} \left( \int _{V\setminus B_\ell }h|u_k-u|^2d\mu \right) ^{1/2}\\\le & {} C\epsilon +o_k(1). \end{aligned}$$

This immediately implies

$$\begin{aligned} \lim _{k\rightarrow \infty }\Vert u_k-u\Vert _{L^1(V)}=0.\end{aligned}$$
(61)

For any \(q\in (1,p)\), there exists a unique \(\lambda \in (0,1)\) such that \(q=\lambda +(1-\lambda )p\). By the Hölder inequality, (60) and Theorem 2,

$$\begin{aligned} \int _V|u_k-u|^qd\mu\le & {} \left( \int _V|u_k-u|d\mu \right) ^\lambda \left( \int _V|u_k-u|^pd\mu \right) ^{1-\lambda }\\\le & {} C\left( \int _V|u_k-u|d\mu \right) ^\lambda , \end{aligned}$$

which together with (61) leads to

$$\begin{aligned} \lim _{k\rightarrow \infty }\Vert u_k-u\Vert _{L^q(V)}=0.\end{aligned}$$
(62)

If \(h(x)\rightarrow +\infty \) as \(\rho (x)\rightarrow \infty \), then for any \(\epsilon >0\), there exists some \(\ell _1>1\) such that

$$\begin{aligned} h(x)\ge \frac{C}{\epsilon }\quad \mathrm{for\,\,all}\quad x\in V\setminus B_{\ell _1}. \end{aligned}$$

As a consequence

$$\begin{aligned} \int _V|u_k-u|^2d\mu= & {} \int _{B_{\ell _1}}|u_k-u|^2d\mu +\int _{V\setminus B_{\ell _1}}|u_k-u|^2d\mu \\\le & {} \frac{\epsilon }{C}\int _{V\setminus B_{\ell _1}}h|u_k-u|^2d\mu +o_k(1). \end{aligned}$$

This implies that

$$\begin{aligned} \lim _{k\rightarrow \infty }\Vert u_k-u\Vert _{L^2(V)}=0.\end{aligned}$$
(63)

Using the same argument as in the proof of (62), we obtain from (63) that

$$\begin{aligned} \lim _{k\rightarrow \infty }\Vert u_k-u\Vert _{L^q(V)}=0\quad \mathrm{for\,\,all}\quad 2< q<p. \end{aligned}$$

This ends the proof of the lemma. \(\square \)

Let f be a function of one variable defined by

$$\begin{aligned} f(s)=|s|^{q-2}s,\quad s\in {\mathbb {R}}\end{aligned}$$
(64)

and F be its primitive function, namely

$$\begin{aligned} F(s)=\int _0^sf(t)dt=\frac{1}{q}|s|^q,\quad s\in {\mathbb {R}}.\end{aligned}$$
(65)

Obviously \(sf(s)=qF(s)\) for all \(s\in {\mathbb {R}}\). Define a functional \(J:{\mathscr {H}}\rightarrow {\mathbb {R}}\) by

$$\begin{aligned} J(u)=\frac{1}{2}\int _V(|\nabla u|^2+hu^2)d\mu -\int _{V}F(u)d\mu .\end{aligned}$$
(66)

Lemma 8

Assume \(q\in (2,p)\), f, F and J are defined as in (64), (65) and (66) respectively. Then for any \(c\in {\mathbb {R}}\), J satisfies the \((PS)_c\) condition. Precisely, if for any sequence \((u_k)\subset {\mathscr {H}}\) with \(J(u_k)\rightarrow c\) and \(J^\prime (u_k)\rightarrow 0\), then up to a subsequence, \((u_k)\rightarrow u\) in \({\mathscr {H}}\) for some function \(u\in {\mathscr {H}}\).

Proof

Since \((u_k)\subset {\mathscr {H}}\), \(J(u_k)\rightarrow c\) and \(J^\prime (u_k)\rightarrow 0\), we have

$$\begin{aligned}&\frac{1}{2}\Vert u_k\Vert _{{\mathscr {H}}}^2-\int _VF(u_k)d\mu =c+o_k(1)\end{aligned}$$
(67)
$$\begin{aligned}&\langle u_k,\phi \rangle _{{\mathscr {H}}}-\int _Vf(u_k)\phi d\mu =o_k(1)\Vert \phi \Vert _{{\mathscr {H}}},\quad \forall \phi \in {\mathscr {H}}. \end{aligned}$$
(68)

Taking \(\phi =u_k\) in (68) and noting that \(u_k(x)f(u_k(x))=qF(u_k(x))\) for all \(x\in V\), we obtain

$$\begin{aligned} \frac{q}{2}\Vert u_k\Vert _{{\mathscr {H}}}^2-qc+o_k(1)=\Vert u_k\Vert _{{\mathscr {H}}}^2+o_k(1)\Vert u_k\Vert _{{\mathscr {H}}}.\end{aligned}$$
(69)

Since \(2<q<p\), (69) implies that \((u_k)\) is bounded in \({\mathscr {H}}\). By Lemma 7, there exist a subsequence of \((u_k)\), which is still denoted by \((u_k)\), and some function \(u\in {\mathscr {H}}\) such that

$$\begin{aligned} \lim _{k\rightarrow \infty }\int _V|u_k-u|^qd\mu =0.\end{aligned}$$
(70)

One calculates

$$\begin{aligned} \int _V|F(u_k)-F(u)|d\mu= & {} \int _V|f(\xi _k)||u_k-u|d\mu \nonumber \\\le & {} \int _V(|u_k|^{q-1}+|u|^{q-1})|u_k-u|d\mu \nonumber \\\le & {} C\Vert u_k-u\Vert _{L^q(V)}, \end{aligned}$$
(71)

where Theorem 2 is used, C is a constant independent of k, and \(\xi _k\) lies between \(u_k\) and u. Combining (70) and (71), we obtain

$$\begin{aligned} \lim _{k\rightarrow \infty }\int _VF(u_k)d\mu =\int _VF(u)d\mu .\end{aligned}$$
(72)

In the same way,

$$\begin{aligned} \left| \int _Vf(u_k)(u_k-u)d\mu \right|\le & {} \left( \int _V|f(u_k)|^{\frac{q}{q-1}}d\mu \right) ^{1-1/q}\left( \int _V|u_k-u|^qd\mu \right) ^{1/q}\\\le & {} \Vert u_k\Vert _{L^q(V)}^{q-1}\Vert u_k-u\Vert _{L^q(V)}\\\le & {} C\Vert u_k-u\Vert _{L^q(V)}. \end{aligned}$$

As a consequence

$$\begin{aligned} \lim _{k\rightarrow \infty }\int _Vf(u_k)(u_k-u)d\mu =0.\end{aligned}$$
(73)

Taking \(\phi =u_k-u\) in (68) and noting (73), we obtain

$$\begin{aligned} \langle u_k,u_k-u\rangle _{{\mathscr {H}}}=o_k(1).\end{aligned}$$
(74)

Since up to a subsequence, \(u_k\rightharpoonup u\) weakly in \({\mathscr {H}}\), it follows that

$$\begin{aligned} \langle u,u_k-u\rangle _{{\mathscr {H}}}=o_k(1).\end{aligned}$$
(75)

Combining (74) and (75), we conclude that \((u_k)\) converges to u in \({\mathscr {H}}\). In view of (67), (68), (72) and (73), we have

$$\begin{aligned} J(u)=c,\quad J^\prime (u)=0. \end{aligned}$$

This ends the proof of the lemma. \(\square \)

Proof of Theorem 6

Let \(J\in C^1({\mathscr {H}}, {\mathbb {R}})\) be the functional defined as in (66). We claim that J satisfies \((H_1)\) \(J(0)=0\); \((H_2)\) for some \(\delta >0\), \(\inf _{\Vert u\Vert _{{\mathscr {H}}}=\delta }J(u)>0\); \((H_3)\) \(J(v)<0\) for some \(v\in {\mathscr {H}}\) with \(\Vert v\Vert _{{\mathscr {H}}}>\delta \). Firstly, \((H_1)\) is obvious. Secondly, to see \((H_2)\), we have by Lemma 7,

$$\begin{aligned} J(u)\ge & {} \frac{1}{2}\Vert u\Vert _{{\mathscr {H}}}^2-\frac{1}{q}\int _V|u|^qd\mu \\\ge & {} \frac{1}{2}\Vert u\Vert _{{\mathscr {H}}}^2-C\Vert u\Vert _{{\mathscr {H}}}^q \end{aligned}$$

for some constant C depending on q. Hence, if \(\Vert u\Vert _{{\mathscr {H}}}=\delta \) for sufficiently small \(\delta >0\), there holds \(J(u)\ge C>0\) for some constant C depending on q and \(\delta \). This confirms \((H_2)\). Finally, to see \((H_3)\), we take a function

$$\begin{aligned} u_0(x)=\left\{ \begin{array}{ll} 1,&{}\quad x=O\\ 0,&{}\quad x\not =O \end{array}\right. \end{aligned}$$

for some fixed point \(O\in V\). It then follows that

$$\begin{aligned} J(tu_0)= & {} \frac{t^2}{2}\Vert u_0\Vert _{{\mathscr {H}}}^2-\frac{t^q}{q}\int _Vu_0^qd\mu \\\rightarrow & {} -\infty \quad \mathrm{as}\quad t\rightarrow +\infty , \end{aligned}$$

since \(2<q<p\). If we choose \(v=tu_0\) for sufficiently large \(t>0\), then \(J(v)<0\) and \((H_3)\) holds.

Let

$$\begin{aligned} c=\min _{\gamma \in \Gamma }\max _{u\in \gamma }J(u), \end{aligned}$$

where \(\Gamma =\{\gamma |\gamma :[0,1]\rightarrow {\mathscr {H}}\,\,\mathrm{is\,\,a\,\,} C^1\,\,\mathrm{curve\,\, with}\,\,\gamma (0)=0,\gamma (1)=v \}\). Clearly \(0<c<+\infty \). In view of Lemma 8, applying the mountain-pass theorem due to Ambrosetti–Rabinowitz [3], we conclude that c is a critical value of J. In particular, there exists some \(u\in {\mathscr {H}}\) such that \(J(u)=c\), \(J^\prime (u)=0\). Clearly \(u\not \equiv 0\), and u satisfies the Euler–Lagrange equation (18). \(\square \)