1 Introduction

A basic problem in Riemannian geometry is that of describing curvatures on a given manifold. Suppose that \((\Sigma ,g)\) is a 2-dimensional compact Riemannian manifold without boundary, and K is the Gaussian curvature on it. Let \(\widetilde{g}=e^{2u}g\) be a metric conformal to g, where \(u\in C^\infty (\Sigma )\). To find a smooth function \(\widetilde{K}\) as the Gaussian curvature of \((\Sigma , \widetilde{g})\), one is led to solving the nonlinear elliptic equation

$$\begin{aligned} \Delta _g u=K-\widetilde{K}e^{2u}, \end{aligned}$$
(1)

where \(\Delta _g\) denotes the Laplacian operator on \((\Sigma ,g)\). Let v be a solution to \(\Delta _g v=K-\overline{K}\). Here and in the sequel, we denote the integral average on \(\Sigma \) by

$$\begin{aligned} \overline{w}=\frac{1}{\mathrm{Vol}_g(\Sigma )}\int _\Sigma wdv_g \end{aligned}$$

for any function \(w: V\rightarrow \mathbb {R}\). Set \(\psi =2(u-v)\). Then \(\psi \) satisfies

$$\begin{aligned} \Delta \psi =2\overline{K}-(2\widetilde{K}e^{2v})e^\psi . \end{aligned}$$

If one frees this equation from the geometric situation, then it is a special case of

$$\begin{aligned} \Delta _g u=c-he^u, \end{aligned}$$
(2)

where c is a constant, and h is some prescribed function, with neither c nor h depends on geometry of \((\Sigma ,g)\). Clearly one can consider (2) in any dimensional manifold. Now let \((\Sigma ,g)\) be a compact Riemannian manifold of any dimension. Note that the solvability of (2) depends on the sign of c. Let us summarize results of Kazdan and Warner [5]. For this purpose, think of \((\Sigma ,g)\) and \(h\in C^\infty (\Sigma )\) as being fixed with \(\mathrm{dim}\, \Sigma \ge 1\).

  • Case 1 \(c<0\). A necessary condition for a solution is that \(\overline{h}<0\), in which case there is a critical strictly negative constant \(c_ -(h)\) such that (2) is solvable if \(c_-(h)<c<0\), but not solvable if \(c<c_-(h)\).

  • Case 2 c = 0. When \(\mathrm{dim}\, \Sigma \le 2\), the Eq. (2) has a solution if and only if both \(\overline{h}<0\) and h is positive somewhere. When \(\mathrm{dim}\, \Sigma \ge 3\), the necessary condition still holds.

  • Case 3 \(c>0\). When \(\mathrm{dim}\, \Sigma =1\), so that \(\Sigma =S^1\), then (2) has a solution if and only if h is positive somewhere. When \(\mathrm{dim}\, \Sigma =2\), there is a constant \(0<c_+(h)\le +\infty \) such that (2) has a solution if h is positive somewhere and if \(0<c<c_+(h)\).

There are tremendous work concerning the Kazdan–Warner problem, among those we refer the reader to Chen and Li [1, 2], Ding et al. [3, 4], and the references therein.

In this paper, we consider the Kazdan–Warner equation on a finite graph. In our setting, we shall prove the following: In Case 1, we have the same conclusion as the manifold case; In Case 2, the Eq. (2) has a solution if and only if both \(\overline{h}<0\) and h is positive somewhere; While in Case 3, the Eq. (2) has a solution if and only if h is positive somewhere. Following the lines of Kazdan and Warner [5], for results of Case 2 and Case 3, we use the variational method; for results of Case 1, we use the principle of upper-lower solutions. It is remarkable that Sobolev spaces on a finite graph are all pre-compact. This leads to a very strong conclusion in Case 3 compared with the manifold case.

We organized this paper as follows: In Sect. 2, we introduce some notations on graphs and state our main results. In Sect. 3, we give two important lemmas, namely, the Sobolev embedding and the Trudinger–Moser embedding. In Sects. 46, we prove Theorems 14 respectively. In Sect. 7, we discuss related equations involving higher order derivatives.

2 Settings and main results

Let \(G=(V,E)\) be a finite graph, where V denotes the vertex set and E denotes the edge set. Throughout this paper, all graphs are assumed to be connected. 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 \(\mu \)-Laplacian (or Laplacian for short) of u is defined by

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

where \(y\sim x\) means \(xy\in E\). The associated gradient form reads

$$\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}$$
(4)

Write \(\Gamma (u)=\Gamma (u,u)\). We denote the length of its gradient 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}$$
(5)

For any function \(g:V\rightarrow \mathbb {R}\), an integral of g over V is defined by

$$\begin{aligned} \int _V gd\mu =\sum _{x\in V}\mu (x)g(x), \end{aligned}$$
(6)

and an integral average of g is denoted by

$$\begin{aligned} \overline{g}=\frac{1}{\mathrm{{Vol}(V)}}\int _Vgd\mu =\frac{1}{\mathrm{{Vol}(V)}}\sum _{x\in V}\mu (x)g(x), \end{aligned}$$

where \(\mathrm{Vol}(V)=\sum _{x\in V}\mu (x)\) stands for the volume of V.

The Kazdan–Warner equation on graph reads

$$\begin{aligned} \Delta u=c-he^u\quad \mathrm{in}\quad V, \end{aligned}$$
(7)

