Text this: Analysis of an optimization problem for a piezoelectric energy harvester.