1 Introduction

Let \(E \subset {\mathbb {C}}\) be a measurable set, m a measure on E and \(\varphi \) a measurable function, locally bounded above on E. Denote by \(L^2(E ,\varphi )\) the space of measurable functions f in E which are square integrable with respect to the measure \(\mathrm{e}^{-\varphi }\mathrm{d}m\) i.e.,

$$\begin{aligned} L^2(E,\varphi ):=\left\{ f\mid \Vert f\Vert _{L^2(E,\varphi )}^2=\int _E\vert f\vert ^2\mathrm{e}^{-\varphi }\mathrm{d}m<\infty \right\} . \end{aligned}$$

Set

$$\begin{aligned} H^2(E, \varphi ) = L^2(E, \varphi ) \cap {\mathcal {O}}(\mathring{E}) \end{aligned}$$

where \({\mathcal {O}}(\mathring{E})\) stands for the space of holomorphic functions on the interior of E.

In this paper, we generalize the classical holomorphic approximation theorems to weighted \(L^2\)-spaces. The theory of holomorphic approximation started in 1885 with two now classical theorems: the Weierstrass theorem and the Runge theorem. The first one states that a continuous function on a bounded interval of \({\mathbb {R}}\) can be approximated arbitrarily well by polynomials for the uniform convergence on the interval. We prove the following weighted \(L^2\)-version of the Weierstrass theorem:

Theorem 1.1

Let \(\gamma \) be a Lipschitz graph over a bounded interval and \(\varphi \) a subharmonic function in a neighborhood of \(\gamma \) in \({\mathbb {C}}\). Then polynomials are dense in \(L^2(\gamma , \varphi )\).

Recall that a Carathéodory domain \(\Omega \) is a simply-connected bounded planar domain whose boundary \(\partial {\Omega }\) is also the boundary of an unbounded domain. Combined with Theorem 1.3 from [2], it leads us to the following weighted \(L^2\)-version of the Mergelyan theorem:

Theorem 1.2

Let \(\Omega \subset {\mathbb {C}}\) be a Carathéodory domain and \(\gamma \subset {\mathbb {C}}\) a Lipschitz graph with one endpoint p in \({\overline{\Omega }}\), the rest of \(\gamma \) be in the unbounded component of the complement of \({\overline{\Omega }}\). Assume that the boundary of \(\Omega \) is \({\mathcal {C}}^2\) near p. Let \(\varphi \) be a subharmonic function in a neighborhood of \({\overline{\Omega }} \cup \gamma \). Then polynomials are dense in \(H^2(\Omega \cup \gamma , \varphi )\).

Here,

$$\begin{aligned} \begin{aligned} H^2(\Omega \cup \gamma , \varphi ):=&\,\displaystyle {\left\{ {f \ \ \text {is measurable on} \ \ \Omega \cup \gamma \ \text {with} \ f|_\Omega \in {\mathcal {O}}(\Omega )} \right. } \\&\qquad \left. {\ \text {and} \ \int _\Omega \vert f(z)\vert ^2\mathrm{e}^{-\varphi (z)}\mathrm{d}\lambda _z+ \int _\gamma \vert f\vert ^2\mathrm{e}^{-\varphi }\mathrm{d}s <\infty } \right\} , \end{aligned} \end{aligned}$$

where d\(\lambda _z\) is the Lebesgue measure on \(\Omega \) and ds is the arc length element.

We can even generalize to

Theorem 1.3

We use the previous notations and assumptions. If \(K_\ell \), \(\ell =1,\ldots , N\) is either a Lipschitz graph or a bounded Carathéodory domain in \({\mathbb {C}}\) as in Theorem1.2 such that \({\mathbb {C}}\setminus \left( \bigcup _{\ell =1}^N K_\ell \right) \) is connected, \(\overline{K_i}\) and \(\overline{K_j}\) have at most one common point \(\lbrace {p_{ij}}\rbrace \) and \(K_j\) is outside of the relatively compact connected component of \(\overline{K_i}^c\) for each \(i \ne j\). Let \(\varphi \) be a subharmonic function in a neighborhood of \(\bigcup _{\ell =1}^NK_\ell \). Then polynomials are dense in \(H^2(\bigcup _{\ell =1}^NK_\ell , \varphi )\) (Fig. 1).

Fig. 1
figure 1

Case avoided: the arc \({K_j}\) is in the bounded component of \(\overline{K_i}^c\) where \(K_i\) is the outer snake

Let \(\Gamma \) be the graph of a locally Lipschitz function over the real axis in \({\mathbb {C}}\). We may assume \(\Gamma = \{(t, \phi (t)) \}\) with \(\phi : {\mathbb {R}}\rightarrow {\mathbb {R}}\) a locally Lipschitz continuous function.

Thanks to Theorem 1.1, we prove the following weighted \(L^2\)-version of the Carleman theorem:

Theorem 1.4

Let \(\Gamma \) be the graph of a locally Lipschitz function over the real axis in \({\mathbb {C}}\) and \(\varphi \) a subharmonic function in a neighborhood of \(\Gamma \). Denote by \(\Gamma _n\), \(n\in {\mathbb {Z}}\) the part of the graph \(\Gamma \) over the interval \([n,n+1]\). Then for any \(f\in L^2(\gamma , \varphi )\) and for any positive numbers \(\varepsilon _n\), there exists an entire function F, so that for each \(n\in {\mathbb {Z}}\),

$$\begin{aligned} \int _{\Gamma _n} |F -f|^2 \mathrm{e}^{-\varphi } d s < \varepsilon _n. \end{aligned}$$

The paper is organized as follows: In Sect. 2, we give a necessary and sufficient condition in terms of Lelong number for the exponential \(\mathrm{e}^{-\varphi }\) to be integrable on an arc in \({\mathbb {C}}\). In Sect. 3, we prove Theorem 1.1. In Sect. 4, we prove Theorem 1.2. In Sect. 5, we prove Theorem 1.4. In the last section, we give an example which shows that there are no non-zero polynomials in \(L^2(\gamma , \varphi )\) for some rectifiable non-Lipschitz arc \(\gamma \) and some subharmonic function \(\varphi \).

2 “Exponential Integrability” on Arcs in \({\mathbb {C}}\)

In the following, we assume that \(\varphi \) is subharmonic on \({\mathbb {C}}\), even though it is enough to assume it to be subharmonic in a neighborhood of the given subset. This fact relies on the following lemmas.

Lemma 2.1

Let \(\mu \ge 0\) be a measure on \({\mathbb {C}}\) with finite mass on each compact set. Then there exists a subharmonic function \(\varphi \) on \({\mathbb {C}}\) so that \(\Delta \varphi = \mu \).

Proof

Set

$$\begin{aligned} \mu = \sum \limits _{n=1}^{\infty } \mu _n, \ \ \mu _n = \mu _{\mid _{\{n-1 \le |z| < n\} }}. \end{aligned}$$

Let \(\varphi _n (z)= \int \log |z-\zeta | d \mu _n(\zeta )\). Then \(\varphi _n(z)\) is harmonic on \(\{z: |z| < n-1\}\). Thus there exists a holomorphic function \(h_n(z)\) on \(\{z: |z| < n-1\}\) so that \(\varphi _n(z) = {\text {Re}}h_n(z)\). By using the classical Mergelyan theorem to \(h_n(z)\) on \(\{z: |z| \le n-2\}\) there exists a polynomial \(P_n(z)\) so that

$$\begin{aligned} |h_n(z)- P_n(z)| < \frac{1}{2^n} , \ \ \text {on}\quad \lbrace { |z| \le n-2}\rbrace . \end{aligned}$$

Then \(\varphi (z)= \sum \limits _{n=1}^{\infty } {\text {Re}}( h_n(z) - P_n(z))\) is subharmonic on \({\mathbb {C}}\) and \(\Delta \varphi = \mu \). \(\square \)

Lemma 2.2

Let \(U \subset \subset V\) be two open sets and \(\varphi \) a subharmonic function on V. Then there exists a subharmonic function \(\psi \) on \({\mathbb {C}}\) so that \(\varphi = \psi + h\) on U, where h is harmonic on U.

Proof

Choose a smooth cut off function \(\chi : {\mathbb {C}}\rightarrow [0,1]\) so that \(\chi \equiv 1\) on a neighborhood of \({\overline{U}}\) and \(\mathrm{supp}\chi \subset V\). Then \(\mu := (\Delta \varphi ) \cdot \chi \) is a positive measure with finite mass on each compact set in \({\mathbb {C}}\). By Lemma 2.1 there is a globally defined subharmonic function \(\psi \) such that \(\Delta \psi =\mu .\) But then \(\varphi =\psi +h\) on U for some harmonic function h. \(\square \)

Since h is uniformly bounded on U, as a direct consequence, we get

Lemma 2.3

Let \(E\subset \subset U\) and \(\varphi , \psi \) be as in Lemma 2.2. Then the Hilbert spaces \(L^2(E, \varphi ) = L^2(E, \psi )\) and the norms are “equivalent”, i.e., there exist positive constants \(C_1, C_2\) so that

$$\begin{aligned} C_1 \Vert f \Vert _{L^2(E, \varphi )} \le \Vert f \Vert _{ L^2(E, \psi )} \le C_2 \Vert f \Vert _{L^2(E, \varphi )}. \end{aligned}$$

We prove similar statements to those in Section 2 of [5] but on an arc \(\gamma \). Those results will allow us to prove at the end of the section the local integrability of the exponential \(\mathrm{e}^{-\varphi }\) at a point \(x\in \gamma \) if and only if the Lelong number \(\nu (\varphi )(x)\) is strictly less than 1.

Definition 2.4

A function \(f: E\rightarrow {\mathbb {R}}\), \(E \subset {\mathbb {R}}\), is said to be \(L-\)Lipschitz, \(L\ge 0\), if

$$\begin{aligned} |f(t_1) - f(t_2)| \le L|t_1 -t_2| \end{aligned}$$

for every pair of points \((t_1,t_2) \in E\times E\). We say that a function is Lipschitz if it is \(L-\)Lipschitz for some L.

Lemma 2.5

(Chapter 5 of [13]) If \(f:[a,b] \rightarrow {\mathbb {R}}\) is a Lipschitz function, then f is differentiable at almost every point in [ab] and

$$\begin{aligned} f(b)-f(a) = \int _a^b f'(t)\mathrm{d}t. \end{aligned}$$

