I have trouble grasping the concept of "continuity". I understand it when the teacher explains it to me but when faced with problems I don't seem to be able to do them. Will someone help me with this?
Loosely, a continuous function is one that has no "holes" (i.e., the function is undefined at a point), no "jumps" (i.e., the limit as x approaches a value c from the left is different from the limit as x approaches the same value c from the right), and no vertical asymptotes.
If you say that a function is continuous on an interval, then it has all of these properties on that interval. However, if the interval is open, then the function may have a vertical asymptote at one of the open endpoints and it will still be continuous.
The function is defined piecewise. At the x-values of 0 and 1, the limit of f(x) from the left must be the same as the limit of f(x) from the right.
In terms of your question, this means that
$\displaystyle -x^2 + 2 = ax + b$ when $\displaystyle x = 0$ and
$\displaystyle ax + b = (x-1)^2$ when $\displaystyle x = 1$.
Thus,
$\displaystyle -0^2 + 2 = a(0) + b$
$\displaystyle b = 2$
$\displaystyle a(1) + 2 = (1-1)^2$
$\displaystyle a + 2 = 0$
$\displaystyle a = -2$