The gradient of the function is determined. Gradient of a given function. Extrema of a function of several variables

Lecture 15. “Differentiation of a function of several variables”

    Gradient of a function of two variables and directional derivative.

Definition. Gradient function

called a vector

.

As can be seen from the definition of the gradient of a function, the components of the gradient vector are the partial derivatives of the function.

Example. Calculate the gradient of a function

at point A(2,3).

Solution. Let's calculate the partial derivatives of the function.

In general, the function gradient has the form:

=

Let's substitute the coordinates of point A(2,3) into the partial derivative expressions

The gradient of the function at point A(2,3) has the form:

Similarly, we can define the concept of the gradient of a function of three variables:

Definition. Gradient function of three variables

called a vector

Otherwise, this vector can be written as follows:

Definition directional derivative.

Let a function of two variables be given

and an arbitrary vector

Let's consider the increment of this function taken along a given vector

Those. the vector is collinear with respect to the vector . Argument increment length

The derivative in a certain direction is the limit of the ratio of the increment of a function along a given direction to the length of the increment of the argument, when the length of the increment of the argument tends to 0.

Formula for calculating directional derivative.

Based on the definition of the gradient, the directional derivative of the function can be calculated as follows.

some vector. Vector with the same direction, but single let's call the length

The coordinates of this vector are calculated as follows:

From the definition of directional derivative, the directional derivative can be calculated using the following formula:

The right side of this formula is the scalar product of two vectors

Therefore, the directional derivative can be represented as the following formula:

Several important properties of the gradient vector follow from this formula.

The first property of the gradient follows from the obvious fact that the scalar product of two vectors takes highest value, when the vectors coincide in direction. The second property follows from the fact that the scalar product of perpendicular vectors is equal to zero. In addition, the first property implies the geometric meaning of the gradient - the gradient is a vector along the direction whose directional derivative is greatest. Since the directional derivative determines the tangent of the angle of inclination of the tangent to the surface of the function, the gradient is directed along the greatest inclination of the tangent.

Example 2. For a function (from example 1)

Calculate Directional Derivative

at point A(2,3).

Solution. To calculate the directional derivative, you need to calculate the gradient vector at the specified point and the unit direction vector (i.e., normalize the vector).

The gradient vector was calculated in example 1:

We calculate the unit direction vector:

We calculate the derivative with respect to direction:

#2. Maximum and minimum functions of several variables.

Definition. Function

Has a maximum at a point (i.e. at and ), if

Definition. In exactly the same way they say that the function

Has a minimum at a point (i.e. at and ), if

for all points sufficiently close to the point and different from it.

The maximum and minimum of a function are called extrema of the function, i.e. they say that a function has an extremum at a given point if this function has a maximum or minimum at a given point.

For example, the function

Has an obvious minimum z = -1 at x = 1 and y = 2.

Has a maximum at the point at x = 0 and y = 0.

Theorem.(necessary conditions for an extremum).

If the function reaches an extremum at , then each first-order partial derivative of z either vanishes for these argument values ​​or does not exist.

Comment. This theorem is not sufficient for studying the question of extreme values ​​of a function. We can give examples of functions that have zero partial derivatives at some points, but do not have an extremum at these points.

Example. A function that has zero partial derivatives but no extremum.

Indeed:

Sufficient conditions for an extremum.

Theorem. Let in some domain containing the point , the function has continuous partial derivatives up to the third order inclusive; Let, in addition, the point be a critical point of the function, i.e.

Then when ,

Example 3.2. Explore the maximum and minimum functions

    Let's find the critical points, i.e. points at which the first partial derivatives are zero or do not exist.

First, we calculate the partial derivatives themselves.

We equate the partial derivatives to zero and solve the following system of linear equations

Multiply the second equation by 2 and add it to the first. The result is an equation only in y.

We find and substitute into the first equation

Let's transform

Therefore, point () is critical.

    Let's calculate the second derivatives of the second order and substitute the coordinates of the critical point into them.

In our case, there is no need to substitute the values ​​of the critical points, since the second derivatives are numbers.

As a result we have:

Consequently, the found critical point is an extremum point. Moreover, since

then this is the minimum point.

Gradient functions– a vector quantity, the determination of which is associated with the determination of the partial derivatives of the function. The direction of the gradient indicates the path of the fastest growth of the function from one point of the scalar field to another.

Instructions

