Theoretical Formulations for Finite Element Models of Functionally Graded Beams with Piezoelectric Layers