where \(\Delta \) is defined as in (3), \(c\in \mathbb {R}\), and \(h:V\rightarrow \mathbb {R}\) is a function. If \(c=0\), then (7) is reduced to

$$\begin{aligned} \Delta u=-he^u\quad \mathrm{in}\quad V. \end{aligned}$$
(8)

Our first result can be stated as following:

Theorem 1

Let \(G=(V,E)\) be a finite graph, and \(h (\not \equiv 0)\) be a function on V. Then the Eq. (8) has a solution if and only if h changes sign and \(\int _Vhd\mu <0\).

In cases \(c>0\) and \(c<0\), we have the following:

Theorem 2

Let \(G=(V,E)\) be a finite graph, c be a positive constant, and \(h:V\rightarrow \mathbb {R}\) be a function. Then the Eq. (7) has a solution if and only if h is positive somewhere.

Theorem 3

Let \(G=(V,E)\) be a finite graph, c be a negative constant, and \(h:V\rightarrow \mathbb {R}\) be a function.

  1. (i)

    If (7) has a solution, then \(\overline{h}<0\).

  2. (ii)

    If \(\overline{h}<0\), then there exists a constant \(-\infty \le c_-(h)<0\) depending on h such that (7) has a solution for any \(c_-(h)<c<0\), but has no solution for any \(c<c_-(h)\).

Concerning the constant \(c_-(h)\) in Theorem 3, we have the following:

Theorem 4

Let \(G=(V,E)\) be a finite graph, c be a negative constant, and \(h:V\rightarrow \mathbb {R}\) be a function. Suppose that \(c_-(h)\) is given as in Theorem 3. If \(h(x)\le 0\) for all \(x\in V\), but \(h\not \equiv 0\), then \(c_-(h)=-\infty \).

3 Preliminaries

Define a Sobolev space and a norm on it by

$$\begin{aligned} W^{1,2}(V)=\left\{ u:V\rightarrow \mathbb {R}: \int _V(|\nabla u|^2+u^2)d\mu <+\infty \right\} , \end{aligned}$$

and

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

respectively. If V is a finite graph, then \(W^{1,2}(V)\) is exactly the set of all functions on V, a finite dimensional linear space. This implies the following Sobolev embedding:

Lemma 5

Let \(G=(V,E)\) be a finite graph. The Sobolev space \(W^{1,2}(V)\) is pre-compact. Namely, if \(\{u_j\}\) is bounded in \(W^{1,2}(V)\), then there exists some \(u\in W^{1,2}(V)\) such that up to a subsequence, \(u_j\rightarrow u\) in \(W^{1,2}(V)\).

As a consequence of Lemma 5, we have the following Poincaré inequality:

Lemma 6

Let \(G=(V,E)\) be a finite graph. For all functions \(u: V\rightarrow \mathbb {R}\) with \(\int _Vud\mu =0\), there exists some constant C depending only on G such that

$$\begin{aligned} \int _V u^2d\mu \le C\int _V|\nabla u|^2d\mu . \end{aligned}$$

Proof

Suppose not. There would exist a sequence of functions \(\{u_j\}\) satisfying \(\int _Vu_jd\mu =0\), \(\int _Vu_j^2d\mu =1\), but \(\int _V|\nabla u_j|^2d\mu \rightarrow 0\) as \(j\rightarrow \infty \). Clearly \(u_j\) is bounded in \(W^{1,2}(V)\). It follows from Lemma 5 that there exists some function \(u_0\) such that up to a subsequence, \(u_j\rightarrow u_0\) in \(W^{1,2}(V)\) as \(j\rightarrow \infty \). Hence \(\int _V|\nabla u_0|^2d\mu =\lim _{j\rightarrow \infty }\int _V|\nabla u_j|^2d\mu =0\). This leads to \(|\nabla u_0|\equiv 0\) and thus \(u_0\equiv \mathrm{const}\) on V since G is connected. Noting that \(\int _Vu_0d\mu =\lim _{j\rightarrow \infty }\int _Vu_jd\mu =0\), we conclude that \(u_0\equiv 0\) on V, which contradicts \(\int _Vu_0^2d\mu =\lim _{j\rightarrow \infty }\int _Vu_j^2d\mu =1\). \(\square \)

Also we have the following Trudinger–Moser embedding:

Lemma 7

Let \(G=(V,E)\) be a finite graph. For any \(\beta \in \mathbb {R}\), there exists a constant C depending only on \(\beta \) and G such that for all functions v with \(\int _V|\nabla v|^2d\mu \le 1\) and \(\int _Vvd\mu =0\), there holds

$$\begin{aligned} \int _Ve^{\beta v^2}d\mu \le C. \end{aligned}$$

Proof

Since the case \(\beta \le 0\) is trivial, we assume \(\beta >0\). For any function v satisfying \(\int _V|\nabla v|^2d\mu \le 1\) and \(\int _Vvd\mu =0\), we have by Lemma 6 that

$$\begin{aligned} \int _Vv^2d\mu \le C_0\int _V|\nabla v|^2d\mu \le C_0, \end{aligned}$$

for some constant \(C_0\) depending only on G. Denote \(\mu _{\min }=\min _{x\in V}\mu (x)\). In view of (6), the above inequality leads to \(\Vert v\Vert _{L^\infty (V)}\le C_0/\mu _{\min }\). Hence

