Mathematical Analysis of the Photoelectric Effect