Let \(\gamma \) be the graph of a Lipschitz function \(y(t): [a,b] \rightarrow {\mathbb {R}}\). In the following, we say that \(\gamma \) is a Lipschitz graph if \(\gamma \) is the graph of an L-Lipschitz function y on [ab], \(a,b<\infty \). Locally Lipschitz graph means that for each point \(p\in \gamma \), there exists a neighborhood U where the graph is Lipschitz, up to a rotation of \(\gamma \). We denote by \(|\gamma |\) the arc length of \(\gamma \), defined as follows

$$\begin{aligned} |\gamma |: = \int _ \gamma \mathrm{d}s = \int _a^b |\gamma '(t)|\mathrm{d}t, \end{aligned}$$

where \(|\gamma '(t)| = \sqrt{ 1+(y'(t))^2}\).

Let \(z_0 = (t_0, y_0)\in {\mathbb {C}}\) and \(0< \beta < 1\).

Lemma 2.6

Let \(\gamma \) be a graph, then \(|\gamma (t) - z_0| \ge |t-t_0|\) on [ab].

Lemma 2.7

Let \(\gamma \) be a Lipschitz graph, then

$$\begin{aligned} \int _a^b \frac{1}{|\gamma (t) - z_0|^\beta }|\gamma '(t)|\mathrm{d}t \le \mathrm{Const}_{L,a,b,\beta }. \end{aligned}$$

Proof

By Lemma 2.6 we have

$$\begin{aligned} \int _a^b \frac{1}{|\gamma (t) - z_0|^\beta }|\gamma '(t)|\mathrm{d}t\le & {} (L+1) \int _a^{b} \frac{1}{|t- t_0|^\beta } \mathrm{d}t. \end{aligned}$$

If \(t_0>b\), then

$$\begin{aligned} (L+1) \int _a^{b} \frac{1}{|t- t_0|^\beta } \mathrm{d}t\le & {} (L+1) \int _a^{b} \frac{1}{|t- b|^\beta }\mathrm{d}t \\= & {} (L+1) \frac{(b-t)^{1-\beta }\mid ^a_{b}}{1-\beta } \\= & {} (L+1) \frac{(b-a)^{(1-\beta )}}{1-\beta }; \\ \end{aligned}$$

If \(t_0 <a\), then

$$\begin{aligned} (L+1) \int _a^{b} \frac{1}{|t- t_0|^\beta } \mathrm{d}t\le & {} (L+1) \int _a^{b} \frac{1}{|t- a|^\beta } \mathrm{d}t \\= & {} (L+1) \frac{(t-a)^{1-\beta }\mid ^b_{a}}{1-\beta } \\= & {} (L+1) \frac{(b-a)^{(1-\beta )}}{1-\beta }; \\ \end{aligned}$$

If \(a \le t_0 \le b\), then

$$\begin{aligned} (L+1) \int _a^{b} \frac{1}{|t- t_0|^\beta } \mathrm{d}t\le & {} (L+1) \int _a^{t_0} \frac{1}{(t_0- t)^\beta } \mathrm{d}t + (L+1) \int _{t_0}^b \frac{1}{(t- t_0)^\beta } \mathrm{d}t \\\le & {} (L+1) \frac{(t_0-t)^{1-\beta }}{1-\beta }\mid ^a_{t_0} +(L+1) \frac{(t-t_0)^{1-\beta }}{1-\beta }\mid ^b_{t_0} \\\le & {} 2(L+1) \frac{(b-a)^{(1-\beta )}}{1-\beta }. \end{aligned}$$

Thus no matter whatever the condition on \(t_0\), we have that

$$\begin{aligned} \int _a^b \frac{1}{|\gamma (t) - z_0|^\beta }|\gamma '(t)|\mathrm{d}t \le \mathrm{Const}_{L,a,b, \beta }. \end{aligned}$$

\(\square \)

We generalize the previous Lemma to a product

Lemma 2.8

Let \(\gamma \) be a Lipschitz graph. Suppose \(z_i\in {\mathbb {C}}\), \(\beta _i>0\), for \(i=1,\ldots , m\) and \(\sum _{i=1}^{m} \beta _i=\beta <1.\) Then

$$\begin{aligned} \int _a^b \prod _{i=1}^m \left( \frac{1}{|\gamma (t)-z_i| } \right) ^{\beta _i} |\gamma '(t)|\mathrm{d}t < \mathrm{Const}_{L,a,b,\beta }. \end{aligned}$$

Proof

According to Corollary 2.3 in [5] we know that

$$\begin{aligned} \prod _{i=1}^m \left( \frac{1}{|\gamma (t)-z_i| } \right) ^{\beta _i} \le \sum _{i=1}^{m} \frac{\beta _i}{\beta } \left( \frac{1}{|\gamma (t)-z_i| } \right) ^\beta . \end{aligned}$$

By Lemma 2.7, we finally have

$$\begin{aligned} \int _a^b \prod _{i=1}^m\left( \frac{1}{|\gamma (t)-z_i| } \right) ^{\beta _i} |\gamma '(t)|\mathrm{d}t < \mathrm{Const}_{L,a,b,\beta }. \end{aligned}$$

\(\square \)

Let \(\gamma \) be a Lipschitz graph. We take an arc length parametrization of \(\gamma \) that we denote by s. Let h be a function on \(\gamma \), define

$$\begin{aligned} \int _{\gamma }h\mathrm{d}s: = \int _a^b h(\gamma (t)) |\gamma '(t)|\mathrm{d}t. \end{aligned}$$

From Lemma 2.8, we are able to prove

Theorem 2.9

Let \(\gamma \) be a Lipschitz graph. Let \(\mu \) be any nonnegative measure with total mass \(\beta <1\) on an open set U in \({\mathbb {C}}\) containing \(\gamma \). If \(\varphi (z)=\int \log |z-\zeta | d\mu (\zeta )\), then we have

$$\begin{aligned} \int _{\gamma } \mathrm{e}^{-\varphi }\mathrm{d}s < C_{L,\beta ,a, b} \end{aligned}$$

where \(C_{L,\beta ,a, b} >0\) is a constant depending on \(L,\beta ,a, b.\)

Proof

Define \(\psi _n(z,\zeta )=\max \{\log |z-\zeta |,-n\}\) and

$$\begin{aligned} \varphi _n(z)=\int \psi _n(z,\zeta )d\mu (\zeta ). \end{aligned}$$

Then \(\varphi _n\) is continuous and \(\varphi _n\searrow \varphi \) pointwise. Hence \(\mathrm{e}^{-\varphi _n(z)}\nearrow \mathrm{e}^{-\varphi (z)}\). Therefore, it is enough to show

$$\begin{aligned} \int _{\gamma } \mathrm{e}^{-\varphi _n} \mathrm{d}s \le C_{L,\beta ,a, b} + \frac{1}{n}. \end{aligned}$$

We fix n. Let \(\delta >0.\) Since \(\psi _n\) is continuous, by Lemma 2.4 in [5], there exist \(\zeta _i\in U\) such that the measure \(\mu _n=\sum _{i=1}^m \beta _i\delta _{\zeta _i}\) has total mass \(\beta <1\) and \( |{\tilde{\varphi }}_n -\varphi _n|< \delta , \) where

$$\begin{aligned} {\tilde{\varphi }}_n(z):= \int \psi _n(z,\zeta )d\mu _n(\zeta ) = \sum _{i=1}^m\beta _i\psi _n(z,\zeta _i)\ge \sum _{i=1}^m\beta _i\log \vert z-\zeta _i\vert . \end{aligned}$$

Hence, we get

$$\begin{aligned} \int _\gamma \mathrm{e}^{-\varphi _n}\mathrm{d}s&\le \mathrm{e}^\delta \int _{\gamma } \mathrm{e}^{-{\tilde{\varphi }}_n}\mathrm{d}s\nonumber \\&\le \mathrm{e}^{\delta } \int _a^b \prod _{i=1}^m\dfrac{1}{\vert \gamma (t) - \zeta _i\vert ^{\beta _i}}|\gamma '(t)|\mathrm{d}t. \end{aligned}$$
(2.1)

By Lemma 2.8, we get

$$\begin{aligned} \int _a^b \prod _{i=1}^m\dfrac{1}{\vert \gamma (t) - \zeta _i\vert ^{\beta _i}}|\gamma '(t)|\mathrm{d}t< C_{L,\beta ,a, b}. \end{aligned}$$
(2.2)

Hence, by combining (2.1) and (2.2) and by choosing \(\delta \) small enough, we get

$$\begin{aligned} \int _{\gamma } \mathrm{e}^{-\varphi _n}\mathrm{d}s\le C_{L,\beta ,a, b}+ \dfrac{1}{n}. \end{aligned}$$

\(\square \)

Corollary 2.10

Theorem 2.9 holds with possibly larger constant for subharmonics function \(\varphi \) on a neighborhood U of \(\gamma \) in \({\mathbb {C}}\) with \(\mu := \dfrac{1}{2\pi }{\Delta \varphi }_{\mid _U}\) being of total mass on U strictly less than 1.

Proof

By Riesz decomposition theorem (see for example Theorem 3.7.9 in [12]), we can decompose any subharmonic function as \(\varphi (z)=\int _U \log \vert z-\zeta \vert d\mu (\zeta )+ h(z)\) where h is harmonic. Because h is bounded on U, Theorem 2.9 gives the result with a constant depending, in addition, on h. \(\square \)

We recall now the definition of the Lelong number \(\nu (\varphi )\) of a subharmonic function \(\varphi \) at a point z in \({\mathbb {C}}\), where \(\varphi \not \equiv -\infty \), that is equal to the mass of the “Riesz” measure \(\mu =\dfrac{1}{2\pi }\Delta \varphi \) at the point z. Below is an equivalent definition given by [8, 9],

$$\begin{aligned} \nu (\varphi )(z):=\lim _{r\rightarrow 0^+} \dfrac{\max _{\vert \zeta -z\vert =r} \varphi (\zeta )}{\log r}. \end{aligned}$$

From this definition, Kiselman [8], Theorem 4.1 proves that if \(\mathrm{e}^{-\varphi }\) is locally integrable at z in \({\mathbb {C}}^n\) then \(\nu (\varphi )(z)<2n\).

We recall the following result which is a converse of the previous property in complex dimension one:

Theorem 2.11

If \(\varphi \not \equiv -\infty \) is subharmonic and \(\nu (\varphi )(z)<2\) for a point z,  then \(\mathrm{e}^{-\varphi }\) is locally integrable in a neighborhood of z.

Proof

We refer to the note at top of p. 99 in Hörmander’s book [7]. This is also a consequence of Theorem 2.5 in [5]. We also refer to Proposition 7.1 in [14] for a generalization to higher dimensionsFootnote 1. \(\square \)

Now we state the previous Theorem for points in a Lipschitz graph.

Theorem 2.12

