Example of a Piecewise Function - Search