The function,
$f(x)=x^2-x-2$
gives me the below graph

But, in a text book for the same equation, they have given different graph. Which one is correct?
Text book graph - (i tried with ms paint, could not get perfectly the curve)...the points are as below,

Curve: $(-2,4),(-1,1),(0,0),(1,1),(2,4)$ Line: $(0,2),(1,3),(-1,1),(2,4),(-2,0)$

No they both are different graphs.
First with parabola y = $\left(x - \frac12 \right)^2 - \frac94$
Second graph with parabola y = $x^2$
and line y = x + 2.