We will study the level curve, \(c = x^2 - y^2\) \(f(x,y) = x^2 - y^2\); \(c = -1,0,1\)
Let’s take the case \(c = 0\),
\(f(x,y) = x^2 - y^2 = c = 0\)
factors to , \((x-y)(x+y) = 0\)
This equation satisfies either \(x = y\) or \(y = -x\). Both are lines.
So the level curve for \(c = 0\) is two lines.
The case where \(c = 1\) and \(c = -1\),
\(f(x,y) = x^2 - y^2 = c = 1\)
If \(c=−1\), the equation is \(y^2−x^2=1\).
If c is positive, the hyperbolas open to the left and right. If c is negative, the hyperbolas open up and down.
library(ggplot2)
x <- seq(-5,5,0.05)
y <- seq(-5, 5,0.05)
xy <- data.frame(expand.grid(x=x, y=y))
z <- xy$x^2-xy$y^2
f <- data.frame(xy, z)
ggplot(f, aes(x, y, z=z))+
geom_raster(aes(fill=z))+
geom_contour(breaks=c(-2,0,2), colour="black")+
xlab("x")+ylab("y")