Source
-2.5 4 setxrange
-3 3.5 setyrange

1.9 setxyrapport
60 setxunit
7.5 setborder
90 setangle_repere
-2 3.5 setxrange
-3 3.5 setyrange

traceaxes
axesarrow
setTimesItalic
%(x) 3.4 0 [1.8 dup] drtext
%(y) 0 3 [1.8 dup] ultext
%(O) O [1.8 dup] urtext

%unites
/f {setxvar
#rpn#   (x^2-x-2)
} def

/g {setxvar
#rpn#   0
} def


4.2 setlinewidth
[-1 0 2 0] ligne

gsave
   noir
   0.5 setlinewidth
   continu
-1.5  2.5 {f} Courbe
grestore

noir
/hwidth .2 def
/hstep 8 def
-1 2 {f} {g} Hachcourbes

<latex>
$a>0$
</latex>
1.5 2 [1.8 dup] dltexlabel

<latex>
$x_1$
</latex>
-1 0 [1.8 dup] dltexlabel

<latex>
$x_2$
</latex>
2 0 [1.8 dup] drtexlabel