Text this: Semi-analytical method to study piecewise linear oscillators