Salta al contenuto
Note per Studenti Functions of Several Variables and Level Sets Report

Functions of Several Variables and Level Sets

In questa pagina 4

Many quantities depend on more than one number: the temperature in a room depends on the three coordinates of the point, the area of a rectangle on base and height (A(b,h)=bhA(b, h) = bh). We therefore need functions whose input is a vector. This note builds on Topology of Euclidean SpacesIn R^n the distance between two points is the Euclidean norm of their difference; open balls let us classify the points relative to a set (interior, exterior, boundary, accumulation, isolated) and define open, closed, bounded, compact (closed and bounded) and path-connected sets.Topology of Euclidean Spaces →.

Definition. A real function of nn real variables is a rule f:D⊆Rn→Rf: D \subseteq \mathbb{R}^n \to \mathbb{R} assigning to each point X=(x1,…,xn)∈DX = (x_1, \dots, x_n) \in D a unique real number f(X)f(X).

Example. f(x,y)=1−x2−y2f(x,y) = \sqrt{1 - x^2 - y^2} is a function of n=2n = 2 variables, defined on the disc x2+y2≤1x^2 + y^2 \le 1, with f(0,0)=1f(0,0) = 1.

Compared with the one-variable case only the input changes: the output is still a number. Functions with vector output are treated in Jacobian Matrix and the Chain RuleFor F from R^n to R^m, F = (f1, ..., fm), the Jacobian matrix J_F is the m x n matrix with entries d f_i / d x_j: row i is the gradient of f_i. Chain rule: J_(f∘g)(x) = J_f(g(x)) · J_g(x); frequent cases are d/dt f(gamma(t)) = grad f · gamma'(t) and f_x = f_u u_x + f_v v_x. If det J_F(x0) is nonzero, F is invertible near x0 and J_(F^-1) = (J_F)^-1. Polar coordinates: det J = rho.Jacobian Matrix and the Chain Rule →.

Natural domain

Definition. The natural domain of ff is the set of points X∈RnX \in \mathbb{R}^n at which the expression of ff makes sense.

The conditions are the same as in one variable: denominators ≠0\neq 0, arguments of logarithms >0> 0, radicands of even-index roots ≥0\geq 0. The difference is that the solution is not an interval but a region of the plane (or of space), which is best drawn.

Example 1. f(x,y)=1−x2−y2f(x, y) = \sqrt{1 - x^2 - y^2}. We require 1−x2−y2≥01 - x^2 - y^2 \geq 0, i.e. x2+y2≤1x^2 + y^2 \leq 1: the closed disc with centre the origin and radius 11, circle included (because ≥\ge and not >>).

Example 2. f(x,y)=(1−x2)(1−y2)f(x, y) = \sqrt{(1 - x^2)(1 - y^2)}. The product is ≥0\geq 0 when the two factors have the same sign (or one is zero):

  • 1−x2≥01 - x^2 \geq 0 and 1−y2≥01 - y^2 \geq 0, i.e. ∣x∣≤1|x| \leq 1 and ∣y∣≤1|y| \leq 1: the square [−1,1]×[−1,1][-1, 1] \times [-1, 1];
  • 1−x2≤01 - x^2 \leq 0 and 1−y2≤01 - y^2 \leq 0, i.e. ∣x∣≥1|x| \geq 1 and ∣y∣≥1|y| \geq 1: the four "corner" regions outside the square, for instance x≥1, y≥1x \ge 1,\ y \ge 1.

The domain is the union of the two parts. Strips such as {∣x∣<1, ∣y∣>1}\{|x| < 1,\ |y| > 1\} are excluded, because there one factor is positive and the other negative.

Grafico interattivo: Domain of √((1 − x²)(1 − y²)): the square [−1, 1]² and the four corner regions |x| ≥ 1, |y| ≥ 1; the strips with |x| < 1 and |y| > 1 (or vice versa) are excluded

Example 3. f(x,y)=log⁡(y−x2)x−1f(x, y) = \dfrac{\log(y - x^2)}{x - 1}. We need y−x2>0y - x^2 > 0 (argument of the logarithm) and x≠1x \neq 1 (denominator). The domain is the region strictly above the parabola y=x2y = x^2, with the points of the vertical line x=1x = 1 removed. The parabola itself is excluded.

