Sia F(x,y) =(x^2+x*y+5*y^2+x-y)*exp(-(x^2+y^2)).  Studia la funzione utilizzando R per tracciarne il grafico e le curve di livello e operando opportuni zoom. Individuane, arrotondandone le coordinate a 2 cifre, i punti di estremo relativo e i punti di sella. Suggerimento: parti studiando la funzione per x in [−4,4] e y in [−4,4].

```F <- function(x,y) (x^2+x*y+5*y^2+x-y)*exp(-(x^2+y^2))
x1 <- -4; x2 <- 4; y1 <- -4; y2 <- 4
x <- seq(x1,x2,len=31); y <- seq(y1,y2,len=31); z <- outer(x,y,F)
##
x1 <- -3; x2 <- 3; y1 <- -3; y2 <- 3
x <- seq(x1,x2,len=31); y <- seq(y1,y2,len=31); z <- outer(x,y,F)
##
x1 <- -2.5; x2 <- 2.5; y1 <- -2.5; y2 <- 2.5
x <- seq(x1,x2,len=31); y <- seq(y1,y2,len=31); z <- outer(x,y,F)
#
dev.new()
contour(x,y,z); abline(v=axTicks(1),h=axTicks(2),lty=3,col="grey70")
#
x1 <- -1.8; x2 <- 1; y1 <- -1.5; y2 <- 1.5
x <- seq(x1,x2,len=31); y <- seq(y1,y2,len=31); z <- outer(x,y,F)
contour(x,y,z); abline(v=axTicks(1),h=axTicks(2),lty=3,col="grey70")
#
dev.new()
x1 <- 0.1; x2 <- 0.4; y1 <- 0.8; y2 <- 1.2
x <- seq(x1,x2,len=31); y <- seq(y1,y2,len=31); z <- outer(x,y,F)
contour(x,y,z); abline(v=axTicks(1),h=axTicks(2),lty=3,col="grey70")
#
x1 <- 0.26; x2 <- 0.29; y1 <- 0.96; y2 <- 1.04
x <- seq(x1,x2,len=31); y <- seq(y1,y2,len=31); z <- outer(x,y,F)
contour(x,y,z); abline(v=axTicks(1),h=axTicks(2),lty=3,col="grey70")
#
dev.new()
x1 <- -0.6; x2 <- 0; y1 <- 0; y2 <- 0.3
x <- seq(x1,x2,len=31); y <- seq(y1,y2,len=31); z <- outer(x,y,F)
contour(x,y,z); abline(v=axTicks(1),h=axTicks(2),lty=3,col="grey70")
#
x1 <- -0.45; x2 <- -0.4; y1 <- 0.12; y2 <- 0.15
x <- seq(x1,x2,len=31); y <- seq(y1,y2,len=31); z <- outer(x,y,F)
contour(x,y,z); abline(v=axTicks(1),h=axTicks(2),lty=3,col="grey70")
#
dev.new()
x1 <- -0.1; x2 <- 0.1; y1 <- -1; y2 <- -0.9
x <- seq(x1,x2,len=31); y <- seq(y1,y2,len=31); z <- outer(x,y,F)
contour(x,y,z); abline(v=axTicks(1),h=axTicks(2),lty=3,col="grey70")
#
x1 <- -0.04; x2 <- 0.04; y1 <- -0.98; y2 <- -0.94
x <- seq(x1,x2,len=31); y <- seq(y1,y2,len=31); z <- outer(x,y,F)
contour(x,y,z); abline(v=axTicks(1),h=axTicks(2),lty=3,col="grey70")
#
x1 <- -0.005; x2 <- 0.01; y1 <- -0.96; y2 <- -0.95
x <- seq(x1,x2,len=31); y <- seq(y1,y2,len=31); z <- outer(x,y,F)
contour(x,y,z); abline(v=axTicks(1),h=axTicks(2),lty=3,col="grey70")
#
x1 <- 0.004; x2 <- 0.0056; y1 <- -0.957; y2 <- -0.954
x <- seq(x1,x2,len=31); y <- seq(y1,y2,len=31); z <- outer(x,y,F)
contour(x,y,z); abline(v=axTicks(1),h=axTicks(2),lty=3,col="grey70")
#
dev.new()
x1 <- 0.6; x2 <- 1; y1 <- -0.2; y2 <- 0.2
x <- seq(x1,x2,len=31); y <- seq(y1,y2,len=31); z <- outer(x,y,F)
contour(x,y,z); abline(v=axTicks(1),h=axTicks(2),lty=3,col="grey70")
#
x1 <- 0.84; x2 <- 0.88; y1 <- -0.04; y2 <- 0.08
x <- seq(x1,x2,len=31); y <- seq(y1,y2,len=31); z <- outer(x,y,F)
contour(x,y,z); abline(v=axTicks(1),h=axTicks(2),lty=3,col="grey70")
#
x1 <- 0.85; x2 <- 0.87; y1 <- 0.01; y2 <- 0.03
x <- seq(x1,x2,len=31); y <- seq(y1,y2,len=31); z <- outer(x,y,F)
contour(x,y,z); abline(v=axTicks(1),h=axTicks(2),lty=3,col="grey70")
#
dev.new()
x1 <- -2; x2 <- -1; y1 <- -1; y2 <- 1
x <- seq(x1,x2,len=31); y <- seq(y1,y2,len=31); z <- outer(x,y,F)
contour(x,y,z); abline(v=axTicks(1),h=axTicks(2),lty=3,col="grey70")
#
x1 <- -2; x2 <- -1.2; y1 <- 0; y2 <- 0.5
x <- seq(x1,x2,len=31); y <- seq(y1,y2,len=31); z <- outer(x,y,F)
contour(x,y,z); abline(v=axTicks(1),h=axTicks(2),lty=3,col="grey70")
#
x1 <- -1.7; x2 <- -1.5; y1 <- 0.25; y2 <- 0.35
x <- seq(x1,x2,len=31); y <- seq(y1,y2,len=31); z <- outer(x,y,F)
contour(x,y,z); abline(v=axTicks(1),h=axTicks(2),lty=3,col="grey70")
```