Electromechanical modeling and analytical investigation of nonlinearities in energy harvesting piezoelectric beams