Grafico interattivo: Domain of log(y − x²)/(x − 1): the region strictly above the parabola y = x², without the points of the line x = 1 (dashed)

Graph

Definition. The graph of f:D⊆Rn→Rf: D \subseteq \mathbb{R}^n \to \mathbb{R} is the set Gf={(X,f(X)):X∈D}⊆Rn+1G_f = \{(X, f(X)) : X \in D\} \subseteq \mathbb{R}^{n+1}

Example. The graph of f(x,y)=x2+y2f(x,y) = x^2 + y^2 is the paraboloid z=x2+y2z = x^2 + y^2 in R3\mathbb{R}^3; it contains the point (1,1,2)(1, 1, 2).

For n=2n = 2 we set z=f(x,y)z = f(x, y): above each point (x,y)(x, y) of the domain we raise the point at height f(x,y)f(x, y), obtaining a surface in space. For n≥3n \geq 3 the graph lies in R4\mathbb{R}^4 or beyond and cannot be drawn.

Surfaces to recognize:

  • Plane: z=ax+by+cz = ax + by + c.
  • Paraboloid: z=x2+y2z = x^2 + y^2, a "bowl" with vertex at the origin.
  • Cone: z=x2+y2z = \sqrt{x^2 + y^2}: the height is the distance from the origin, hence it grows linearly.
  • Hemisphere: z=R2−x2−y2z = \sqrt{R^2 - x^2 - y^2}; squaring gives x2+y2+z2=R2x^2 + y^2 + z^2 = R^2 with z≥0z \geq 0, the upper half of the sphere of radius RR.
  • Saddle: z=x2−y2z = x^2 - y^2.

One way to understand the shape is to look at restrictions to lines, i.e. to fix one variable. For the saddle, on the xx axis (y=0y = 0) we get z=x2z = x^2, an upward parabola; on the yy axis (x=0x = 0) we get z=−y2z = -y^2, a downward parabola. At the origin the surface rises in one direction and falls in the other, like a horse saddle.

Grafico interattivo: Saddle z = x² − y²: restriction to the x axis, z = x² (minimum at 0)

Grafico interattivo: Saddle z = x² − y²: restriction to the y axis, z = −y² (maximum at 0)

Level sets

Drawing a surface is hard; maps solve the problem with contour lines, the lines joining points at the same height.

Definition. The level set at level cc of ff is Lc={X∈D:f(X)=c}L_c = \{X \in D : f(X) = c\} For n=2n = 2 it is called a level curve: it is the projection on the xyxy plane of the intersection of the graph with the horizontal plane z=cz = c. For n=3n = 3 it is in general a surface.

Example. For f(x,y)=x2+y2f(x,y) = x^2 + y^2 the level set LcL_c is the circle of radius c\sqrt{c} if c>0c > 0, the single point (0,0)(0,0) if c=0c = 0, the empty set if c<0c < 0.

How to find them: write the equation f(x,y)=cf(x, y) = c and recognize the curve as cc varies.

  • Paraboloid f(x,y)=x2+y2f(x, y) = x^2 + y^2:

    • c>0c > 0: x2+y2=cx^2 + y^2 = c, circles with centre the origin and radius c\sqrt{c};
    • c=0c = 0: the single point (0,0)(0, 0);
    • c<0c < 0: empty set (a sum of squares is not negative).

    The circles widen like c\sqrt c: going from c=1c = 1 to c=4c = 4 the radius goes from 11 to 22. The denser the level curves, the steeper the surface.

  • Cone f(x,y)=x2+y2f(x, y) = \sqrt{x^2 + y^2}: for c>0c > 0 circles of radius cc, equally spaced (constant slope).

  • Saddle f(x,y)=x2−y2f(x, y) = x^2 - y^2: for c≠0c \neq 0 the curves x2−y2=cx^2 - y^2 = c are hyperbolas (with branches along the xx axis if c>0c > 0, along the yy axis if c<0c < 0); for c=0c = 0, x2=y2x^2 = y^2 gives the two lines y=xy = x and y=−xy = -x.

  • Plane f(x,y)=2x+yf(x, y) = 2x + y: the curves 2x+y=c2x + y = c are parallel lines y=−2x+cy = -2x + c.

