#==================== # Figure 8.5.R. # Four quadratic equations. #==================== xhi=2 xlo=-1 x=xlo+(xhi-xlo)*(0:1000)/1000 layout(matrix(c(1,2,3,4),2,2)) y=x^2-x-1 plot(x,y,type="l",ylim=c(-2,2),lwd=2) text(-.75,1.75,"a") y2=numeric(length(x)) points(x,y2,type="l",lty="dashed") y=-x^2+x+1 plot(x,y,type="l",ylim=c(-2,2),lwd=2) text(-.75,1.75,"c") points(x,y2,type="l",lty="dashed") y=x^2-x+1 plot(x,y,type="l",ylim=c(-2,2),lwd=2) text(-.75,1.75,"b") points(x,y2,type="l",lty="dashed") y=-x^2+x-1 plot(x,y,type="l",ylim=c(-2,2),lwd=2) text(-.75,1.75,"d") points(x,y2,type="l",lty="dashed")