clearly each piece of the function is continuous when . to show that is continuous then, we need only prove that (this si by the definition of continuity at a point).

for (i) use the squeeze theorem to show this. that part shouldn't be that hard.

for (ii) apply the definition of the limit. do you know what it is?