$$\begin{aligned} \int _Ve^{\beta v^2}d\mu \le e^{\beta C_0^2/\mu _{\min }}\mathrm{Vol}(V). \end{aligned}$$

This gives the desired result. \(\square \)

4 The case \(c=0\)

In the case \(c=0\), our approach comes out from that of Kazdan and Warner [5].

Proof of Theorem 1

Necessary condition If (8) has a solution u, then \(e^{-u}\Delta u=-h\). Integration by parts gives

$$\begin{aligned} -\int _Vhd\mu= & {} \int _Ve^{-u}\Delta ud\mu \\= & {} -\int _V\Gamma (e^{-u},u)d\mu \\= & {} -\frac{1}{2}\sum _{x\in V}\sum _{y\sim x}w_{xy}(e^{-u(y)}-e^{-u(x)})(u(y)-u(x)) \\> & {} 0, \end{aligned}$$

since \((e^{-u(y)}-e^{-u(x)})(u(y)-u(x))\le 0\) for all \(x,y\in V\) and u is not a constant. Integrating the Eq. (8), we have

$$\begin{aligned} \int _Vhe^ud\mu =-\int _V\Delta ud\mu =0. \end{aligned}$$

This together with \(h\not \equiv 0\) implies that h must change sign.

Sufficient condition We use the calculus of variations. Suppose that h changes sign and

$$\begin{aligned} \int _Vhd\mu <0. \end{aligned}$$
(9)

Define a set

$$\begin{aligned} \mathcal {B}_1=\left\{ v\in W^{1,2}(V): \int _Vhe^vd\mu =0,\,\,\int _Vvd\mu =0\right\} . \end{aligned}$$
(10)

We claim that

$$\begin{aligned} \mathcal {B}_1\not =\varnothing . \end{aligned}$$
(11)

To see this, since h changes sign and (9), we can assume \(h(x_1)>0\) for some \(x_1\in V\). Take a function \(v_1\) satisfying \(v_1(x_1)=\ell \) and \(v_1(x)=0\) for all \(x\not = x_1\). Hence

$$\begin{aligned} \int _Vhe^{v_1}d\mu= & {} \sum _{x\in V}\mu (x)h(x)e^{v_1(x)} \\= & {} \mu (x_1) h(x_1)e^\ell +\sum _{x\not =x_1}\mu (x)h(x) \\= & {} (e^\ell -1)\mu (x_1) h(x_1)+\int _Vhd\mu \\> & {} 0 \end{aligned}$$

for sufficiently large \(\ell \). Writing \(\phi (t)=\int _Vhe^{tv_1}d\mu \), we have by the above inequality that \(\phi (1)>0\). Obviously \(\phi (0)=\int _Vhd\mu <0\). Thus there exists a constant \(0<t_0<1\) such that \(\phi (t_0)=0\). Let \(v^*=t_0v_1-\frac{1}{\mathrm{Vol}(V)}\int _Vt_0v_1d\mu \), where \(\mathrm{Vol}(V)=\sum _{x\in V}\mu (x)\) stands for the volume of V. Then \(v^*\in \mathcal {B}_1\). This concludes our claim (11).

We shall minimize the functional \(J(v)=\int _V|\nabla v|^2d\mu \). Let

$$\begin{aligned} a=\inf _{v\in \mathcal {B}_1}J(v). \end{aligned}$$

Take a sequence of functions \(\{v_n\}\subset \mathcal {B}_1\) such that \(J(v_n)\rightarrow a\). Clearly \(\int _V|\nabla v_n|^2d\mu \) is bounded and \(\int _V{v}_nd\mu =0\). Hence \(v_n\) is bounded in \(W^{1,2}(V)\). Since V is a finite graph, the Sobolev embedding (Lemma 5) implies that up to a subsequence, \(v_n\rightarrow v_\infty \) in \(W^{1,2}(V)\). Hence \(\int _V{v_\infty }d\mu =0\), \(\int _Vhe^{v_\infty }d\mu =\lim _{n\rightarrow \infty }\int _Vhe^{v_n}d\mu =0\), and thus \(v_\infty \in \mathcal {B}_1\). Moreover

$$\begin{aligned} \int _V|\nabla v_\infty |^2d\mu =\lim _{n\rightarrow \infty }\int _V|\nabla v_n|^2d\mu =a. \end{aligned}$$

One can calculate the Euler–Lagrange equation of \(v_\infty \) as follows:

$$\begin{aligned} \Delta v_\infty =-\frac{\lambda }{2}he^{v_\infty }-\frac{\gamma }{2}, \end{aligned}$$
(12)

where \(\lambda \) and \(\gamma \) are two constants. This is based on the method of Lagrange multipliers. Indeed, for any \(\phi \in W^{1,2}(V)\), there holds

$$\begin{aligned} 0= & {} \left. \frac{d}{dt}\right| _{t=0}\left\{ \int _V|\nabla (v_\infty +t\phi )|^2d\mu -\lambda \int _Vhe^{v_\infty +t\phi }d\mu - \gamma \int _V(v_\infty +t\phi )d\mu \right\} \nonumber \\= & {} 2\int _V\Gamma (v_\infty ,\phi )d\mu -\lambda \int _Vhe^{v_\infty }\phi d\mu -\gamma \int _V\phi d\mu \nonumber \\= & {} -2\int _V(\Delta v_\infty )\phi d\mu -\lambda \int _Vhe^{v_\infty }\phi d\mu -\gamma \int _V\phi d\mu , \end{aligned}$$
(13)