1. To solve the problem of the gradient of a function, methods of differential calculus are used, namely, finding first-order partial derivatives with respect to three variables. It is assumed that the function itself and all its partial derivatives have the property of continuity in the domain of definition of the function.

2. The gradient is a vector, the direction of which indicates the direction of the most rapid increase in the function F. To do this, two points M0 and M1 are selected on the graph, which are the ends of the vector. The magnitude of the gradient is equal to the rate of increase of the function from point M0 to point M1.

3. The function is differentiable at all points of this vector; therefore, the projections of the vector on the coordinate axes are all its partial derivatives. Then the gradient formula looks like this: grad = (?F/?x) i + (?F/?y) j + (?F/?z) k, where i, j, k are the coordinates of the unit vector. In other words, the gradient of a function is a vector whose coordinates are its partial derivatives grad F = (?F/?х, ?F/?y, ?F/?z).

4. Example 1. Let the function F = sin(x z?)/y be given. It is required to detect its gradient at the point (?/6, 1/4, 1).

5. Solution. Determine the partial derivatives with respect to each variable: F'_х = 1/y сos(х z?) z?; F'_y = sin(х z?) (-1) 1/(y?); F'_z = 1/y cos(x z?) 2 x z.

6. Substitute the famous coordinate values ​​of the point: F’_x = 4 сos(?/6) = 2 ?3; F’_y = sin(?/6) (-1) 16 = -8; F’_z = 4 cos(?/6) 2 ?/6 = 2 ?/?3.

7. Apply the function gradient formula:grad F = 2 ?3 i – 8 j + 2 ?/?3 k.

8. Example 2. Find the coordinates of the gradient of the function F = y arсtg (z/x) at point (1, 2, 1).

9. Solution.F'_x = 0 arctg (z/x) + y (arctg(z/x))'_x = y 1/(1 + (z/x)?) (-z/x?) = -y z/ (x? (1 + (z/x)?)) = -1;F'_y = 1 аrсtg(z/х) = аrсtg 1 = ?/4;F'_z = 0 аrсtg(z/х) + y (arсtg(z/х))'_z = y 1/(1 + (z/х)?) 1/х = y/(х (1 + (z/х)?)) = 1.grad = (- 1, ?/4, 1).

The scalar field gradient is a vector quantity. Thus, to find it, it is necessary to determine all the components of the corresponding vector, based on knowledge of the division of the scalar field.

Instructions

1. Read in a textbook on higher mathematics what the gradient of a scalar field is. As you know, this vector quantity has a direction characterized by maximum speed decay of the scalar function. This interpretation of this vector quantity is justified by the expression for determining its components.

2. Remember that any vector is determined by the magnitudes of its components. The components of a vector are actually projections of this vector onto one or another coordinate axis. Thus, if considered three dimensional space, then the vector must have three components.

3. Write down how the components of a vector that is the gradient of a certain field are determined. All of the coordinates of such a vector are equal to the derivative of the scalar potential with respect to the variable whose coordinate is being calculated. That is, if you need to calculate the “x” component of the field gradient vector, then you need to differentiate the scalar function with respect to the “x” variable. Please note that the derivative must be partial. This means that during differentiation, the remaining variables that are not involved in it must be considered constants.

4. Write an expression for the scalar field. As is well known, this term implies only a scalar function of several variables, which are also scalar quantities. The number of variables of a scalar function is limited by the dimension of the space.

5. Differentiate the scalar function separately with respect to each variable. As a result, you will get three new functions. Write any function into the expression for the scalar field gradient vector. Each of the obtained functions is actually an indicator for a unit vector of a given coordinate. Thus, the final gradient vector should look like a polynomial with exponents in the form of derivatives of the function.

When considering issues involving gradient representation, it is common to think of functions as scalar fields. Therefore, it is necessary to introduce the appropriate notation.

You will need

  • – boom;
  • - pen.

Instructions

1. Let the function be specified by three arguments u=f(x, y, z). The partial derivative of a function, for example, with respect to x, is defined as the derivative with respect to this argument, obtained by fixing the remaining arguments. Similar for other arguments. The notation for the partial derivative is written in the form: df/dx = u’x ...

2. The total differential will be equal to du=(дf/дх)dx+ (дf/дy)dy+(дf/дz)dz. Partial derivatives can be understood as derivatives along the directions of the coordinate axes. Consequently, the question arises of finding the derivative with respect to the direction of a given vector s at the point M(x, y, z) (do not forget that the direction s is determined by the unit vector s^o). In this case, the vector-differential of the arguments (dx, dy, dz) = (дscos(alpha), dscos(beta), dscos(gamma)).

