
evaluate f(-2), f(2), and the limits at x = -2 and x = 2 including both left-hand and right-hand limits.
First, we enter the function and then plot the graph:
> f:= x -> piecewise(x<=-2, -3-x, -2<x and x<=2, 2*x, x>2, x^2-4*x+3);

> plot(f(x),x=-4..4,discont=true);

We now let Maple do all of the calculations:
> f(-2);