Let \(\gamma \) be a Lipschitz graph and \(\varphi \not \equiv -\infty \) a subharmonic function on \({\mathbb {C}}\). Then \(\nu (\varphi )(\gamma (t))<1\) for a point \(\gamma (t)\in \gamma \) if and only if \(\mathrm{e}^{-\varphi }\) is locally integrable in a neighborhood of \(\gamma (t)\) on \(\gamma \).

Proof

\(\Rightarrow )\) By hypothesis, \(\nu (\varphi )(\gamma (t))=\dfrac{1}{2\pi }\Delta \varphi (\gamma (t))<1\) so this is a direct consequence of Corollary 2.10.

\(\Leftarrow )\) If there exists \(z_0 =(t_0,y_0)\in \gamma \) so that \(\nu (\varphi )(z_0)\ge 1\), then we have \(\frac{1}{2\pi } \Delta \varphi (z_0) \ge 1\). Therefore we have \(\frac{1}{2\pi } \Delta \varphi - \delta _{z_0} \ge 0\) on \({\mathbb {C}}\). Hence we may find a subharmonic function \(\psi \) on \({\mathbb {C}}\) such that \(\frac{1}{2\pi }\Delta \psi = \frac{1}{2\pi }\Delta \varphi - \delta _{z_0}\). Up to a harmonic function we may write \(\varphi = \log |z-z_0| + \psi \). Thus

$$\begin{aligned} \int _{U(z_0) \cap \gamma } \mathrm{e}^{-\varphi }\mathrm{d}s= & {} \int _{U(z_0) \cap \gamma } \frac{1}{|z-z_0|} \mathrm{e}^{-\psi }\mathrm{d}s, \psi \ \text {is locally bounded above near} \ z_0 \\\ge & {} C \int _{U(z_0) \cap \gamma }\frac{1}{|z-z_0|} \mathrm{d}s \\\ge & {} C \int _{t_0-\eta } ^{t_0+\eta } \frac{1}{\sqrt{1+L^2}|t-t_0|} \mathrm{d}t \\= & {} C \frac{1}{\sqrt{1+L^2}} \left( \int _{t_0-\eta } ^{t_0} \frac{1}{t_0-t}\mathrm{d}t + \int _{t_0} ^{t_0+\eta } \frac{1}{t-t_0}\mathrm{d}t \right) \\= & {} C \frac{1}{\sqrt{1+L^2}} \left( \lim _{\varepsilon \rightarrow 0^+} \int _{t_0-\eta } ^{t_0-\varepsilon } \frac{1}{t_0-t}\mathrm{d}t + \lim _{\varepsilon \rightarrow 0^+} \int _{t_0+ \varepsilon } ^{t_0+\eta } \frac{1}{t-t_0}\mathrm{d}t \right) \\= & {} 2C \frac{1}{\sqrt{1+L^2}} \lim _{\varepsilon \rightarrow 0^+} (\ln \eta - \ln \varepsilon ) \\= & {} \infty , \end{aligned}$$

where \(\eta \) is a sufficiently small constant. \(\square \)

Let \(\alpha >0\). We will write \(\nu (\varphi )<\alpha \) to mean that \(\nu (\varphi )(z)<\alpha \) for all points z in the given subset. However, \(\nu (\varphi )\ge \alpha \) should be understood as there exist at least one point z such that \(\nu (\varphi )(z)\ge \alpha \).

3 Proof of Theorem 1.1

In this section, we prove Theorem 1.1 which generalizes the Weierstrass theorem to weighted \(L^2\)-spaces on Lipschitz graphs. The particularity here is to allow the weight \(\varphi \) to have singularities on the given set. We will then carefully take the local integrability of \(\mathrm{e}^{-\varphi }\) (Sect. 2) into account.

We first recall some classical results

Theorem 3.1

(Weierstrass 1883 [15]) Suppose f is a continuous function on a closed bounded interval \([a, b] \subset {\mathbb {R}}\). For each \(\varepsilon >0\) there exists a polynomial P such that

$$\begin{aligned} | f(x) - P(x) | < \varepsilon , \ \ \ \ \forall x \in [a,b]. \end{aligned}$$

Theorem 3.2

(Lavrent’ev, 1936 [10]) Let \(K\subset {\mathbb {C}}\) be compact with \({\mathbb {C}}\setminus K\) connected. Suppose that f is continuous on K. If \(\mathring{K} = \emptyset \), then for each \(\varepsilon >0\) there exists a polynomial P such that

$$\begin{aligned} | f(x) - P(x) | < \varepsilon , \ \ \ \ \forall x \in K. \end{aligned}$$

Theorem 3.3

(Mergelyan, 1951 [11]) Let \(K\subset {\mathbb {C}}\) be compact with \({\mathbb {C}}\setminus K\) connected. Suppose that f is continuous on K and holomorphic on \(\mathring{K}\). Then, for each \(\varepsilon >0\) there exists a polynomial P such that

$$\begin{aligned} | f(x) - P(x) | < \varepsilon , \ \ \ \ \forall x \in K. \end{aligned}$$

In order to prove Theorem 1.1, we first prove

Theorem 3.4

Let \(\gamma \) be a Lipschitz graph over [ab]. Suppose that \(\varphi \) is measurable on \(\gamma \) and that

$$\begin{aligned} \int _{\gamma } \mathrm{e}^{-\varphi }\mathrm{d}s<\infty . \end{aligned}$$

Then polynomials are dense in \(L^2(\gamma , \varphi ).\)

In order to prove this theorem we need the following Lemma.

For each nonnegative real valued \(f \in L^2(\gamma , \varphi )\), define \(f_n=\min \{f,n\}.\)

Lemma 3.5

\(f_n\rightarrow f\) in \(L^2(\gamma , \varphi )\) as \(n\nearrow \infty \).

Proof

We need to prove that \(\int _{\gamma } |f-f_n|^2\mathrm{e}^{-\varphi }\mathrm{d}s\rightarrow 0.\) Now \(|f|^2\mathrm{e}^{-\varphi }\) is an \(L^1\) function and \(|f-f_n|^2\mathrm{e}^{-\varphi }\le |f|^2 \mathrm{e}^{-\varphi }.\) Moreover \(|f-f_n|^2\mathrm{e}^{-\varphi }\rightarrow 0\) a.e.. Hence by the Lebesgue dominated convergence theorem, we have that

$$\begin{aligned} \int _{\gamma } |f-f_n|^2\mathrm{e}^{-\varphi }\mathrm{d}s \rightarrow 0. \end{aligned}$$

\(\square \)

Proof of Theorem 3.4

Let f be such that \(\int _{\gamma } |f|^2\mathrm{e}^{-\varphi } \mathrm{d}s<\infty .\) To approximate f by polynomials, it suffices to consider the case when \(f\ge 0\). If P is any polynomial, then \(\Vert P-f\Vert _{L^2(\gamma , \varphi )}\le \Vert P-f_n\Vert _{L^2(\gamma , \varphi )}+\Vert f_n-f\Vert _{L^2(\gamma , \varphi )}\). So by Lemma 3.5, it suffices to approximate nonnegative bounded measurable functions \(f_n\) by polynomials.

Each bounded measurable function \(f_n\) can be uniformly approximated by simple functions on \(\gamma \). Since \(\int _{\gamma } \mathrm{e}^{-\varphi }\mathrm{d}s<\infty \), this approximation also holds in the weighted norm of \(L^2(\gamma , \varphi )\). Each simple function is the finite linear combination of characteristic functions on measurable sets in \(\gamma \), hence it suffices to approximate a characteristic function by polynomials on measurable sets in \(\gamma \). Since \(\mathrm{e}^{-\varphi }\) is \(L^1\) integrable, there exists for any \(\varepsilon >0\) a constant \(\delta >0\) so that if E is any measurable set in \(\gamma \) with Lebesgue measure \(|E|<\delta ,\) then \(\int _E \mathrm{e}^{-\varphi }\mathrm{d}s<\varepsilon .\) For any measurable set F there exists a finite union of graphs over intervals I so that \(|F\setminus I|,|I\setminus F|<\delta /2.\) Hence \(\Vert \chi _F-\chi _I\Vert _{L^2(F, \varphi )}<\varepsilon .\) Then it suffices to approximate a characteristic function of a graph over an interval in [ab] in \(\gamma \).

Let I be a graph over an interval in \(\gamma \) and \(\delta >0\). There exists \(f\in {\mathcal {C}}^0(I,{\mathbb {C}})\) so that

$$\begin{aligned} B:=\lbrace {s\in {\mathbb {C}}\mid f(s)\ne \chi _{I}(s)}\rbrace \ \ \ \text {has a Lebesgue measure less than} \ \ \ \frac{\delta }{8}. \end{aligned}$$

So

$$\begin{aligned} \int _I |f-\chi _I|^2 \mathrm{e}^{-\varphi }\mathrm{d}s \le \int _{B} \mathrm{e}^{-\varphi }\mathrm{d}s \le \varepsilon . \end{aligned}$$

By the Lavrent’ev theorem, it suffices to approximate a continuous function by polynomials, and then we are done. \(\square \)

Remark 3.6

Theorem 3.4 holds for non-Lipschitz rectifiable graphs.

Theorem 1.1 generalizes Theorem 3.4 by relaxing the assumption on the integrability of \(\mathrm{e}^{-\varphi }\) on \(\gamma \). To prove this generalization, we need the following result.

Theorem 3.7

Let \(\gamma \) be a Lipschitz graph over [ab] and \(\varphi \) a subharmonic function on \({\mathbb {C}}\). Then polynomials are dense in \(L^2(\gamma , \varphi )\) if and only if the function \(\sqrt{Q}\) can be approximated arbitrarily well by polynomials in \(L^2(\gamma , \varphi )\) where Q is a polynomial vanishing at the points \(\gamma (t)\) to order \([\nu (\varphi )(\gamma (t))]\) with Lelong number \(\nu (\varphi )(\gamma (t)) \ge 1\).

Here \([\nu (\varphi )(\gamma (t))]:=\max \lbrace {m\in {\mathbb {Z}}\mid \nu (\varphi )(\gamma (t)) \ge m}\rbrace \) is also called the floor function of \(\nu (\varphi )\) at \(\gamma (t)\).

Proof

By Theorems 2.12 and 3.4, it suffices to consider \(\nu (\varphi ) \ge 1\). Then there exist finitely many points \(\gamma (t_1), \ldots , \gamma (t_n)\) such that \(\nu (\varphi )(\gamma (t_i))\ge 1\) for \(t_i\in [a,b]\), \(i=1,\dots , n\) and Q which can be expressed as \(Q(z) = \prod _{j=1}^n (z-\gamma (t_i))^{[\nu (\varphi )(\gamma (t_i))]}\). We may then choose a subharmonic function \(\psi \) so that \(\varphi = \psi + \log |Q|\) with \(\nu (\psi )<1\) on \(\gamma \).