3. Looking at the view full differential du, we can conclude that the derivative in direction s at point M is equal to: (дu/дs)|M=((дf/дх)|M)сos(alpha)+ ((дf/дy)|M) сos (beta) +((df/dz)|M) cos(gamma).If s= s(sx,sy,sz), then the direction cosines (cos(alpha), cos(beta), cos(gamma)) are calculated (see Fig. 1a).

4. The definition of the directional derivative, considering point M a variable, can be rewritten in the form of a scalar product: (дu/дs)=((дf/дх, дf/дy,дf/дz), (cos(alpha), cos(beta), cos (gamma)))=(grad u, s^o). This expression will be objective for a scalar field. If a function is considered easily, then gradf is a vector having coordinates coinciding with the partial derivatives f(x, y, z).gradf(x,y,z)=((df/dh, df/dy, df/ dz)=)=(df/dx)i+(df/dy)j +(df/dz)k. Here (i, j, k) are the unit vectors of the coordinate axes in a rectangular Cartesian coordinate system.

5. If we use the Hamilton Nabla differential vector operator, then gradf can be written as the multiplication of this operator vector by the scalar f (see Fig. 1b). From the point of view of the connection between gradf and the directional derivative, the equality (gradf, s^o)=0 is acceptable if these vectors are orthogonal. Consequently, gradf is often defined as the direction of the fastest metamorphosis of the scalar field. And from the point of view of differential operations (gradf is one of them), the properties of gradf exactly repeat the properties of differentiating functions. In particular, if f=uv, then gradf=(vgradu+u gradv).

Video on the topic

Gradient This is a tool that, in graphic editors, fills a silhouette with a smooth transition from one color to another. Gradient can give a silhouette the result of volume, imitate lighting, glare of light on the surface of an object, or the result of a sunset in the background of a photograph. This tool is widely used, so for processing photographs or creating illustrations, it is very important to learn how to use it.

You will need

  • Computer, graphics editor Adobe Photoshop, Corel Draw, Paint.Net or another.

Instructions

1. Open an image in the program or take a new one. Make a silhouette or select the desired area in the image.

2. Turn on the gradient tool on the graphics editor toolbar. Place the mouse cursor on the point inside the selected area or silhouette where the 1st color of the gradient will begin. Click and hold the left mouse button. Move the cursor to the point where you want the gradient to change to the final color. Release the left mouse button. The selected silhouette will be filled with a gradient fill.

3. Gradient You can set transparency, colors and their ratio at a certain point of the fill. To do this, open the gradient editing window. To open the editing window in Photoshop, click on the gradient example in the Options panel.

4. The window that opens displays the available gradient fill options in the form of examples. To edit one of the options, select it with a mouse click.

5. At the bottom of the window an example of a gradient is displayed in the form of a wide scale on which sliders are located. The sliders indicate the points at which the gradient should have specified collations, and in the interval between the sliders the color evenly transitions from the color specified at the first point to the color of the 2nd point.

6. The sliders located at the top of the scale set the transparency of the gradient. To change the transparency, click on the required slider. A field will appear below the scale in which to enter required degree transparency as a percentage.

7. The sliders at the bottom of the scale set the colors of the gradient. By clicking on one of them, you will be able to select the desired color.

8. Gradient may have several transition colors. To set another color, click on the free space at the bottom of the scale. Another slider will appear on it. Give it the required color. The scale will display an example of the gradient with one more point. You can move the sliders by holding them with the left mouse button to achieve the desired combination.

9. Gradient They come in several types that can give shape to flat silhouettes. For example, in order to give a circle the shape of a ball, a radial gradient is used, and in order to give the shape of a cone, a cone-shaped gradient is used. To give the surface the illusion of convexity, you can use a mirror gradient, and a diamond-shaped gradient can be used to create highlights.

Video on the topic

Video on the topic

From school course Mathematicians know that a vector on a plane is a directed segment. Its beginning and end have two coordinates. The vector coordinates are calculated by subtracting the start coordinates from the end coordinates.

The concept of a vector can be extended to n-dimensional space (instead of two coordinates there will be n coordinates).

Gradient grad z of the function z = f(x 1, x 2, ...x n) is the vector of partial derivatives of the function at a point, i.e. vector with coordinates .

It can be proven that the gradient of a function characterizes the direction of the fastest growth of the level of a function at a point.

