In this paper, a nonhomogeneous elliptic equation of the form $$\begin{aligned}& - \mathcal{A}\bigl(x, \vert u \vert _{L^{r(x)}}\bigr) \operatorname{div}\bigl(a\bigl( \vert \nabla u \vert ^{p(x)}\bigr) \vert \nabla u \vert ^{p(x)-2} \nabla u\bigr) \\& \quad =f(x, u) \vert \nabla u \vert ^{\alpha (x)}_{L^{q(x)}}+g(x, u) \vert \nabla u \vert ^{ \gamma (x)}_{L^{s(x)}} \end{aligned}$$
−
A
(
x
,
|
u
|
L
r
(
x
)
)
div
(
a
(
|
∇
u
|
p
(
x
)
)
|
∇
u
|
p
(
x
)
−
2
∇
u
)
=
f
(
x
,
u
)
|
∇
u
|
L
q
(
x
)
α
(
x
)
+
g
(
x
,
u
)
|
∇
u
|
L
s
(
x
)
γ
(
x
)
on a bounded domain Ω in ${\mathbb{R}}^{N}$
R
N
($N >1$
N
>
1
) with $C^{2}$
C
2
boundary, with a Dirichlet boundary condition is considered. Using the sub-supersolution method, the existence of at least one positive weak solution is proved. As an application, the existence of at least one solution of a generalized version of the logistic equation and a sublinear equation are shown.