There have been numerous studies on Hardy’s inequality on a bounded domain, which holds for functions vanishing on the boundary. On the other hand, the classical Legendre differential equation defined in an interval can be regarded as a Neumann version of the Hardy inequality with subcritical weight functions. In this paper we study a Neumann version of the Hardy inequality on a bounded
C
2
C^2
-domain in
R
n
\mathbb {R}^n
of the following form
∫
Ω
d
β
(
x
)
|
∇
u
(
x
)
|
2
d
x
≥
C
(
α
,
β
)
∫
Ω
|
u
(
x
)
|
2
d
α
(
x
)
d
x
with
∫
Ω
u
(
x
)
d
α
(
x
)
d
x
=
0
,
\begin{equation*} \int _\Omega d^{\beta }(x) |\nabla u(x) |^2 dx \ge C(\alpha ,\beta ) \int _\Omega \frac {|u(x)|^2}{d^{\alpha }(x)} dx \quad \text { with }\quad \int _\Omega \frac {u(x)}{d^{\alpha }(x)} dx=0, \end{equation*}
where
d
(
x
)
d(x)
is the distance from
x
∈
Ω
x \in \Omega
to the boundary
∂
Ω
\partial \Omega
and
α
,
β
∈
R
\alpha ,\beta \in \mathbb {R}
. We classify all
(
α
,
β
)
∈
R
2
(\alpha ,\beta ) \in \mathbb {R}^2
for which
C
(
α
,
β
)
>
0
C(\alpha ,\beta ) > 0
. Then, we study whether an optimal constant
C
(
α
,
β
)
C(\alpha ,\beta )
is attained or not. Our study on
C
(
α
,
β
)
C(\alpha ,\beta )
for general
(
α
,
β
)
∈
R
2
(\alpha ,\beta ) \in \mathbb {R}^2
shows that the (classical) Hardy inequality can be regarded as a special case of the Neumann version.