We are interested in the existence versus non-existence of non-trivial stable sub- and super-solutions of
−
div
(
ω
1
∇
u
)
=
ω
2
f
(
u
)
in
R
N
,
\begin{equation} -\operatorname {div}( \omega _1 \nabla u) = \omega _2 f(u) \qquad \text {in}\ \ \mathbb {R}^N, \end{equation}
with positive smooth weights
ω
1
(
x
)
,
ω
2
(
x
)
\omega _1(x),\omega _2(x)
. We consider the cases
f
(
u
)
=
e
u
,
u
p
f(u) = e^u, u^p
where
p
>
1
p>1
and
−
u
−
p
-u^{-p}
where
p
>
0
p>0
. We obtain various non-existence results which depend on the dimension
N
N
and also on
p
p
and the behaviour of
ω
1
,
ω
2
\omega _1,\omega _2
near infinity. Also the monotonicity of
ω
1
\omega _1
is involved in some results. Our methods here are the methods developed by Farina. We examine a specific class of weights
ω
1
(
x
)
=
(
|
x
|
2
+
1
)
α
2
\omega _1(x) = ( |x|^2 +1)^\frac {\alpha }{2}
and
ω
2
(
x
)
=
(
|
x
|
2
+
1
)
β
2
g
(
x
)
\omega _2(x) = ( |x|^2+1)^\frac { \beta }{2} g(x)
, where
g
(
x
)
g(x)
is a positive function with a finite limit at
∞
\infty
. For this class of weights, non-existence results are optimal. To show the optimality we use various generalized Hardy inequalities.