note: affine variety
If you ever see a plot with left and right hand limits on three oblique asymptotes (an algebra-geometric "pencil"), that has to be the positive and negative level curves.
The algebraic variety defined by $y(5x-y)(2x-y)(-3x-y) = 0$ consists of four lines through the origin: $y=0$, $y=5x$, $y=2x$, and $y=-3x$.
The level curves $y(5x-y)(2x-y)(-3x-y) = \pm 1$ are affine quartic curves that asymptotically approach this line arrangement. Each level curve is a deformation of the union of four lines, where the constant term $\pm 1$ prevents the curve from actually containing the lines, creating instead hyperbolic branches that approach each line as asymptotes.
The pencil is generated by the homogeneous quartic form $y(5x-y)(2x-y)(-3x-y)$, and the level curves are members of the affine linear system $V(f) \setminus V(f_{h})$.
The homogeneous part $f_{h}$ is the degree-4 part $y(5x-y)(2x-y)(-3x-y)$.
$V(f)$ is the affine variety defined by $f(x,y) = c$ (the level curve).
$V(f_{h})$ is the projective variety of the asymptotes (the lines through origin).
Thus $V(f) \setminus V(f_{h})$ describes removing the asymptotic directions at infinity, showing how the affine curve approaches but doesn't contain the lines of the algebraic pencil.
import numpy as np
import matplotlib.pyplot as plt
# cartesian showing multiple level curves
x = np.linspace(-5, 5, 400)
y = np.linspace(-5, 5, 400)
X, Y = np.meshgrid(x, y)
# define the algebraic pencil function
Z = Y * (5*X - Y) * (2*X - Y) * (-3*X - Y)
plt.figure(figsize=(12, 10))
levels = [-1,1]
contour = plt.contour(X, Y, Z, levels=levels, colors=['green'])
plt.clabel(contour, inline=True, fontsize=8)
# asymptotes
plt.axhline(0, color='k', linestyle='--', alpha=0.5)
plt.axvline(0, color='k', linestyle='--', alpha=0.5)
x_line = np.linspace(-5, 5, 100)
plt.plot(x_line, 5*x_line, 'k--', alpha=0.5)
plt.plot(x_line, 2*x_line, 'k--', alpha=0.5)
plt.plot(x_line, -3*x_line, 'k--', alpha=0.5)
plt.xlim(-5, 5)
plt.ylim(-5, 5)
plt.gca().set_aspect('equal')
plt.title('Level curves of y(5x-y)(2x-y)(-3x-y) = ±1')
plt.grid(True, alpha=0.3)
plt.show()
- ← Previous
note: debit spread alpha - Next →
note: manova