Functional equations and characterization problems