Covering mappings and their applications in functional equations, difference equations and optimization