\(\Rightarrow )\) Remark that \(\sqrt{Q}\in L^2(\gamma , \varphi )\) by Theorem 2.12:

$$\begin{aligned} \int _\gamma \vert \sqrt{Q}\vert ^2\mathrm{e}^{-\varphi }\mathrm{d}s=\int _\gamma \vert \sqrt{Q}\vert ^2 \mathrm{e}^{-\psi -\log \vert Q\vert }\mathrm{d}s=\int _\gamma \mathrm{e}^{-\psi }\mathrm{d}s<\infty . \end{aligned}$$

Then by assumption, there exists a polynomial that approximates arbitrarily well \(\sqrt{Q}\).

\(\Leftarrow )\) Remark that \(f\in L^2(\gamma , \varphi )\) is equivalent to

$$\begin{aligned} \int _\gamma \left| \frac{f}{\sqrt{Q}}\right| ^2 \mathrm{e}^{-\psi } d s < \infty . \end{aligned}$$

So \(\dfrac{f}{\sqrt{Q}}\in L^2(\gamma , \psi )\) and by Theorem 3.4, for each \(\varepsilon >0\), there exists a polynomial P so that

$$\begin{aligned} \int _\gamma \left| \frac{f}{ \sqrt{Q}} - P \right| ^2 \mathrm{e}^{-\psi } \mathrm{d}s = \int _\gamma |f - P\sqrt{Q}|^2 \mathrm{e}^{-\varphi } \mathrm{d}s< \varepsilon . \end{aligned}$$

Thus if \(\sqrt{Q}\) can be approximated arbitrarily well by polynomials in \(L^2(\gamma , \varphi )\), then f can be approximated by polynomials in \(L^2(\gamma , \varphi )\). \(\square \)

Proof of Theorem 1.1

By Theorem 2.12 again, it suffices to consider \(\nu (\varphi ) \ge 1\). Let Q and \(\psi \) be as in the proof of Theorem 3.7. We prove that for every \(\varepsilon >0\), there is a polynomial P that vanishes at \(\gamma (t_i)\) to order \([\nu (\varphi )(\gamma (t_i))]\) so that

$$\begin{aligned} \int _\gamma \left| \sqrt{Q} -P\right| ^2 \mathrm{e}^{-\varphi }\mathrm{d}s = \int _\gamma \left| 1- \frac{P}{\sqrt{Q} }\right| ^2 \mathrm{e}^{-\psi } \mathrm{d}s < \varepsilon . \end{aligned}$$
(3.1)

For convenience, we look for P such as

$$\begin{aligned} P(z) = Q(z) \cdot {\widetilde{P}}(z) = \prod _{j=1}^n (z-\gamma (t_j))^{[\nu (\varphi )(\gamma (t_j))]} \cdot {\widetilde{P}}(z). \end{aligned}$$

Then (3.1) is equivalent to find some polynomial \({\widetilde{P}}\) so that

$$\begin{aligned} \int _\gamma \left| 1 - \frac{Q \cdot {\widetilde{P}}}{\sqrt{Q}}\right| ^2 \mathrm{e}^{-\psi } \mathrm{d}s < \varepsilon . \end{aligned}$$
(3.2)

Let \(\delta >0\). Set \(g(z)= \dfrac{1}{\sqrt{Q(z)}}\) except on the arcs \(I_i\) on \(\gamma \) with length \(2\delta \) and center at \(\gamma (t_i)\). We can make g continuous and \(\vert \sqrt{Q(z)}g(z)\vert \le 1\) on such arcs of length \(2\delta \). Then

$$\begin{aligned} \int _\gamma \left| 1 - \sqrt{Q}g\right| ^2\mathrm{e}^{-\psi }\mathrm{d}s\le & {} 4\sum _{i=1}^n\int _{I_i}\mathrm{e}^{-\psi }\mathrm{d}s\nonumber \\= & {} 4\int _{\bigcup _{i=1}^n I_i} \mathrm{e}^{-\psi }\mathrm{d}s. \end{aligned}$$
(3.3)

Since \(\bigcup _{i=1}^n I_i\) is a measurable set of measure \(2\delta n\) and \(\mathrm{e}^{-\psi }\in L^1_{\mathrm{loc}}\), we may choose \(\delta \) sufficiently small in order for (3.3) to be \(<\varepsilon \). Since \(g\in L^2(\gamma , \psi )\), by Theorem 3.4, there exists a polynomial A satisfying

$$\begin{aligned} \int _\gamma |g- A|^2 \mathrm{e}^{-\psi } \mathrm{d}s < \frac{\varepsilon }{\left( \max \limits _{\gamma (t)\in \gamma } \vert Q(\gamma (t))\vert \right) ^2}. \end{aligned}$$

Then by Cauchy–Schwarz and the previous estimate,

$$\begin{aligned}&\int _\gamma \vert \sqrt{Q}\vert ^2\vert g-A\vert ^2 \mathrm{e}^{-\psi }\mathrm{d}s\nonumber \\&\quad \le \left( \int _\gamma \vert \sqrt{Q}\vert ^4 \vert g-A\vert ^2\mathrm{e}^{-\psi }\mathrm{d}s\right) ^{1/2}\left( \int _\gamma \vert g-A\vert ^2\mathrm{e}^{-\psi }\mathrm{d}s\right) ^{1/2},\nonumber \\&\quad \le \left( \max _{\gamma }\vert Q\vert \right) ^2 \cdot \int _\gamma \vert g-A\vert ^2\mathrm{e}^{-\psi }\mathrm{d}s,\nonumber \\&\quad < \varepsilon . \end{aligned}$$
(3.4)

Combine (3.3) and (3.4), we may choose \({\widetilde{P}} = A\). \(\square \)

Remark 3.8

In fact we show that \({\mathcal {P}} \cap L^2(\gamma , \varphi )\) is dense in \(L^2(\gamma , \varphi )\) where \({\mathcal {P}}\) is the set of all polynomials. If \(\nu (\varphi ) \ge 1\), not all polynomials are in \(L^2(\gamma , \varphi )\), e.g. \(1\notin L^2(\gamma , \varphi )\).

4 Proof of Theorem 1.2

In this section, we give a weighted \(L^2\)-version of the Mergelyan theorem for compact sets in \({\mathbb {C}}\) that are the union of bounded Carathéodory domains and Lipschitz graphs. Recall the following theorem

Theorem 4.1

(Theorem 1.3 in [2]) Let \(\Omega \subset {\mathbb {C}}\) be a Carathéodory domain and \(\varphi \) a subharmonic function in \({\mathbb {C}}\). Then polynomials are dense in \(H^2 (\Omega , \varphi )\).

One generalization of Theorem 4.1 is the following

Theorem 4.2

Let \(\Omega _1 \subset {\mathbb {C}}\) be a Carathéodory domain, let \(\Omega _2\) be another Carathéodory domain which is inside of a bounded component of \(\overline{\Omega _1}^c\). Let \(\varphi \) be a subharmonic function in \({\mathbb {C}}\). Then polynomials are dense in \(H^2(\Omega _1\cup \Omega _2, \varphi )\) (Fig. 2).

Fig. 2
figure 2

Example of a situation that might happen in Theorem 4.2 where \(\Omega _1\) and \(\Omega _2\) are outer snakes with no common point

In order to prove this theorem we need the following proposition which can be easily deduced from the proof of Proposition 1.2 in [2].

Proposition 4.3

Let \(\Omega \) be a bounded Carathéodory domain and \(\varphi \) a subharmonic function in \({\mathbb {C}}\). Then for each \(f\in H^2(\Omega , \varphi )\) there exist functions \(f_n \in H^2(\Omega _n, \varphi )\) such that \(\Vert f_n -f \Vert _{L^2( \Omega , \varphi )} \rightarrow 0\) and \(\Vert f_n\Vert _{L^2(\Omega _n \setminus \Omega , \varphi )} \rightarrow 0\) as \(n\rightarrow \infty \), where \(\Omega _n\supset {\overline{\Omega }}\) is a sequence of bounded simply-connected domains so that \(\partial \Omega _n\) converges to \(\partial \Omega \) in the sense of the Hausdorff distance.

Proof of Theorem 4.2

First we consider the case

$$\begin{aligned} \nu (\varphi ) < 2 \ \ \ \ \ \text {on} \ \ {\overline{\Omega }}_1\cup {\overline{\Omega }}_2. \end{aligned}$$
(4.1)

By Theorem 4.1, for each \(\varepsilon >0\) there exists a holomorphic polynomial \(P_1\) so that

$$\begin{aligned} \int _{\Omega _2} | f-P_1|^2\mathrm{e}^{-\varphi } \mathrm{d}\lambda _z < \frac{\varepsilon }{26}. \end{aligned}$$
(4.2)

Put

