This paper is oriented to an elementary introduction to function spaces with variable exponents and a survey of related function spaces. After providing basic and elementary properties of generalized Lebesgue spaces $L^{p(\cdot)}(\mathbb{R}^n)$ with variable exponents, we give rearranged proofs of the theorems by Diening (2004), Cruz-Uribe, Fiorenza and Neugebauer (2003, 2004), Nekvinda (2004) and Lerner (2005). They are maybe simpler than the originals. Moreover, we deal with topics related to $L^{p(\cdot)}(\mathbb{R}^n)$. For example, we present an alternative proof for Lerner's theorem on the modular inequality and a detailed proof of the density in Sobolev spaces with variable exponents. Furthermore, we will describe the recent results of fractional integral operators and Calder$\acute{o}$n-Zygmund operators on $L^{p(\cdot)}(\mathbb{R}^n)$. Finally, we survey recent results (without proofs) on several function spaces with variable exponents, for example, generalized Morrey and Campanato spaces with variable growth condition, Hardy spaces $H^{p(\cdot)}(\mathbb{R}^n)$, Besov spaces $B^{s(\cdot)}_{{p(\cdot)},{q(\cdot)}}(\mathbb{R}^n)$ and Triebel-Lizorkin spaces $F^{s(\cdot)}_{{p(\cdot)},{q(\cdot)}}(\mathbb{R}^n)$, etc.
back