Unveiling Mechanisms For Electrical Activity Patterns In Neurons And Pituitary Cells Using Mathematical Modeling And Analysis