Grafico interattivo: Level curves of the paraboloid f = x² + y²: circles of radius √c; the levels c = 1, 4, 9 have radius 1, 2, 3 and the curves spread out away from the centre

Grafico interattivo: Level curves of the saddle f = x² − y²: hyperbolas x² − y² = c with branches along the x axis for c > 0 (c = 1, 4) and along the y axis for c < 0 (c = −1, −4); for c = 0 the lines y = ±x

Common mistakes

  • Forgetting the boundary or including it wrongly: with ≥\geq (roots) the boundary belongs to the domain, with >> (logarithms) it does not.
  • Confusing domain and range: the domain is a region of the xyxy plane; the values z=f(x,y)z = f(x, y) are the range.
  • Empty level curves: not every level cc is attained; for x2+y2x^2 + y^2 the negative ones give the empty set.
  • Reading a level curve as a graph: the circle x2+y2=1x^2 + y^2 = 1 is not a "piece" of surface, it is the set of points of the plane where the function equals 11.

Versione ripasso

Definition. A real function of nn variables is f:D⊆Rn→Rf: D \subseteq \mathbb{R}^n \to \mathbb{R}, assigning to each X=(x1,…,xn)∈DX = (x_1,\dots,x_n) \in D a unique number f(X)f(X). Example: f(x,y)=1−x2−y2f(x,y) = \sqrt{1-x^2-y^2} has f(0,0)=1f(0,0) = 1.

Natural domain. Denominators ≠0\neq 0, arguments of logarithms >0> 0, radicands of even roots ≥0\ge 0. The result is a region of the plane.

  • 1−x2−y2\sqrt{1-x^2-y^2}: closed disc x2+y2≤1x^2+y^2 \le 1 (the circle is included because the radicand is ≥0\ge 0).
  • (1−x2)(1−y2)\sqrt{(1-x^2)(1-y^2)}: the square [−1,1]2[-1,1]^2 plus the four corner regions with ∣x∣≥1|x| \ge 1 and ∣y∣≥1|y| \ge 1. The strips where one factor is positive and the other negative are excluded.
  • log⁡(y−x2)x−1\frac{\log(y-x^2)}{x-1}: the region strictly above the parabola y=x2y = x^2 (parabola excluded), minus the points of the line x=1x = 1.

Graph. Gf={(X,f(X)):X∈D}⊆Rn+1G_f = \{(X, f(X)) : X \in D\} \subseteq \mathbb{R}^{n+1}. For n=2n = 2 it is the surface z=f(x,y)z = f(x,y). Surfaces to recognize:

  • plane z=ax+by+cz = ax+by+c;
  • paraboloid z=x2+y2z = x^2+y^2;
  • cone z=x2+y2z = \sqrt{x^2+y^2};
  • hemisphere z=R2−x2−y2z = \sqrt{R^2-x^2-y^2}, the upper half of the sphere;
  • saddle z=x2−y2z = x^2-y^2: on the xx axis it is z=x2z = x^2, on the yy axis z=−y2z = -y^2.

Level set. Lc={X∈D:f(X)=c}L_c = \{X \in D : f(X) = c\}; for n=2n = 2 it is the level curve, the projection of the intersection of the graph with the plane z=cz = c.

  • Paraboloid x2+y2x^2+y^2: circles of radius c\sqrt c if c>0c > 0, the single point (0,0)(0,0) if c=0c = 0, empty if c<0c < 0. Denser curves mean a steeper surface.
  • Cone x2+y2\sqrt{x^2+y^2}: for c>0c > 0 circles of radius cc, equally spaced.
  • Saddle x2−y2x^2-y^2: for c≠0c \neq 0 hyperbolas, with branches on the xx axis if c>0c > 0 and on the yy axis if c<0c < 0; for c=0c = 0 the lines y=±xy = \pm x.
  • Plane 2x+y2x+y: parallel lines y=−2x+cy = -2x + c.

Typical mistakes.

  • Including or excluding the boundary wrongly: with ≥\ge (roots) it is included, with >> (logarithms) it is not.
  • Confusing domain and range: the domain is in the xyxy plane, the values zz are the range.
  • Assuming every level is attained: for x2+y2x^2+y^2 negative levels give the empty set.
  • Reading a level curve as a piece of surface: it is the set of points of the plane where ff equals cc.

Teoria collegata