which gives (12) immediately. Integrating the Eq. (12), we have \(\gamma =0\). We claim that \(\lambda \not =0\). For otherwise, we conclude from \(\Delta v_\infty =0\) and \(\int _Vv_\infty d\mu =0\) that \(v_\infty \equiv 0\not \in \mathcal {B}_1\). This is a contradiction. We further claim that \(\lambda >0\). This is true because \(\int _Vhd\mu <0\) and

$$\begin{aligned} 0<\int _V e^{-v_\infty }\Delta v_\infty d\mu =-\frac{\lambda }{2}\int _Vhd\mu . \end{aligned}$$

Thus we can write \(\frac{\lambda }{2}=e^{-\vartheta }\) for some constant \(\vartheta \). Then \(u=v_\infty +\vartheta \) is a desired solution of (8). \(\square \)

5 The case \(c>0\)

Proof of Theorem 2

Necessary condition Suppose \(c>0\) and u is a solution to (7). Since \(\int _V\Delta ud\mu =0\), we have

$$\begin{aligned} \int _Vhe^ud\mu =c\mathrm{Vol}(V)>0. \end{aligned}$$

Hence h must be positive somewhere on V.

Sufficient condition Suppose \(h(x_0)>0\) for some \(x_0\in V\). Define a set

$$\begin{aligned} \mathcal {B}_2=\left\{ v\in W^{1,2}(V): \int _Vhe^vd\mu =c\mathrm{Vol}(V)\right\} . \end{aligned}$$

We claim that \(\mathcal {B}_2\not =\varnothing \). To see this, we set