For example, for the function z = 2x 1 + x 2 (see Figure 5.8), the gradient at any point will have coordinates (2; 1). You can build it on a plane different ways, taking any point as the beginning of the vector. For example, you can connect point (0; 0) to point (2; 1), or point (1; 0) to point (3; 1), or point (0; 3) to point (2; 4), or so on. .P. (See Figure 5.8). All vectors constructed in this way will have coordinates (2 – 0; 1 – 0) =
= (3 – 1; 1 – 0) = (2 – 0; 4 – 3) = (2; 1).

From Figure 5.8 it is clearly seen that the level of the function increases in the direction of the gradient, since the constructed level lines correspond to the level values ​​4 > 3 > 2.

Figure 5.8 - Gradient of function z = 2x 1 + x 2

Let's consider another example - the function z = 1/(x 1 x 2). The gradient of this function will no longer always be the same at different points, since its coordinates are determined by the formulas (-1/(x 1 2 x 2); -1/(x 1 x 2 2)).

Figure 5.9 shows the level lines of the function z = 1/(x 1 x 2) for levels 2 and 10 (the straight line 1/(x 1 x 2) = 2 is indicated by a dotted line, and the straight line
1/(x 1 x 2) = 10 – solid line).

Figure 5.9 - Gradients of the function z = 1/(x 1 x 2) at various points

Take, for example, the point (0.5; 1) and calculate the gradient at this point: (-1/(0.5 2 *1); -1/(0.5*1 2)) = (-4; - 2). Note that the point (0.5; 1) lies on the level line 1/(x 1 x 2) = 2, because z = f(0.5; 1) = 1/(0.5*1) = 2. To depict the vector (-4; -2) in Figure 5.9, we connect the point (0.5; 1) with the point (-3.5; -1), because
(-3,5 – 0,5; -1 - 1) = (-4; -2).

Let's take another point on the same level line, for example, point (1; 0.5) (z = f(1; 0.5) = 1/(0.5*1) = 2). Let's calculate the gradient at this point
(-1/(1 2 *0.5); -1/(1*0.5 2)) = (-2; -4). To depict it in Figure 5.9, we connect the point (1; 0.5) with the point (-1; -3.5), because (-1 - 1; -3.5 - 0.5) = (-2; - 4).

Let's take another point on the same level line, but only now in a non-positive coordinate quarter. For example, point (-0.5; -1) (z = f(-0.5; -1) = 1/((-1)*(-0.5)) = 2). The gradient at this point will be equal to
(-1/((-0.5) 2 *(-1)); -1/((-0.5)*(-1) 2)) = (4; 2). Let's depict it in Figure 5.9 by connecting the point (-0.5; -1) with the point (3.5; 1), because (3.5 – (-0.5); 1 – (-1)) = (4 ; 2).

1 0 The gradient is directed normal to the level surface (or to the level line if the field is flat).

2 0 The gradient is directed towards increasing the field function.

3 0 The gradient modulus is equal to the largest derivative in direction at a given point in the field:

These properties provide an invariant characteristic of the gradient. They say that the vector gradU indicates the direction and magnitude of the greatest change in the scalar field at a given point.

Remark 2.1. If the function U(x,y) is a function of two variables, then the vector

lies in the oxy plane.

Let U=U(x,y,z) and V=V(x,y,z) be differentiable at the point M 0 (x,y,z) functions. Then the following equalities hold:

a) grad()= ; b) grad(UV)=VgradU+UgradV;

c) grad(U V)=gradU gradV; d) d) grad = , V ;