$$\begin{aligned} g=\left\{ \begin{aligned} f-P_1&\text {on} \ \ \Omega _1\\ 0&\ \ \text {on} \ \ \ \Omega _2. \end{aligned} \right. \end{aligned}$$

Since \(\Omega _i, i =1,2\) is a Carathéodory domain, there exists a sequence \(\{\Omega _{i,n}\}\) of Jordan domains such that \(\overline{\Omega _i}\subset \Omega _{i,n}\) and \({{\overline{\Omega }}_{i,n+1}}\subset \Omega _{i,n}\) and the Hausdorff distance between \(\partial \Omega _{i,n}\) and \(\partial \Omega _i\) tends to zero as \(n\rightarrow \infty \) (see Chapter I, Section 3 of [6]). Let n be sufficiently large so that \(\Omega _1 \cap \Omega _{2,n} = \emptyset \).

Since \(g\in H^2(\Omega _1, \varphi )\), by using Proposition 4.3 on \(\Omega _1\), for each \(\varepsilon >0\) we get for large enough n functions \(g_{1,n} \in H^2{(\Omega _{1,n}, \varphi )}\) so that

$$\begin{aligned} \Vert g_{1,n} -g \Vert _{L^2( \Omega _1, \varphi )} < \frac{\varepsilon }{26} \end{aligned}$$
(4.3)

and

$$\begin{aligned} \Vert g_{1,n}\Vert _{L^2(\Omega _{1,n} \setminus \Omega _1, \varphi )} < \frac{\varepsilon }{26}. \end{aligned}$$
(4.4)

By Theorem 4.1, for each n there exists a polynomial \(Q_n\) so that

$$\begin{aligned} \int _{\Omega _{1,n}} |g_{1,n}-Q_n|^2 \mathrm{e}^{-\varphi }\mathrm{d}\lambda < \frac{\varepsilon }{26}. \end{aligned}$$
(4.5)

Thus for sufficiently large n we have

$$\begin{aligned}&\int _{\Omega _1} |f- P_1-Q_n|^2 \mathrm{e}^{-\varphi }\mathrm{d}\lambda _z \\&\quad \le 2 \int _{\Omega _1} |f- P_1-g_{1,n}|^2 \mathrm{e}^{-\varphi }\mathrm{d}\lambda _z + 2\int _{\Omega _1} |g_{1,n}-Q_n|^2 \mathrm{e}^{-\varphi }\mathrm{d}\lambda _z \\&\quad \le 2\int _{\Omega _1} |g - g_{1,n} |^2 \mathrm{e}^{-\varphi }\mathrm{d}\lambda _z + \frac{\varepsilon }{13} \ \ \ \text { by }(4.5)\\&\quad \le \frac{2\varepsilon }{13} \ \ \ \text { by }(4.3) ; \end{aligned}$$

and

$$\begin{aligned}&\int _{\Omega _2} |f - P_1 - Q_n|^2 \mathrm{e}^{-\varphi }\mathrm{d}\lambda _z \\&\quad \le 2 \int _{\Omega _2} |f- P_1|^2 \mathrm{e}^{-\varphi }\mathrm{d}\lambda _z + 2\int _{\Omega _2} |Q_n|^2 \mathrm{e}^{-\varphi }\mathrm{d}\lambda _z \\&\quad \le \frac{2\varepsilon }{26} + 4 \int _{\Omega _2} |Q_n - g_{1,n}|^2 \mathrm{e}^{-\varphi }\mathrm{d}\lambda _z + 4 \int _{\Omega _2} |g_{1,n}|^2 \mathrm{e}^{-\varphi }\mathrm{d}\lambda _z \ \ \ \text { by } (4.2) \\&\quad \le \frac{5\varepsilon }{13} \ \ \ \ \text {by } (4.4), (4.5). \\ \end{aligned}$$

Next we consider the case \(\nu (\varphi ) \ge 2\). Then there exist finitely many points \(z_j \in {\overline{\Omega }}_1\cup {\overline{\Omega }}_2\), \(1 \le j \le N\) so that \(\nu (\varphi ) \ge 2\) at those points. We may find a polynomial Q with zeros at those points, subharmonic function \(\psi \) satisfying \(\varphi =\psi + 2\log \vert Q \vert \) and \(\nu (\psi ) <2\) on \( {\overline{\Omega }}_1\cup {\overline{\Omega }}_2\). Let \(f\in {\mathcal {O}}(\Omega _1\cup \Omega _2) \cup L^2 (\Omega _1\cup \Omega _2, \varphi )\),

$$\begin{aligned} \frac{f}{Q} \in {\mathcal {O}}(\Omega _1\cup \Omega _2) \cap L^2(\Omega _1\cup \Omega _2, \psi ). \end{aligned}$$

Then by the first case, \(\frac{f}{Q}\) can be approximated by a polynomial P in \(L^2(\Omega _1\cup \Omega _2, \psi )\). Thus f can be approximated by the polynomial \(P \cdot Q\) in \(L^2 (\Omega _1\cup \Omega _2, \varphi )\). \(\square \)

The proof of the main theorem of this section, Theorem 1.2, is divided into 3 cases that correspond to the locus of the zeros of the polynomial Q in the decomposition of the weight function \(\varphi =\psi +\log \vert Q\vert \). We will then need the following result:

Theorem 4.4

Let \(\Omega \) be a Carathéodory domain and \(\varphi \) a subharmonic function in \({\mathbb {C}}\). Suppose P is a polynomial with \(\int _\Omega |P|^2 \mathrm{e}^{-\varphi } \mathrm{d}\lambda < \infty \). Let \(p\in \partial \Omega \) and a disc \(\Delta \subset \Omega ^c\) with \(p\in \partial \Delta \). Then we can approximate P by \({\widetilde{P}}\) which is holomorphic on a neighborhood of \({\overline{\Omega }}\) with \({\widetilde{P}}(p) = 0\) in the norm of \(L^2(\Omega , \varphi )\).

Proof

Set \( M= \int _\Omega |P(z)|^2 \mathrm{e}^{-\varphi (z)} \mathrm{d}\lambda _z\). Then for each \(\varepsilon >0\) there exists a small neighborhood U(p) of p so that

$$\begin{aligned} \int _{U(p)\cap \Omega } |P(z)|^2 \mathrm{e}^{-\varphi (z)} \mathrm{d}\lambda _z < \frac{\varepsilon }{2}. \end{aligned}$$

Take \(h_n(z) = \left( \frac{p-q}{z-q} \right) ^n\), choose n sufficiently large so that

$$\begin{aligned} |h_n(z)|^2< \frac{\varepsilon }{2M} \ \text {on } \ \left( U(p)\right) ^c \cap \Omega \ \ \text {and} \ |h_n(z)|^2<1 \ \text {on} \ U(p) \cap \Omega . \end{aligned}$$

Now fix such n. Set \({\widetilde{P}}(z) =(1-h_n(z)) \cdot P(z)\), then \({\widetilde{P}}\) is holomorphic on a neighborhood of \(\Omega \) with \({\widetilde{P}}(p) = 0\) satisfying

$$\begin{aligned} \int _{\Omega } |{\widetilde{P}}(z) -P(z)|^ 2\mathrm{e}^{-\varphi (z)} \mathrm{d}\lambda _z= & {} \int _{U(p) \cap \Omega } |h_n(z)P(z)|^ 2\mathrm{e}^{-\varphi (z)} \mathrm{d}\lambda _z + \\&\int _{\Omega \setminus U(p)} |h_n(z)P(z)|^ 2\mathrm{e}^{-\varphi (z)} \mathrm{d}\lambda _z \\\le & {} \max _{z \in U(p)\cap \Omega }|h_n(z)|^2 \cdot \int _{U(p)\cap \Omega } |P(z)|^2 \mathrm{e}^{-\varphi (z)} \mathrm{d}\lambda _z \\&+ \max _{z \in \left( U(p)\right) ^c \cap \Omega }|h_n(z)|^2 \cdot \int _{\left( U(p)\right) ^c \cap \Omega } |P(z)|^2 \mathrm{e}^{-\varphi (z)} \mathrm{d}\lambda _z \\< & {} \frac{\varepsilon }{2} + \frac{\varepsilon }{2} \\= & {} \varepsilon . \end{aligned}$$

\(\square \)

Remark 4.5

The assumption on the existence of such a disc on the boundary of \(\Omega \) is verified when \(\partial \Omega \) is \({\mathcal {C}}^2\).

Proof of Theorem 1.2

First we consider: Case 1:

$$\begin{aligned} \nu (\varphi )<1 \ \ \text {on} \ \ \gamma \ \ \ \text {and} \ \ \ \nu (\varphi ) < 2 \ \ \text {on} \ \ {\overline{\Omega }}. \end{aligned}$$

Let \(f\in {\mathcal {O}}(\Omega ) \cup L^2 (\Omega \cup \gamma , \varphi )\). By Theorem 4.1, for each \(\varepsilon >0\), there exists polynomial \(P_1\) so that

$$\begin{aligned} \int _{\Omega } |f(z) - P_1(z)|^2 \mathrm{e}^{-\varphi (z)}\mathrm{d}\lambda _z < \frac{\varepsilon }{16}. \end{aligned}$$
(4.6)

By the Theorem 1.1, there exists polynomial \(P_2\) so that

$$\begin{aligned} \int _\gamma |f- P_2| ^2 \mathrm{e}^{-\varphi } \mathrm{d}s <\frac{\varepsilon }{16}. \end{aligned}$$
(4.7)

Since \(\Omega \) is a Carathéodory domain, there exists a sequence \(\{\Omega _j\}\) of bounded simply-connected domains such that \({\overline{\Omega }}\subset \Omega _j\) and \({{\overline{\Omega }}_{j+1}}\subset \Omega _j\) and the Hausdorff distance between \(\partial \Omega _j\) and \(\partial \Omega \) tends to zero as \(j\rightarrow \infty \). By Corollary 2.10 we may choose j sufficiently large so that

$$\begin{aligned} \max \left\{ \int _{\gamma \cap \Omega _j} |f|^2 \mathrm{e}^{-\varphi }\mathrm{d}s, \ \ \ \ \int _{\gamma \cap \Omega _j} \left| P_1\right| ^2 \mathrm{e}^{-\varphi }\mathrm{d}s \right\} < \frac{\varepsilon }{64}. \end{aligned}$$
(4.8)

Now fix such j. Let \(\chi : {\mathbb {C}} \rightarrow [0,1]\) be a smooth function with \( \chi \equiv 1 \) on \( \Omega _{j+1}\) and \(\chi \equiv 0\) outside of \(\Omega _{j}\). Set

$$\begin{aligned} h(z) = \chi (z) P_1(z) + (1-\chi (z)) P_2(z). \end{aligned}$$

Then h(z) is holomorphic on \(\Omega \), continuous on \({\overline{\Omega }} \cup \gamma \). Set

$$\begin{aligned} M = \int _ \Omega \mathrm{e}^{-\varphi (z)} \mathrm{d}\lambda _z + \int _\gamma \mathrm{e}^{-\varphi } \mathrm{d}s. \end{aligned}$$

By Mergelyan approximation theorem, there exists a polynomial P so that

$$\begin{aligned} |P -h|^2 < \frac{\varepsilon }{16M} \ \ \ \ \ \ \text {on} \ \ {\overline{\Omega }} \cup \gamma . \end{aligned}$$

Then

$$\begin{aligned}&\Vert f-P\Vert ^2_{L^2 (\Omega \cup \gamma , \varphi )}\\&\quad \le 2 \Vert f-h\Vert ^2_{L^2 (\Omega \cup \gamma , \varphi )} +2 \Vert h-P\Vert ^2_{L^2 (\Omega \cup \gamma , \varphi )} \\&\quad \le 2 \int _{\Omega }| f(z) - P_1(z) | ^2\mathrm{e}^{-\varphi (z)} \mathrm{d}\lambda _z + 2 \int _{\left( \Omega _j\right) ^c \cap \gamma } | f - P_2 | ^2\mathrm{e}^{-\varphi } d s \\&\qquad +\, 2 \int _{\gamma \cap \Omega _j} |f- h|^2\mathrm{e}^{-\varphi } d s + \frac{\varepsilon }{8} \\&\quad \le 2 \int _{\gamma \cap \Omega _j} |f- \chi \cdot P_1 - (1-\chi )P_2|^2\mathrm{e}^{-\varphi } d s + \frac{3\varepsilon }{8}\quad \text {by }(4.6), (4.7) \\&\quad \le 4 \int _{\gamma \cap \Omega _j} |f- P_1|^2\chi ^2\mathrm{e}^{-\varphi } d s \\&\qquad + \, 4 \int _{\gamma \cap \Omega _j} |f- P_2|^2 (1-\chi )^2\mathrm{e}^{-\varphi } \mathrm{d}s + \frac{3\varepsilon }{8} \\&\quad \le 8 \int _{\gamma \cap \Omega _j} |f|^2 \mathrm{e}^{-\varphi }\mathrm{d}s + 8 \int _{\gamma \cap \Omega _j} |P_1|^2 \mathrm{e}^{-\varphi }\mathrm{d}s + \frac{5\varepsilon }{8} \quad \text {by } (4.7)\\&\quad \le \frac{7\varepsilon }{8} \quad \text {by }(4.8). \end{aligned}$$

Now we consider Case 2:

$$\begin{aligned} 1 \le \nu (\varphi )< 2 \ \ \text {on} \ \ \gamma \ \ \ \text {and} \ \ \ \nu (\varphi )(z)< 2 \ \ \text {on} \ \ {\overline{\Omega }}. \end{aligned}$$

Then there exist finitely many points \(\gamma (t_i) \in \gamma \), \(t_i\in [a,b]\), \(1\le i\le N\) such that

$$\begin{aligned} t_1<t_2<t_3< \ldots< t_N \quad \text {and}\quad 1 \le \nu (\varphi )(\gamma (t_i)) < 2, \end{aligned}$$

a polynomial Q and a subharmonic function \(\psi \) satisfying \(\varphi =\psi +\log \vert Q\vert \) where Q vanishes only at \(\gamma (t_i)\) and \(\nu (\psi )<1\) on \(\gamma \). Since the polynomial Q has no zeros on \({\overline{\Omega }}\setminus \{\gamma (a)\}\), \(\nu (\psi )(z)= \nu (\varphi )(z)\) for each \(z\in {\overline{\Omega }}\setminus \{\gamma (a)\}\).

We need now to distinguish two subcases depending on the nature of \(p:=\gamma (a)\):

Subcase A: If \(t_1 =a\). Let \(f\in {\mathcal {O}}(\Omega ) \cup L^2 (\Omega \cup \gamma , \varphi )\). Then by Theorem 4.1 there exists a polynomial \(P_1\) satisfying

$$\begin{aligned} \left\| f - P_1 \right\| _{L^2(\Omega , \varphi )} < \varepsilon . \end{aligned}$$

Since the boundary of \(\Omega \) is \({\mathcal {C}}^2\) near p, by Theorem 4.4, we may choose a holomorphic function \({\mathcal {P}}_1\) on \(\Omega _j\) satisfying

$$\begin{aligned} {\mathcal {P}}_1(p)=0 \ \ \ \text {and} \ \ \ \ \left\| f - {\mathcal {P}}_1 \right\| _{L^2(\Omega , \varphi )} < \frac{\varepsilon }{16}. \end{aligned}$$
(4.9)

By the construction in the proof of Theorem 1.1, there exists a polynomial \(P_2\) so that

$$\begin{aligned} \int _\gamma |f- P_2\cdot Q| ^2 \mathrm{e}^{-\varphi } \mathrm{d}s <\frac{\varepsilon }{16}. \end{aligned}$$
(4.10)

Set \(\displaystyle {M=\int _{\Omega } \mathrm{e}^{-\psi (z)}\mathrm{d}\lambda _z + \int _\gamma \mathrm{e}^{-\psi }\mathrm{d}s.}\) Since \(f\in {\mathcal {O}}(\Omega ) \cup L^2 (\Omega \cup \gamma , \varphi )\), by (4.9) we may choose j sufficiently large so that \(\gamma (t_i) \in (\Omega _j)^c\), \(2\le i \le N\) and

$$\begin{aligned} \max \left\{ \int _{\gamma \cap \Omega _j} |f|^2 \mathrm{e}^{-\varphi }\mathrm{d}s, \ \ \ \ \int _{\gamma \cap \Omega _j} \left| {\mathcal {P}}_1\right| ^2 \mathrm{e}^{-\varphi }\mathrm{d}s \right\} < \frac{\varepsilon }{64}. \end{aligned}$$
(4.11)

Now fix such j. Choose \(\chi \) be as above and

$$\begin{aligned} h(z) = \chi (z) {\mathcal {P}}_1(z) + (1-\chi (z)) P_2(z) Q(z). \end{aligned}$$

Then h and \(\frac{h}{Q}\) are holomorphic on \(\Omega _j\), continuous on \(\overline{\Omega _j} \cup \gamma \). By Theorem 3.3 there exists a polynomial G so that

$$\begin{aligned} \left| \frac{h}{Q}-G \right| ^2 < \frac{\varepsilon }{32 M \cdot \max \limits _{\overline{\Omega _j} \cup \gamma }|Q|} \ \ \text {on } \ \ \ {\overline{\Omega }} \cup \gamma . \end{aligned}$$

Then

$$\begin{aligned}&\Vert f-G \cdot Q\Vert ^{2}_{L^2 (\Omega \cup \gamma , \varphi )} \\&\quad = \left\| \frac{f}{\sqrt{Q}}-G \cdot \sqrt{Q} \right\| ^{2}_{L^2 (\Omega \cup \gamma , \psi )} \\&\quad = \left\| \frac{f}{\sqrt{Q}}- \frac{h}{\sqrt{Q}} + \frac{h}{\sqrt{Q}} - G \cdot \sqrt{Q} \right\| ^{2}_{L^2 (\Omega \cup \gamma , \psi )} \\&\quad \le 2 \left\| \frac{f}{\sqrt{Q}}- \frac{h}{\sqrt{Q}} \right\| ^{2}_{L^2 (\Omega \cup \gamma , \psi )} + 2 \left\| \frac{h}{\sqrt{Q}} - G \cdot \sqrt{Q} \right\| ^{2}_{L^2 (\Omega \cup \gamma , \psi )} \\&\quad \le 2 \Vert f-h\Vert ^2 _{L^2 (\Omega \cup \gamma , \varphi )} + 2M \cdot \max _{{\overline{\Omega }} \cup \gamma } |Q| \cdot \max _ {{\overline{\Omega }} \cup \gamma } \left| \frac{h}{Q} -G\right| ^2 \\&\quad \le 2 \int _{\Omega } \left| f(z)- {\mathcal {P}}_1(z) \right| ^2\mathrm{e}^{-\varphi (z)} \mathrm{d}\lambda _z + 2 \int _{\gamma \cap (\Omega _{j})^c} \left| f -P_2\cdot Q \right| ^2\mathrm{e}^{-\varphi } d s \\&\qquad +\, 2 \int _{\gamma \cap (\Omega _{j} \setminus \Omega )} \left| f - h \right| ^2\mathrm{e}^{-\varphi } d s + \frac{\varepsilon }{16} \\&\quad \le 2 \int _{\gamma \cap \Omega _{j}} \left| f- \chi {\mathcal {P}}_1 - (1-\chi )P_2 \cdot Q \right| ^2\mathrm{e}^{-\varphi } \mathrm{d}s + \frac{5\varepsilon }{16} \quad \text {by }(4.9), (4.10) \\&\quad \le 4 \int _{\gamma \cap \Omega _{j} } \left| f -{\mathcal {P}}_1 \right| ^2\chi ^2\mathrm{e}^{-\varphi } \mathrm{d}s + 4 \int _{\gamma \cap \Omega _{j} } \left| f- P_2\cdot Q\right| ^2(1-\chi )^2\mathrm{e}^{-\varphi } d s + \frac{5\varepsilon }{16} \\&\quad \le 8 \int _{\gamma \cap \Omega _{j}} |f|^2 \mathrm{e}^{-\varphi }\mathrm{d}s + 8 \int _{\gamma \cap \Omega _{j} } \left| {\mathcal {P}}_1\right| ^2 \mathrm{e}^{-\varphi }\mathrm{d}s + \frac{9\varepsilon }{16} \quad \text {by }(4.10)\\&\quad \le \frac{13\varepsilon }{16} \quad \text {by }(4.11). \end{aligned}$$

Subcase B: If \(\gamma (t_1)\ne p\). We may choose j sufficiently large so that \(\gamma (t_i) \in (\Omega _j)^c \cap \gamma , 1\le i \le N\) and the formula (4.11) also holds. Then the following proof is similar to subcase A.

Finally we consider: Case 3: \(\nu (\varphi )\ge 2\). There exist finitely many points \(z_j \in {\overline{\Omega }}\), \(\gamma (t_j) \in \gamma \) so that \(\nu (\varphi )\ge 2\) at those points. We may find a polynomial \(Q_1\) with zeros at those points, subharmonic function \(\psi \) satisfying \(\varphi =\psi + 2\log \vert Q_1 \vert \) and \(\nu (\psi ) <2\) on \( {\overline{\Omega }} \cup \gamma \). Let \(f\in {\mathcal {O}}(\Omega ) \cup L^2 (\Omega \cup \gamma , \varphi )\),

$$\begin{aligned} \frac{f}{Q_1} \in {\mathcal {O}}(\Omega ) \cap L^2(\Omega \cup \gamma , \psi ). \end{aligned}$$

Then by Case 1 or 2, \(\frac{f}{Q_1}\) can be approximated by a polynomial P in \(L^2(\Omega \cup \gamma , \psi )\). Thus f can be approximated by the polynomial \(P \cdot Q_1\) in \(L^2 (\Omega \cup \gamma , \varphi )\). \(\square \)

5 Proof of Theorem  1.4

The classical Carleman approximation theorem applies to continuous function f on \({\mathbb {R}}.\) Let \(\varepsilon (x) >0\) be a continuous function.

Theorem 5.1

( [3]) There exists an entire function F so that \(|F(x)-f(x)|<\varepsilon (x)\) on \({\mathbb {R}}\).

This theorem is equivalent to the following corollary

Corollary 5.2

Let f be a continuous function on \({\mathbb {R}}\). For any \(\{ \varepsilon _n\}_{n=-\infty }^{\infty } \) with \(\varepsilon _n >0\), there exists an entire function F so that for each n,

$$\begin{aligned} |F(x)-f(x)| < \varepsilon _n, \ \ \ \ \ \forall x \in [n, n+1]. \end{aligned}$$

It was pointed out by Alexander [1] that Carleman’s proof actually gives

Theorem 5.3

( [1, 3]) If \(\gamma : {\mathbb {R}}\rightarrow {\mathbb {C}}\), \(\gamma \) is a locally rectifiable curve and properly embedded, then for each continuous function f on \(\gamma \) and continuous function \(\varepsilon >0\), there exists an entire function F so that \(|F-f|<\varepsilon \) on \(\gamma \).

We prove below Theorem 1.4 which is a weighted \(L^2\)- version of this generalization for Lipschitz graphs.

Let \(\Gamma \) be the graph of a locally Lipschitz function over the real axis in \({\mathbb {C}}\). We may assume \(\Gamma = \{(t, \phi (t)) \}\) with \(\phi : {\mathbb {R}}\rightarrow {\mathbb {R}}\) a locally Lipschitz continuous function. For each \([n, n+1]\), \(\Gamma _n: =\{ (t, \phi (t))|\; n\le t \le n+1 \}\) is a Lipschitz graph.

Proof of Theorem 1.4

Case 1: \(\nu (\varphi )< 1\) on \(\Gamma \). Let \(f \in L^2(\Gamma , \varphi )\). By Theorem 3.4, there exists a continuous function \(g_n\) on \(J_n: = \{(t,\phi (t)) | \; n-1 \le t \le n+2 \}\) so that

$$\begin{aligned} \int _{J_n} |f-g_n|^2\mathrm{e}^{-\varphi }\mathrm{d}s < \frac{1}{40} \min \{\varepsilon _{n-1}, \varepsilon _{n}, \varepsilon _{n+1} \} \le \frac{1}{40} \varepsilon _{n}. \end{aligned}$$

Choose a partition of unity \(\{ \chi _n \}_{n\in {\mathbb {Z}}}\) of \(\Gamma \) so that \(\chi _n \ge 0\) on \(\Gamma \), \(\chi _n =0\) outside of \(J_n\) and \(\sum _n\chi _n =1 \) on \(\Gamma \). Let \(g = \sum _n \chi _n g_n\). Then g is continuous on \(\Gamma \) and for each n,

$$\begin{aligned}&\int _{\Gamma _n} |f-g|^2 \mathrm{e}^{-\varphi }\mathrm{d}s \nonumber \\&\quad = \int _{\Gamma _n} | \chi _{n-1}(f-g_{n-1}) + \chi _{n}(f-g_{n}) + \chi _{n+1}(f-g_{n+1})|^2 \mathrm{e}^{-\varphi } \mathrm{d}s \nonumber \\&\quad \le 2 \int _{\Gamma _n} | \chi _{n-1}(f-g_{n-1}) + \chi _{n}(f-g_{n})|^2 \mathrm{e}^{-\varphi } \mathrm{d}s + 2 \int _{\Gamma _n} |\chi _{n+1}(f-g_{n+1})|^2 \mathrm{e}^{-\varphi } \mathrm{d}s \nonumber \\&\quad \le 4\int _{\Gamma _n} | \chi _{n-1}(f-g_{n-1})|^2 \mathrm{e}^{-\varphi } \mathrm{d}s + 4 \int _{\Gamma _n} | \chi _{n}(f-g_{n})|^2 \mathrm{e}^{-\varphi } \mathrm{d}s \nonumber \\&\qquad + 2 \int _{\Gamma _n} | \chi _{n+1}(f-g_{n+1})|^2 \mathrm{e}^{-\varphi } \mathrm{d}s \nonumber \\&\quad \le \frac{1}{4} \varepsilon _n. \nonumber \\ \end{aligned}$$
(5.1)

By using Theorem 5.3 on the continuous function g of \(\Gamma \), we can find an entire function F so that for each n

$$\begin{aligned} |F- g|^2 < \frac{\varepsilon _n}{4 \int _{\Gamma _n} \mathrm{e}^{-\varphi }\mathrm{d}s} \ \ \ \text {on} \ \ \Gamma _n. \end{aligned}$$

Thus

$$\begin{aligned} \int _{\Gamma _n} |g - F|^2\mathrm{e}^{-\varphi } \mathrm{d}s < \frac{\varepsilon _n}{4} . \end{aligned}$$

Hence we have

$$\begin{aligned}&\int _{\Gamma _n}|f - F|^2\mathrm{e}^{-\varphi } \mathrm{d}s \\&\quad \le 2 \int _{\Gamma _n}|f - g|^2\mathrm{e}^{-\varphi } \mathrm{d}s + 2 \int _{\Gamma _n}|g - F|^2\mathrm{e}^{-\varphi } \mathrm{d}s \\&\quad < \varepsilon _n. \end{aligned}$$

Now we consider: Case 2: \(\nu (\varphi ) \ge 1\). We may list the points \(\{\Gamma (t_j)\}_j\) with \(\nu (\varphi )(\Gamma (t_j)) \ge 1\), where \(\Gamma (t_j) = (t_j, \phi (t_j))\). Then there exists an entire function Q which vanishes at each \(\Gamma (t_j)\) to exact order \([\nu (\varphi )(\Gamma (t_j))]\). We may define \(\sqrt{Q}\) to be continuous on \(\Gamma \), without loss of generality we may set \(Q(z)= \prod \limits _j (z-\Gamma (t_j))^{[\nu (\varphi )(\Gamma (t_j))]} \mathrm{e}^{p_j(z)}\), where \(p_j(z)\) are entire functions. Then there exists a subharmonic function \(\psi \) such that \(\varphi = \psi + \log |Q|\) with \(\nu (\psi ) < 1\) on \(\Gamma \). Let \(f \in L^2(\Gamma , \varphi )\). Then \( \frac{f}{\sqrt{Q}} \in L^2( \Gamma , \psi ). \) By Case 1, there exists an entire function F so that for each n

$$\begin{aligned} \int _{\Gamma _n}\left| \frac{f}{\sqrt{Q}} -F \right| ^2\mathrm{e}^{-\psi } \mathrm{d}s = \int _{\Gamma _n} |f -F \cdot \sqrt{Q}|^2\mathrm{e}^{-\varphi } \mathrm{d}s < \frac{\varepsilon _n}{4}. \end{aligned}$$
(5.2)

Thus it suffices to find an entire function H vanishing at \(\Gamma (t_j)\) to order \([\nu (\varphi )(\Gamma (t_j))]\) so that for each n

$$\begin{aligned} \int _{\Gamma _n} \left| \sqrt{Q} -H\right| ^2 \mathrm{e}^{-\varphi }\mathrm{d}s = \int _{\Gamma _n} \left| 1- \frac{H}{\sqrt{Q} }\right| ^2 \mathrm{e}^{-\psi } \mathrm{d}s < \frac{\varepsilon _n}{4 \max \limits _{\Gamma (t) \in \Gamma _n}|F(\Gamma (t))|^2}. \end{aligned}$$
(5.3)

We look for H for convenience as

$$\begin{aligned} H(z) = Q(z) \cdot {\widetilde{H}}(z) = \prod _{j=1}^\infty (z-\Gamma (t_j))^{[\nu (\varphi )(\Gamma (t_j))]}\mathrm{e}^{p_j(z)} \cdot {\widetilde{H}}(z). \end{aligned}$$

The estimate (5.3) is then equivalent to find an entire function \({\widetilde{H}}\) so that

$$\begin{aligned} \int _{\Gamma _n} \left| 1 - \frac{Q \cdot {\widetilde{H}}}{\sqrt{Q}}\right| ^2 \mathrm{e}^{-\psi } \mathrm{d}s < \frac{\varepsilon _n}{4 \max \limits _{\Gamma (t) \in \Gamma _n}|F(\Gamma (t))|^2}, \ \ \ \ \forall \ n. \end{aligned}$$
(5.4)

Let \(\delta _j>0\). Set \(g(z)= \dfrac{1}{\sqrt{Q(z)}}\) except on arcs \(\Gamma ^j\) of \(\Gamma \) with length \(2\delta _j\) and center at \(\Gamma (t_j)\). We can make g continuous and \(\vert \sqrt{Q} \cdot g\vert \le 1\) on such arcs of length \(2\delta _j\). Then

$$\begin{aligned} \int _{\Gamma _n} \left| 1 - \sqrt{Q} \cdot g\right| ^2\mathrm{e}^{-\psi }\mathrm{d}s\le & {} 4 \sum _{\Gamma (t_j) \in J_n}\int _{\Gamma ^j}\mathrm{e}^{-\psi }\mathrm{d}s. \end{aligned}$$

Since \(\bigcup \limits _{\Gamma (t_j) \in J_n} \Gamma ^j\) is a measurable set and \(\mathrm{e}^{-\psi }\in L^1_{\mathrm{loc}}\), we may choose \(\delta _j\) sufficiently small in order to

$$\begin{aligned} \sum _{\Gamma (t_j) \in J_n} \int _{\Gamma ^j} \mathrm{e}^{-\psi }\mathrm{d}s < \frac{\varepsilon _n}{32 \max \limits _{\Gamma (t) \in \Gamma _n}|F(\Gamma (t))|^2}. \end{aligned}$$

Since g is continuous on \(\Gamma \), by the classical Carleman approximation theorem there exists an entire function A satisfying for each n

$$\begin{aligned} |g - A|^2 \le \frac{\varepsilon _n}{8 \max \limits _{\Gamma (t) \in \Gamma _n} |Q(\Gamma (t))| \cdot \max \limits _{\Gamma (t) \in \Gamma _n}|F(\Gamma (t))|^2 \cdot \int _{\Gamma _n} \mathrm{e}^{-\psi } \mathrm{d}s}, \ \ \ \forall \Gamma (t) \in \Gamma _n. \end{aligned}$$

Then by Cauchy-Schwarz and the previous estimate, for each n,

$$\begin{aligned}&\int _{\Gamma _n} \vert \sqrt{Q}\vert ^2\vert g-A\vert ^2 \mathrm{e}^{-\psi }\mathrm{d}s \\&\quad = \int _{\Gamma _n} \vert \sqrt{Q} \vert ^2 \vert g-A\vert ^2\mathrm{e}^{-\psi }\mathrm{d}s \\&\quad \le \left( \int _{\Gamma _n} \vert \sqrt{Q} \vert ^4 \vert g-A\vert ^2\mathrm{e}^{-\psi }\mathrm{d}s \right) ^{\frac{1}{2}} \cdot \left( \int _{\Gamma _n} \vert g-A\vert ^2\mathrm{e}^{-\psi }\mathrm{d}s \right) ^{\frac{1}{2}} \\&\quad \le \max _{\Gamma (t) \in \Gamma _n} |Q(\Gamma (t))| \cdot \int _{\Gamma _n}\vert g-A\vert ^2\mathrm{e}^{-\psi }\mathrm{d}s \\&\quad \le \frac{\varepsilon _n}{8\max \limits _{\Gamma (t) \in \Gamma _n}|F(\Gamma (t))|^2} . \end{aligned}$$

By taking \({\widetilde{H}} =A\), we get (5.4) and then (5.3). Hence there exist entire functions FQA so that for each n

$$\begin{aligned}&\int _{\Gamma _n} \vert f-F\cdot Q\cdot A\vert ^2 \mathrm{e}^{-\varphi }\mathrm{d}s \\&\quad \le 2 \int _{\Gamma _n} \vert f-F\sqrt{Q}\vert ^2 \mathrm{e}^{-\varphi }\mathrm{d}s + 2 \int _{\Gamma _n} \vert F\sqrt{Q} - F\cdot Q\cdot A\vert ^2 \mathrm{e}^{-\varphi }\mathrm{d}s \\&\quad \le \frac{\varepsilon _n}{2} + \frac{\varepsilon _n}{2} \\&\quad = \varepsilon _n. \end{aligned}$$

\(\square \)

6 Rectifiable Non-Lipschitz Arcs

Here we construct a rectifiable non-Lipschitz arc \(\gamma \) and a subharmonic function \(\varphi \) in a neighborhood of \(\gamma \) so that the conclusion of Theorem 1.1 does not hold. To find such an arc, we first look at the vertical arcs \(\gamma _a=\{(a,it),|t|\le a\}\). Let \(0<\alpha <1, z_0=0.\) We then notice that

$$\begin{aligned} |\gamma _a| = 2 a \sim a, \end{aligned}$$

and

$$\begin{aligned} \int _{\gamma _a}\frac{\mathrm{d}s}{|z-z_0|^\alpha }= & {} \int _{-a}^a \frac{1}{\left( \sqrt{a^2 + t^2}\right) ^\alpha }\mathrm{d}t. \end{aligned}$$

Since

$$\begin{aligned} \frac{2}{\sqrt{2}^\alpha } a^{1-\alpha } \le \int _{-a}^a \frac{1}{\left( \sqrt{a^2 + t^2}\right) ^\alpha }\mathrm{d}t \le 2a^{1-\alpha } \end{aligned}$$

we get that \(\int _{\gamma _a}\frac{\mathrm{d}s}{|z-z_0|^\alpha } \sim a^{1-\alpha }\) uniformly in \(\alpha .\)

Let \(b_n\in [0,1], n=1,2,3,\cdots , \) be a decreasing sequence which tends to 0. We will fix \(b_n\) later. We remark that by setting \(\varphi (z) = \sum \limits _{n=1}^\infty \alpha _n \log \left| \frac{z-b_n}{2} \right| \), where \(\alpha _n=\frac{1}{n^3}\) a rapidly then \(\varphi \) is subharmonic on \(\Delta (0,2-b_1)\): \(\varphi \) is the limit of the decreasing sequence \(\{ \varphi _k\}\) of subharmonic functions, \(\varphi _k = \sum \limits _{n=1} ^k \alpha _n \log \left| \frac{z-b_n}{2} \right| \). Now let’s build a rectifiable non-Lipschitz arc \(\gamma \) such that

  1. (1)

    \(| \gamma | < \infty \);

  2. (2)

    \(\int _{\gamma _n} \mathrm{e}^{-\varphi }\mathrm{d}s = \infty \).

Here \(\gamma _n\) is a curve with endpoints \((b_{n+1},0)\) and \((b_n,0)\) and \(\gamma \) consists of the union of the \(\gamma _n\) and the origin. Define \(c_n\) so that

$$\begin{aligned} c_n^{\frac{1}{1-\alpha _{n+1}}} = \frac{1}{n^2} \frac{\alpha _{n+1}}{1-\alpha _{n+1}} = \frac{1}{n^2 \left( (n+1)^3 -1 \right) }. \end{aligned}$$

We define \(\{b_n\}\) by the following conditions:

$$\begin{aligned} b_n - b_{n+1} = c_n^{\frac{1}{1-\alpha _{n+1}}} =\frac{1}{n^2 \left( (n+1)^3 -1 \right) } \end{aligned}$$

add the requirement that \(b_n \rightarrow 0.\) Then we have that

$$\begin{aligned} b_n = \sum \limits _{k\ge n}^\infty (b_k - b_{k+1}) = \sum \limits _{k\ge n}^\infty \frac{1}{k^2 \left( (k+1)^3 -1 \right) }. \end{aligned}$$

Now define \(b_n^k\in [ b_{n+1}, b_n]\) satisfying

$$\begin{aligned} b_n^k= & {} b_{n+1} + \left( \frac{c_n}{k}\right) ^{ \frac{1}{1-\alpha _{n+1}}} \nonumber \\= & {} b_{n+1} + \frac{1}{n^2 \left( (n+1)^3 -1 \right) } \left( \frac{1}{k}\right) ^{ \frac{1}{1-\alpha _{n+1}}} \end{aligned}$$
(6.1)

Then \(b_n^k\rightarrow b_{n+1}\) as \(k\rightarrow \infty \) and \(b_n^1=b_n.\) Finally, we define \(\gamma _n = \left( \cup _{k=1}^\infty \gamma _n^k \right) \cup T_n\cup S_n \), where

$$\begin{aligned} \gamma _n^k = : \{b_n^k + i y, 0 \le y \le b_n^k - b_{n+1} \}, \end{aligned}$$

\(T_n= \cup _{\ell =0}^\infty \{y_x-b_{n+1}, b_n^{2\ell +2}\le x\le b_n^{2\ell +1}\}\) and \(S_n=\cup _{\ell \ge 1}^\infty \{y=0, b_n^{2\ell +1}\le x\le b_n^{2\ell }\}\) which connect the \(\gamma _n^k\) making \(\gamma _n\) an arc. Then \(|\gamma _n^k| = (b_n^k-b_{n+1})\), \(|T_n| < \sqrt{2}(b_n-b_{n+1})=\sqrt{2}(b_n^1-b_{n+1})\) and \(|S_n|<b_n-b_{n+1}\). Then, we have

$$\begin{aligned} |\gamma |= & {} \sum \limits _{n=1}^\infty |\gamma _n| \\= & {} \sum \limits _{n=1}^\infty \sum \limits _{k=1}^\infty |\gamma _n^k| + \sum \limits _{n=1}^\infty |T_n| + \sum \limits _{n=1}^\infty |S_n| \\\le & {} \sum \limits _{n=1}^\infty \sum \limits _{k=1}^\infty (b_n^k-b_{n+1}) + \sum \limits _{n=1}^\infty (\sqrt{2} +1) (b_n^1-b_{n+1}) \\= & {} \sum \limits _{n=1}^\infty \sum \limits _{k=1}^\infty \frac{1}{n^2 \left( (n+1)^3 -1 \right) } \left( \frac{1}{k}\right) ^{ \frac{1}{1-\alpha _{n+1}}} + (\sqrt{2}+1) \sum \limits _{n=1}^\infty \frac{1}{n^2 \left( (n+1)^3 -1 \right) } \\ \end{aligned}$$

Since

$$\begin{aligned} \sum \limits _{k=1}^\infty \left( \frac{1}{k}\right) ^{ \frac{1}{1-\alpha _{n+1}}} \sim \int _1^\infty \left( \frac{1}{x}\right) ^{ \frac{(n+1)^3}{(n+1)^3-1}}\mathrm{d}x= (n+1)^3-1 \end{aligned}$$

we know that

$$\begin{aligned} |\gamma | \le C\sum \limits _{n=1}^\infty \frac{1}{n^2} + (\sqrt{2}+1) \sum \limits _{n=1}^\infty \frac{1}{n^2 \left( (n+1)^3 -1 \right) } <\infty . \end{aligned}$$
(6.2)

Thus \(\gamma \) is a rectifiable non-Lipschitz arc.

On the other hand, we have

$$\begin{aligned} \int _{\gamma _n} \mathrm{e}^{-\varphi }\mathrm{d}s\ge & {} \sum \limits _{k=1} ^ \infty \int _{\gamma _n^k} \mathrm{e}^{-\varphi }\mathrm{d}s \nonumber \\\ge & {} \sum \limits _{k=1} ^ \infty \int _{\gamma _n^k} \frac{1}{|z-b_{n+1}|^{\alpha _{n+1}}}\mathrm{d}s \nonumber \\\sim & {} \sum \limits _{k=1} ^ \infty (b_n^k - b_{n+1})^{1-\alpha _{n+1}} \nonumber \\\sim & {} \sum \limits _{k=1} ^ \infty \frac{c_n}{k} \ \ \ \ \ \text {by }(6.1) \nonumber \\\sim & {} \int _1^\infty \frac{c_n}{x} \mathrm{d}x \nonumber \\= & {} \infty , { \forall n}. \end{aligned}$$
(6.3)

Now we will prove that polynomials are not dense in \(L^2(\gamma , \varphi )\). By contradiction, for each \(f\in L^2(\gamma , \varphi )\), if there exists a sequence of polynomials \(P_N\) so that

$$\begin{aligned} \int _{\gamma } |f-P_N|\mathrm{e}^{-\varphi } \mathrm{d}s \rightarrow 0, \ \ \text {if} \ \ N\rightarrow \infty , \end{aligned}$$

then by (6.3) we have \(P_N(b_n) = 0\) for any n if N is sufficiently large. Since \(b_n \rightarrow 0\) by uniqueness property of holomorphic function we know \(P_N\equiv 0\). Thus \(\int _{\gamma }|f|^2\mathrm{e}^{-\varphi }\mathrm{d}s =0\). That is \(f =0\) a.e. on \(\gamma \). Thus \(L^2(\gamma , \varphi ) = \{0\}\). On the other hand \(f(z) := \mathrm{e}^{\frac{\varphi }{2}} =\sqrt{\Pi \left| \frac{z-b_n}{2} \right| ^{\alpha _n}} \in L^2(\gamma , \varphi )\). This is a contradiction.

Remark 6.1

In this example, there are no non-zero polynomials in \(L^2(\gamma , \varphi )\) and polynomials are not dense in \(L^2(\gamma , \varphi )\). The key to this example is that Theorem 2.12 does not hold for rectifiable non-Lipschitz arcs. However, we don’t know if there exists a rectifiable non-Lipschitz arc \(\gamma \) and a subharmonic function \(\varphi \) so that all the polynomials are in \(L^2(\gamma , \varphi )\) but not dense in it.