$$\begin{aligned} u_\ell (x)=\left\{ \begin{array}{ll} \ell ,&{}\quad x=x_0 \\ 0,&{}\quad x\not =x_0. \end{array} \right. \end{aligned}$$

It follows that

$$\begin{aligned} \int _Vhe^{u_\ell }d\mu \rightarrow +\infty \quad \mathrm{as}\quad \ell \rightarrow +\infty . \end{aligned}$$

We also set \(\widetilde{u}_\ell \equiv -\ell \), which leads to

$$\begin{aligned} \int _Vhe^{\widetilde{u}_\ell }d\mu =e^{-\ell }\int _Vhd\mu \rightarrow 0\quad \mathrm{as } \; \ell \rightarrow +\infty . \end{aligned}$$

Hence there exists a sufficiently large \(\ell \) such that \(\int _Vhe^{u_\ell }d\mu >c\mathrm{Vol}(V)\) and \(\int _Vhe^{\widetilde{u}_\ell }d\mu <c\mathrm{Vol}(V)\). We define a function \(\phi :\mathbb {R}\rightarrow \mathbb {R}\) by

$$\begin{aligned} \phi (t)=\int _Vhe^{tu_\ell +(1-t)\widetilde{u}_\ell }d\mu . \end{aligned}$$

Then \(\phi (0)<c\mathrm{Vol}(V)<\phi (1)\), and thus there exists a \(t_0\in (0,1)\) such that \(\phi (t_0)=c\mathrm{Vol}(V)\). Hence \(\mathcal {B}_2\not =\varnothing \) and our claim follows. We shall solve (7) by minimizing the functional

$$\begin{aligned} J(u)=\frac{1}{2}\int _V|\nabla u|^2d\mu +c\int _Vud\mu \end{aligned}$$

on \(\mathcal {B}_2\). For this purpose, we write \(u=v+\overline{u}\), so \(\overline{v}=0\). Then for any \(u\in \mathcal {B}_2\), we have

$$\begin{aligned} \int _Vhe^vd\mu =c\mathrm{Vol}(V)e^{-\overline{u}}>0, \end{aligned}$$

and thus

$$\begin{aligned} J(u)=\frac{1}{2}\int _V|\nabla u|^2d\mu -c\mathrm{Vol}(V)\log \int _Vhe^vd\mu +c\mathrm{Vol}(V)\log (c\mathrm{Vol}(V)). \end{aligned}$$
(14)

Let \(\widetilde{v}=v/\Vert \nabla v\Vert _2\). Then \(\int _V\widetilde{v}d\mu =0\) and \(\Vert \nabla \widetilde{v}\Vert _2=1\). By Lemma 6, \(\Vert \widetilde{v}\Vert _2\le C_0\) for some constant \(C_0\) depending only on G. By Lemma 7, for any \(\beta \in \mathbb {R}\), one can find a constant C depending only on \(\beta \) and V such that

$$\begin{aligned} \int _Ve^{\beta {\widetilde{v}}^2}d\mu \le C(\beta ,V). \end{aligned}$$
(15)

This together with an elementary inequality \(ab\le \epsilon a^2+\frac{b^2}{4\epsilon }\) implies that for any \(\epsilon >0\),

$$\begin{aligned} \int _Ve^vd\mu\le & {} \int _Ve^{\epsilon \Vert \nabla v\Vert _2^2+\frac{v^2}{4\epsilon \Vert \nabla v\Vert _2^2}}d \mu \\= & {} e^{\epsilon \Vert \nabla v\Vert _2^2}\int _Ve^{\frac{v^2}{4\epsilon \Vert \nabla v\Vert _2^2}}d\mu \\\le & {} Ce^{\epsilon \Vert \nabla v\Vert _2^2}, \end{aligned}$$

where C is a positive constant depending only on \(\epsilon \) and G. Hence

$$\begin{aligned} \int _Vhe^vd\mu \le C(\max _{x\in V}h(x))e^{\epsilon \Vert \nabla v\Vert _2^2}. \end{aligned}$$

In view of (14), the above inequality leads to

$$\begin{aligned} J(u)\ge \frac{1}{2}\int _V|\nabla u|^2d\mu -c\mathrm{Vol}(V)\epsilon \Vert \nabla v\Vert _2^2-C_1, \end{aligned}$$

where \(C_1\) is some constant depending only on \(\epsilon \) and G. Choosing \(\epsilon =\frac{1}{4c\mathrm{Vol}(V)}\), and noting that \(\Vert \nabla v\Vert _2=\Vert \nabla u\Vert _2\), we obtain for all \(u\in \mathcal {B}_2\),

$$\begin{aligned} J(u)\ge \frac{1}{4}\int _V|\nabla u|^2d\mu -C_1. \end{aligned}$$
(16)

Therefore J has a lower bound on the set \(\mathcal {B}_2\). This permits us to consider

$$\begin{aligned} b=\inf _{u\in \mathcal {B}_2}J(u). \end{aligned}$$

Take a sequence of functions \(\{u_k\}\subset \mathcal {B}_2\) such that \(J(u_k)\rightarrow b\). Let \(u_k=v_k+\overline{u_k}\). Then \(\overline{v_k}=0\), and it follows from (16) that \(v_k\) is bounded in \(W^{1,2}(V)\). This together with the equality

$$\begin{aligned} \int _Vu_kd\mu =\frac{1}{c}J(u_k)-\frac{1}{2c}\int _V|\nabla v_k|^2d\mu \end{aligned}$$

implies that \(\{\overline{u_k}\}\) is a bounded sequence. Hence \(\{u_k\}\) is also bounded in \(W^{1,2}(V)\). By the Sobolev embedding (Lemma 5), up to a subsequence, \(u_k\rightarrow u\) in \(W^{1,2}(V)\). It is easy to see that \(u\in \mathcal {B}_2\) and \(J(u)=b\). Using the same method of (13), we derive the Euler–Lagrange equation of the minimizer u, namely, \(\Delta u=c-\lambda he^u\) for some constant \(\lambda \). Noting that \(\int _V\Delta ud\mu =0\), we have \(\lambda =1\). Hence u is a solution of the Eq. (7). \(\square \)

6 The case \(c<0\)

In this section, we prove Theorem 3 by using a method of upper and lower solutions. In particular, we show that it suffices to construct an upper solution of the Eq. (7). This is exactly the graph version of the argument of Kazdan and Warner ([5], Sections 9 and 10).

We call a function \(u_-\) a lower solution of (7) if for all \(x\in V\), there holds

$$\begin{aligned} \Delta u_-(x)-c+he^{u_-(x)}\ge 0. \end{aligned}$$

Similarly, \(u_+\) is called an upper solution of (7) if for all \(x\in V\), it satisfies

$$\begin{aligned} \Delta u_+(x)-c+he^{u_+(x)}\le 0. \end{aligned}$$

We begin with the following:

Lemma 8

Let \(c<0\). If there exist lower and upper solutions, \(u_-\) and \(u_+\), of the Eq. (7) with \(u_-\le u_+\), then there exists a solution u of (7) satisfying \(u_-\le u\le u_+\).

Proof

We follow the lines of Kazdan and Warner ([5], Lemma 9.3). Set \(k_1(x)=\max \{1,-h(x)\}\), so that \(k_1\ge 1\) and \(k_1\ge -h\). Let \(k(x)=k_1(x)e^{u_+(x)}\). We define \(L\varphi \equiv \Delta \varphi -k\varphi \) and \(f(x,u)\equiv c-h(x)e^{u}\). Since \(G=(V,E)\) is a finite graph and \(\inf _{x\in V}k(x)>0\), we have that L is a compact operator and \(\mathrm{Ker}(L)=\{0\}\). Hence we can define inductively \(u_{j+1}\) as the unique solution to

$$\begin{aligned} Lu_{j+1}=f(x,u_j)-ku_j, \end{aligned}$$
(17)

where \(u_0=u_+\). We claim that

$$\begin{aligned} u_-\le u_{j+1}\le u_j\le \cdots \le u_+. \end{aligned}$$
(18)

To see this, we estimate

$$\begin{aligned} L(u_1-u_0)=f(x,u_0)-ku_0-\Delta u_0+ku_0\ge 0. \end{aligned}$$

Suppose \(u_1(x_0)-u_0(x_0)=\max _{x\in V}(u_1(x)-u_0(x))>0\). Then \(\Delta (u_1-u_0)(x_0)\le 0\), and thus \(L(u_1-u_0)(x_0)<0\). This is a contradiction. Hence \(u_1\le u_0\) on V. Suppose \(u_j\le u_{j-1}\), we calculate by using the mean value theorem

$$\begin{aligned} L(u_{j+1}-u_j)= & {} k(u_{j-1}-u_j)+h(e^{u_{j-1}}-e^{u_j}) \\\ge & {} k_1(e^{u_+}-e^{\xi })(u_{j-1}-u_j) \\\ge & {} 0, \end{aligned}$$

where \(u_j\le \xi \le u_{j-1}\). Similarly as above, we have \(u_{j+1}\le u_j\) on V, and by induction, \(u_{j+1}\le u_j\le \cdots \le u_+\) for any j. Noting that

$$\begin{aligned} L(u_--u_{j+1})\ge k(u_j-u_-)+h(e^{u_j}-e^{u_-}), \end{aligned}$$

we also have by induction \(u_-\le u_j\) on V for all j. Therefore (18) holds. Since V is finite, it is easy to see that up to a subsequence, \(u_j\rightarrow u\) uniformly on V. Passing to the limit \(j\rightarrow +\infty \) in the Eq. (17), one concludes that u is a solution of (7) with \(u_-\le u\le u_+\). \(\square \)

Next we show that the Eq. (7) has infinitely many lower solutions. This reduces the proof of Theorem 3 to finding its upper solution.

Lemma 9

There exists a lower solution \(u_-\) of (7) with \(c<0\). Thus (7) has a solution if and only if there exists an upper solution.

Proof

Let \(u_-\equiv -A\) for some constant \(A>0\). Since V is finite, we have

$$\begin{aligned} \Delta u_-(x)-c+h(x)e^{u_-(x)}=-c+h(x)e^{-A}\rightarrow -c \quad \mathrm{as } \; A\rightarrow +\infty , \end{aligned}$$

uniformly with respect to \(x\in V\). Noting that \(c<0\), we can find sufficiently large A such that \(u_-\) is a lower solution of (7). \(\square \)

Proof of Theorem 3

  1. (i)

    Necessary condition If u is a solution of (7), then

    $$\begin{aligned} -\int _Vhd\mu= & {} \int _Ve^{-u}\Delta ud\mu -c\int _Ve^{-u}d\mu \\= & {} -\int _V\Gamma (e^{-u},u)d\mu -c\int _Ve^{-u}d\mu \\> & {} 0. \end{aligned}$$
  2. (ii)

    Sufficient condition It follows from Lemmas 8 and 9 that (7) has a solution if and only if (7) has an upper solution \(u_+\) satisfying

$$\begin{aligned} \Delta u_+\le c-he^{u_+}. \end{aligned}$$

Clearly, if \(u_+\) is an upper solution for a given \(c<0\), then \(u_+\) is also an upper solution for all \(\widetilde{c}<0\) with \(c\le \widetilde{c}\). Therefore, there exists a constant \(c_-(h)\) with \(-\infty \le c_-(h)\le 0\) such that (7) has a solution for any \(c>c_-(h)\) but has no solution for any \(c<c_-(h)\).

We claim that \(c_-(h)<0\) under the assumption \(\int _Vhd\mu <0\). To see this, we let v be a solution of \(\Delta v=\overline{h}-h\). The existence of v can be seen in the following way. If we consider orthogonality with respect to the standard scalar product, namely \(\langle \phi ,\psi \rangle = \int _V\phi \psi d\mu \), we have

$$\begin{aligned} \mathrm{ran}\, \Delta =(\mathrm{ker\, \Delta })^\perp =\{\mathrm{const}\}^\perp . \end{aligned}$$

So, since \(\overline{h}-h\) is orthogonal to the constant functions such a solution exists by invertibility of \(\Delta \) on \(\{\mathrm{const}\}^\perp \) and in the case of constant h a solution can be chosen to be an arbitrary constant since the right hand side satisfies \(\overline{h}-h=0\) in this case.

There exists some constant \(a>0\) such that

$$\begin{aligned} |e^{av}-1|\le \frac{-\overline{h}}{2\max _{x\in V} |h(x)|}. \end{aligned}$$

Let \(e^b=a\). If \(c=\frac{a\overline{h}}{2}\) and \(u_+=av+b\), we have

$$\begin{aligned} \Delta u_+-c+he^{u_+}= & {} ah(e^{av}-1)+\frac{a\overline{h}}{2} \\\le & {} a(\max _{x\in V}|h(x)|)|e^{av}-1|+\frac{a\overline{h}}{2} \\\le & {} \frac{a\overline{h}}{2}-\frac{a\overline{h}}{2} \\= & {} 0. \end{aligned}$$

Thus if \(c={a\overline{h}}/{2}<0\), then the Eq. (7) has an upper solution \(u_+\). Therefore, \(\overline{h}<0\) implies that \(c_-(h)\le {a\overline{h}}/{2}<0\). \(\square \)

Proof of Theorem 4

We shall show that if \(h(x)\le 0\) for all \(x\in V\), but \(h\not \equiv 0\), then (7) is solvable for all \(c<0\). For this purpose, as in the proof of Theorem 3, we let v be a solution of \(\Delta v=\overline{h}-h\). Note that \(\overline{h}<0\). Pick constants a and b such that \(a\overline{h}<c\) and \(e^{av+b}-a>0\). Let \(u_+=av+b\). Since \({h}\le 0\),

$$\begin{aligned} \Delta u_+-c+he^{u_+}= & {} a\Delta v-c+he^{av+b} \\= & {} a\overline{h}-ah-c+he^{av+b} \\\le & {} h(e^{av+b}-a) \\\le & {} 0. \end{aligned}$$

Hence \(u_+\) is an upper solution. Consequently, \(c_-(h)=-\infty \) if \(h\le 0\) but \(h\not \equiv 0\). \(\square \)

7 Some extensions

The Eq. (2) involving higher order differential operators was also extensively studied on manifolds, see for examples [6, 7] and the references therein. In this section, we shall extend Theorems 14 to nonlinear elliptic equations involving higher order derivatives. For this purpose, we define the length of m-order gradient of u by

$$\begin{aligned} |\nabla ^mu|=\left\{ \begin{array}{ll} |\nabla \Delta ^{\frac{m-1}{2}}u|, &{} \quad \mathrm{when } \;\; m \;\;\mathrm{is\,\,odd} \\ |\Delta ^{\frac{m}{2}}u|, &{} \quad \mathrm{when } \;\; m \;\; \mathrm{is\,\,even}, \end{array} \right. \end{aligned}$$
(19)

where \(|\nabla \Delta ^{\frac{m-1}{2}}u|\) is defined as in (5) for the function \(\Delta ^{\frac{m-1}{2}}u\), and \(|\Delta ^{\frac{m}{2}}u|\) denotes the usual absolute of the function \(\Delta ^{\frac{m}{2}}u\). Define a Sobolev space by

$$\begin{aligned} W^{m,2}(V)=\left\{ v:V\rightarrow \mathbb {R}: \int _V(|v|^2+|\nabla ^mv|^2)d\mu <+\infty \right\} \end{aligned}$$

and a norm on it by

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

Clearly \(W^{m,2}(V)\) is the set of all functions on V since V is finite. Moreover, we have the following Sobolev embedding, the Poincaré inequality and the Trudinger–Moser embedding:

Lemma 10

Let \(G=(V,E)\) be a finite graph. Then for any integer \(m>0\), \(W^{m,2}(V)\) is pre-compact.

Lemma 11

Let \(G=(V,E)\) be a finite graph. For all functions \(u: V\rightarrow \mathbb {R}\) with \(\int _Vud\mu =0\), there exists some constant C depending only on m and G such that

$$\begin{aligned} \int _V u^2d\mu \le C\int _V|\nabla ^m u|^2d\mu . \end{aligned}$$

Proof

Similar to the proof of Lemma 6, we suppose the contrary. There exists a sequence of functions \(\{u_j\}\) such that \(\int _Vu_jd\mu =0\), \(\int _Vu_j^2d\mu =1\) and \(\int _V|\nabla ^m u_j|^2d\mu \rightarrow 0\) as \(j\rightarrow \infty \). Noting that G is a finite graph, there would exist a function \(u^*\) such that up to a subsequence,

$$\begin{aligned}&\int _V {u^*}^2 d\mu =\lim _{j\rightarrow \infty }\int _Vu_j^2d\mu =1,\end{aligned}$$
(20)
$$\begin{aligned}&\int _Vu^*d\mu =\lim _{j\rightarrow \infty }\int _Vu_jd\mu =0,\end{aligned}$$
(21)
$$\begin{aligned}&\int _V|\nabla ^mu^*|^2d\mu =\lim _{j\rightarrow \infty }\int _V|\nabla ^mu_j|^2d\mu =0. \end{aligned}$$
(22)

If m is odd and \(m\ge 3\), using the same argument in the proof of Lemma 6, we conclude from (22) that \(\Delta ^{\frac{m-1}{2}}u^*\equiv 0\) on V since \(\int _V\Delta ^{\frac{m-1}{2}}u^*d\mu =0\). While if m is even and \(m\ge 4\), (22) leads to \(\Delta ^{\frac{m}{2}-1}u^*\equiv 0\) since \(\int _V\Delta ^{\frac{m}{2}-1}u^*d\mu = 0\). In view of (21) and the fact that \(\int _V\Delta ^ku^*d\mu =0\) for any \(k\ge 1\), after repeating the above procedure finitely many times, we conclude that \(u^*\equiv 0\) on V. This contradicts (20). \(\square \)

Lemma 12

Let \(G=(V,E)\) be a finite graph. Let m be a positive integer. Then for any \(\beta \in \mathbb {R}\), there exists a constant C depending only on m, \(\beta \) and G such that for all functions v with \(\int _V|\nabla ^m v|^2d\mu \le 1\) and \(\int _Vvd\mu =0\), there holds

$$\begin{aligned} \int _Ve^{\beta v^2}d\mu \le C. \end{aligned}$$

Proof

The same argument in the proof of Lemma 7. \(\square \)

We consider an analog of (7), namely

$$\begin{aligned} \Delta ^m u=c-he^u\quad \mathrm{in}\quad V, \end{aligned}$$
(23)

where m is a positive integer, c is a constant, and \(h: V\rightarrow \mathbb {R}\) is a function. Obviously (23) is reduced to (7) when \(m=1\). Firstly we have the following:

Theorem 13

Let \(G=(V,E)\) be a finite graph, \(h(\not \equiv 0)\) be a function on V, and m be a positive integer. If \(c=0\), h changes sign, and \(\int _Vhd\mu <0\), then the Eq. (23) has a solution.

Proof

We give the outline of the proof. Denote

$$\begin{aligned} \mathcal {B}_3=\left\{ v\in W^{m,2}(V):\, \int _Vhe^vd\mu =0,\,\int _Vvd\mu =0\right\} . \end{aligned}$$

In view of (10), we have that \(\mathcal {B}_3=\mathcal {B}_1\), since V is finite. Hence \(\mathcal {B}_3\not =\varnothing \). Now we minimize the functional \(J(v)=\int _V|\nabla ^mu|^2d\mu \) on \(\mathcal {B}_3\). The remaining part is completely analogous to that of the proof of Theorem 1, except for replacing Lemma 5 by Lemma 10. We omit the details but leave it to interested readers. \(\square \)

Secondly, in the case \(c>0\), the same conclusion as Theorem 2 still holds for the Eq. (23) with \(m>1\). Precisely we have the following:

Theorem 14

Let \(G=(V,E)\) be a finite graph, c be a positive constant, \(h:V\rightarrow \mathbb {R}\) be a function, and m be a positive integer. Then the Eq. (23) has a solution if and only if h is positive somewhere.

Proof

Repeating the arguments of the proof of Theorem 2 except for replacing Lemmas 5 and 7 by Lemmas 10 and 12 respectively, we get the desired result. \(\square \)

Finally, concerning the case \(c<0\), we obtain a result weaker than Theorem 3.

Theorem 15

Let \(G=(V,E)\) be a finite graph, c be a negative constant, m is a positive integer, and \(h:V\rightarrow \mathbb {R}\) be a function such that \(h(x)<0\) for all \(x\in V\). Then the Eq. (23) has a solution.

Proof

Since the maximum principle is not available for equations involving poly-harmonic operators, we use the calculus of variations instead of the method of upper and lower solutions. Let \(c<0\) be fixed. Consider the functional

$$\begin{aligned} J(u)=\frac{1}{2}\int _V|\nabla ^mu|^2d\mu +c\int _Vud\mu . \end{aligned}$$
(24)

Set

$$\begin{aligned} \mathcal {B}_4=\left\{ u\in W^{m,2}(V): \int _Vhe^ud\mu =c\mathrm{Vol}(V)\right\} . \end{aligned}$$

Using the same method of proving (11) in the proof of Theorem 2, we have \(\mathcal {B}_4\not =\varnothing \).

We now prove that J has a lower bound on \(\mathcal {B}_4\). Let \(u\in \mathcal {B}_4\). Write \(u=v+\overline{u}\). Then \(\overline{v}=0\) and

$$\begin{aligned} \int _Vhe^{v}d\mu =e^{-\overline{u}}c\mathrm{Vol}(V), \end{aligned}$$

which leads to

$$\begin{aligned} \overline{u}=-\log \left( \frac{1}{c\mathrm{Vol}(V)}\int _Vhe^vd\mu \right) . \end{aligned}$$

Hence

$$\begin{aligned} J(u)=\frac{1}{2}\int _V|\nabla ^mu|^2d\mu -c\mathrm{Vol}(V)\log \left( \frac{1}{c\mathrm{Vol}(V)}\int _Vhe^vd\mu \right) . \end{aligned}$$
(25)

Since \(c<0\) and \(h(x)<0\) for all \(x\in V\), we have \(\max _{x\in V}h(x)<0\), and thus

$$\begin{aligned} \frac{h}{c\mathrm{Vol}(V)}\ge \delta =\frac{\max _{x\in V}h(x)}{c\mathrm{Vol}(V)}>0. \end{aligned}$$
(26)

Inserting (26) into (25), we have

$$\begin{aligned} J(u)\ge \frac{1}{2}\int _V|\nabla ^mu|^2d\mu -c\mathrm{Vol}(V)\log \delta -c\mathrm{Vol}(V)\log \int _Ve^vd\mu . \end{aligned}$$
(27)

By the Jensen inequality,

$$\begin{aligned} \frac{1}{\mathrm{Vol}(V)}\int _Ve^vd\mu \ge e^{\overline{v}}=1. \end{aligned}$$
(28)

Inserting (28) into (27), we obtain

$$\begin{aligned} J(u)\ge \frac{1}{2}\int _V|\nabla ^mu|^2d\mu -c\mathrm{Vol}(V)\log \delta -c\mathrm{Vol}(V)\log \mathrm{Vol}(V). \end{aligned}$$
(29)

Therefore J has a lower bound on \(\mathcal {B}_4\). Set

$$\begin{aligned} \tau =\inf _{v\in \mathcal {B}_4}J(v). \end{aligned}$$

Take a sequence of functions \(\{u_k\}\subset \mathcal {B}_4\) such that \(J(u_k)\rightarrow \tau \). We have by (29) that

$$\begin{aligned} \int _V|\nabla ^mu_k|^2d\mu \le C \end{aligned}$$
(30)

for some constant C depending only on c, \(\tau \), G and h. By (24), we estimate

$$\begin{aligned} \left| \int _Vu_kd\mu \right| \le \frac{1}{|c|}|J(u_k)|+\frac{1}{2|c|}\int _V|\nabla ^mu_k|^2d\mu . \end{aligned}$$
(31)

Lemma 11 implies that there exists some constant C depending only on m and G such that

$$\begin{aligned} \int _V|u_k-\overline{u_k}|^2d\mu \le C\int _V|\nabla ^mu_k|^2d\mu \end{aligned}$$
(32)

Combining (30), (31), and (32), one can see that \(\{u_k\}\) is bounded in \(W^{m,2}(V)\). Then it follows from Lemma 10 that there exists some function u such that up to a subsequence, \(u_k\rightarrow u\) in \(W^{m,2}(V)\). Clearly \(u\in \mathcal {B}_4\) and \(J(u)=\lim _{k\rightarrow \infty }J(u_k)=\tau \). In other words, u is a minimizer of J on the set \(\mathcal {B}_4\). It is not difficult to check that (23) is the Euler–Lagrange equation of u. This completes the proof of the theorem. \(\square \)