Ah, Calculus teachers love using piecewise functions!  They stay home Saturday nights dreaming up new ones...  just for you!

If you've loathed them before, no fear.  I've got a simple way to keep all the pieces straight.

Let's just dive in and do one:

Graph y = ( x + 2 ; x < 1  ...  ( x - 1 )^2 ; x is greater than or equal to 1  ...  It's in two pieces!

Each piece must live ONLY in its own neighborhood.

Let's put up a fence, so we don't make any mistakes:
 

the fence is vertical at x = 1  ...  1 : y = x + 2 lives on the left side of the fence  ...  2 : ( x - 1 )^2 lives on the right side of the fence
 

Now, we just need to figure out who the fence owner is...

y = ( x + 2 ; x < 1  ...  ( x - 1 )^2 ; x is greater than or equal to 1 )  ...  This second guy has the "=", so he gets to live ON the fence

Let's graph part1 ):

y = x + 2  ...  He does not get to sit on the fence... and he can't be in the neighborhood on the right side of the fence