Exemple 1¶

$$f : (x, y) \longmapsto x^2 + y^2$$
In [1]:
x, y, z = var("x y z")
S = plot3d(x^2+y^2, (x, -2, 2), (y, -2, 2))
show(S, aspect_ratio=1)
In [2]:
x, y, z = var("x y z")
S = contour_plot(x^2+y^2, (x, -3, 3), (y, -3, 3), labels=True, label_colors='green', colorbar=True, contours=12, cmap="hot")
show(S)
In [3]:
x, y, z = var("x y z")
R = plot_vector_field((2*x, 2*y), (x, -3, 3), (y, -3, 3), color="red")
show(R)
In [4]:
x, y, z = var("x y z")
S = contour_plot(x^2+y^2, (x, -3, 3), (y, -3, 3), labels=True, fill=False, contours=6)
R = plot_vector_field((2*x, 2*y), (x, -3, 3), (y, -3, 3), color="red")
show(S+R)

Exemple 2¶

$$f : (x, y) \longmapsto \sqrt{x^2 + y^2}$$
In [5]:
x, y, z = var("x y z")
S = plot3d(sqrt(x^2+y^2), (x, -2, 2), (y, -2, 2), plot_points=100)
show(S, aspect_ratio=1)
In [6]:
x, y, z = var("x y z")
S = contour_plot(sqrt(x^2+y^2), (x, -3, 3), (y, -3, 3), labels=True, label_colors='green', colorbar=True, contours=12, cmap="hot")
show(S)
In [7]:
x, y, z = var("x y z")
R = plot_vector_field((x/sqrt(x^2+y^2), y/sqrt(x^2+y^2)), (x, -3, 3), (y, -3, 3), color="red")
show(R)
In [8]:
x, y, z = var("x y z")
S = contour_plot(sqrt(x^2+y^2), (x, -3,3), (y, -3, 3), labels=True, fill=False, contours=6)
R = plot_vector_field((x/sqrt(x^2+y^2), y/sqrt(x^2+y^2)), (x, -3, 3), (y, -3, 3), color="red")
show(S+R)

Exemple 3¶

$$f : (x, y) \longmapsto x + 2y$$
In [9]:
x, y, z = var("x y z")
S = plot3d(x+2*y, (x, -2, 2), (y, -2, 2))
show(S, aspect_ratio=1)
In [10]:
x, y, z = var("x y z")
S = contour_plot(x+2*y, (x, -2, 2), (y, -2, 2), labels=True, label_colors='green', colorbar=True, contours=12, cmap="hot")
show(S)
In [11]:
x, y, z = var("x y z")
R = plot_vector_field((1, 2), (x, -2, 2), (y, -2, 2), color="red")
show(R)
In [12]:
x, y, z = var("x y z")
S = contour_plot(x+2*y, (x, -2, 2), (y, -2, 2), labels=True, fill=False, contours=6)
R = plot_vector_field((1, 2), (x, -2, 2), (y, -2, 2), color="red")
show(S+R)

Exemple 4¶

$$f : (x, y) \longmapsto x^2 - y^2$$
In [13]:
x, y, z = var("x y z")
S = plot3d(x^2-y^2, (x, -2, 2), (y, -2, 2))
show(S, aspect_ratio=1)
In [14]:
x, y, z = var("x y z")
S = contour_plot(x^2-y^2, (x, -3, 3), (y, -3, 3), labels=True, label_colors='yellow', colorbar=True, contours=12, cmap="seismic")
show(S)
In [15]:
x, y, z = var("x y z")
R = plot_vector_field((2*x, -2*y), (x, -3, 3), (y, -3, 3), color="red")
show(R)
In [16]:
x, y, z = var("x y z")
S = contour_plot(x^2-y^2, (x, -3, 3), (y, -3, 3), labels=True, fill=False, contours=6)
R = plot_vector_field((2*x, -2*y), (x, -3, 3), (y, -3, 3), color="red")
show(S+R)

Exemple 5¶

$$f: (x, y) \longmapsto \arctan\left(\frac{y}{x}\right)$$
In [17]:
x, y, z = var("x y z")
S = plot3d(arctan(y/x), (x, -3, 3), (y, -3, 3))
show(S, aspect_ratio=1)
In [18]:
r, t = var("r t")
S = parametric_plot3d((min_symbolic(max_symbolic(r*cos(t), -3), 3), min_symbolic(max_symbolic(r*sin(t), -3), 3), t), (r, -3*sqrt(2), 3*sqrt(2)), (t, 0, 3*pi), plot_points=200)
show(S, aspect_ratio=1)
In [19]:
x, y, z = var("x y z")
S = contour_plot(arctan(y/x), (x, -3, 3), (y, -3, 3), labels=True, label_colors='yellow', colorbar=True, contours=12, cmap="seismic")
show(S)
In [20]:
x, y, z = var("x y z")
R = plot_vector_field((-y/(x^2+y^2), x/(x^2+y^2)), (x, -3, 3), (y, -3, 3), color="red", plot_points=25)
show(R)
In [21]:
x, y, z = var("x y z")
S = contour_plot(arctan(y/x), (x, -3, 3), (y, -3, 3), labels=True, fill=False, contours=6)
R = plot_vector_field((-y/(x^2+y^2), x/(x^2+y^2)), (x, -3, 3), (y, -3, 3), color="red", plot_points=25)
show(S+R)