e) gradU( = gradU, where , U=U() has a derivative with respect to .

Example 2.1. The function U=x 2 +y 2 +z 2 is given. Determine the gradient of the function at point M(-2;3;4).

Solution. According to formula (2.2) we have

The level surfaces of this scalar field are the family of spheres x 2 +y 2 +z 2 , the vector gradU=(-4;6;8) is the normal vector of planes.

Example 2.2. Find the gradient of the scalar field U=x-2y+3z.

Solution. According to formula (2.2) we have

The level surfaces of a given scalar field are planes

x-2y+3z=C; the vector gradU=(1;-2;3) is the normal vector of planes of this family.

Example 2.3. Find the greatest steepness of the surface rise U=x y at point M(2;2;4).

Solution. We have:

Example 2.4. Find the unit normal vector to the level surface of the scalar field U=x 2 +y 2 +z 2 .

Solution. The level surfaces of a given scalar Field-sphere x 2 +y 2 +z 2 =C (C>0).

The gradient is directed normal to the level surface, so

Defines the normal vector to the level surface at point M(x,y,z). For a unit normal vector we obtain the expression

Example 2.5. Find the field gradient U=, where and are constant vectors, r is the radius vector of the point.

Solution. Let

Then: . By the rule of differentiation of the determinant we obtain

Hence,

Example 2.6. Find the gradient of the distance, where P(x,y,z) is the field point being studied, P 0 (x 0 ,y 0 ,z 0) is some fixed point.

Solution. We have - unit direction vector .

Example 2.7. Find the angle between the gradients of the functions at the point M 0 (1,1).

Solution. We find the gradients of these functions at the point M 0 (1,1), we have

; The angle between gradU and gradV at point M 0 is determined from the equality

Hence =0.

Example 2.8. Find the directional derivative, the radius vector is equal to

Solution. Find the gradient of this function:

Substituting (2.5) into (2.4), we obtain

Example 2.9. Find at point M 0 (1;1;1) the direction of the greatest change in the scalar field U=xy+yz+xz and the magnitude of this greatest change at this point.


Solution. The direction of the greatest change in the field is indicated by the vector grad U(M). We find it:

And that means... This vector determines the direction of the greatest increase in this field at point M 0 (1;1;1). The magnitude of the largest field change at this point is equal to

Example 3.1. Find the vector lines of the vector field where is a constant vector.

Solution. We have so that

Multiply the numerator and denominator of the first fraction by x, the second by y, the third by z and add term by term. Using the property of proportions, we get

Hence xdx+ydy+zdz=0, which means

x 2 +y 2 +z 2 =A 1, A 1 -const>0. Now multiplying the numerator and denominator of the first fraction (3.3) by c 1, the second by c 2, the third by c 3 and adding term by term, we get

Where from 1 dx+c 2 dy+c 3 dz=0

And, therefore, with 1 x+c 2 y+c 3 z=A 2 . A 2 -const.

The required equations of vector lines

These equations show that vector lines are obtained by the intersection of spheres having a common center at the origin with planes perpendicular to the vector. It follows that vector lines are circles whose centers are on a straight line passing through the origin in the direction of vector c. The planes of the circles are perpendicular to the specified line.

Example 3.2. Find the vector field line passing through the point (1,0,0).

Solution. Differential equations vector lines

Hence we have . Solving the first equation. Or if we introduce the parameter t, then we will have In this case, the equation takes the form or dz=bdt, whence z=bt+c 2.

Consider the formula for the derivative of a scalar function u in the direction λ

The second factors are projections of the unit vector directed along the ray λ.

Let's take a vector whose projections on the coordinate axes will be the values ​​of partial derivatives in the selected point P(x, y, z).

This vector is called the gradient of the function u (x, y, z) and is denoted gradu or

Definition. The gradient of a function u(x, y, z) is a vector whose projections are the values ​​of the partial derivatives of this function, i.e.

The derivative of a function in a given direction is equal to the scalar product of the gradient of the function and the unit vector of this direction.

Expanding the scalar product, we get

,

where φ is the angle between the vector gradu and ray λ.

Reaches the greatest value

So, there is the greatest value of the derivative in a given TR, and the direction grad u coincides with the direction of the ray emerging from the TR, along which the function changes the fastest.

Let us establish a connection between the direction of the gradient of the function and the level surfaces of the scalar field.

Theorem. The gradient of the function u (x,y,z) at each point coincides with the normal to the level surface of the scalar field passing through this point.

Proof. Let's choose an arbitrary t. P 0 (x 0, y 0, z 0).

Surface equation

level passing through

i.e. it will be u(x,y,z)= ,

u 0 = u (x 0 , y 0 , z 0)

The equation of the normal to this surface will be

It follows that the direction normal vector, which has projections , is the gradient of the function u (x, y, z) in t. P 0, etc.

Thus, the gradient at each point is perpendicular to the tangent plane to the level surface passing through this point, i.e. its projection onto this plane is zero.

Hence: The derivative in any direction tangent to the level surface passing through a given point is equal to zero.

Basic properties of the gradient function:

2) grad , where C – Const

4) grad

All properties are proven using the definition of the gradient of a function.

Example. In point M(1, 1, 1) find the direction of the greatest change in the scalar field and the magnitude of this change.



Read also: