Find the gradient of a function online calculator. Gradient of a function and derivative with respect to the direction of a vector

Brief theory

A gradient is a vector whose direction indicates the direction of the fastest increase in the function f(x). Finding this vector quantity is associated with determining the partial derivatives of the function. The directional derivative is a scalar quantity and shows the rate of change of a function when moving along the direction specified by some vector.

Example of problem solution

The task

Given a function, a point and a vector. Find:

The solution of the problem

Finding the gradient of a function

1) Find the gradient of the function at the point:

The desired gradient:

Finding the derivative with respect to the direction of a vector

2) Find the derivative in the direction of the vector:

where is the angle formed by the vector and the axis

The required derivative at the point:

The price is greatly influenced by the urgency of the decision (from a day to several hours). Online help with exams/tests is available by appointment.

You can leave a request directly in the chat, having previously sent the conditions of the tasks and informed you of the deadlines for the solution you need. Response time is a few minutes.

Definition 1

If for each pair $(x,y)$ of values ​​of two independent variables from some domain a certain value $z$ is associated, then $z$ is said to be a function of two variables $(x,y)$. Notation: $z=f(x,y)$.

Consider the function $z=f(x,y)$, which is defined in some region in the space $Oxy$.

Hence,

Definition 3

If for each triple $(x,y,z)$ of values ​​of three independent variables from some domain a certain value $w$ is associated, then $w$ is said to be a function of three variables $(x,y,z)$ in this area.

Designation:$w=f(x,y,z)$.

Consider the function $w=f(x,y,z)$, which is defined in some region in the space $Oxyz$.

For a given function, we define a vector for which the projections on the coordinate axes are the values ​​of the partial derivatives of the given function at some point $\frac(\partial z)(\partial x) ;\frac(\partial z)(\partial y) $.

Definition 4

The gradient of a given function $w=f(x,y,z)$ is a vector $\overrightarrow(gradw)$ of the following form:

Theorem 3

Let a field of gradients be defined in some scalar field $w=f(x,y,z)$

\[\overrightarrow(gradw) =\frac(\partial w)(\partial x) \cdot \overrightarrow(i) +\frac(\partial w)(\partial y) \cdot \overrightarrow(j) +\frac (\partial w)(\partial z) \cdot \overrightarrow(k).\]

The derivative $\frac(\partial w)(\partial s) $ in the direction of a given vector $\overrightarrow(s) $ is equal to the projection of the gradient vector $\overrightarrow(gradw) $ onto a given vector $\overrightarrow(s) $.

Example 4

Solution:

The expression for the gradient is found using the formula

\[\overrightarrow(gradw) =\frac(\partial w)(\partial x) \cdot \overrightarrow(i) +\frac(\partial w)(\partial y) \cdot \overrightarrow(j) +\frac (\partial w)(\partial z) \cdot \overrightarrow(k).\]

\[\frac(\partial w)(\partial x) =2x;\frac(\partial w)(\partial y) =4y;\frac(\partial w)(\partial z) =2.\]

Hence,

\[\overrightarrow(gradw) =2x\cdot \overrightarrow(i) +4y\cdot \overrightarrow(j) +2\cdot \overrightarrow(k) .\]

Example 5

Determine the gradient of a given function

at point $M(1;2;1)$. Compute $\left(|\overrightarrow(gradz) |\right)_(M) $.

Solution:

The expression for the gradient at a given point is found using the formula

\[\left(\overrightarrow(gradw) \right)_(M) =\left(\frac(\partial w)(\partial x) \right)_(M) \cdot \overrightarrow(i) +\left (\frac(\partial w)(\partial y) \right)_(M) \cdot \overrightarrow(j) +\left(\frac(\partial w)(\partial z) \right)_(M) \cdot \overrightarrow(k).\]

Partial derivatives have the form:

\[\frac(\partial w)(\partial x) =2x;\frac(\partial w)(\partial y) =4y;\frac(\partial w)(\partial z) =6z^(2) .\]

Derivatives at the point $M(1;2)$:

\[\frac(\partial w)(\partial x) =2\cdot 1=2;\frac(\partial w)(\partial y) =4\cdot 2=8;\frac(\partial w)( \partial z) =6\cdot 1^(2) =6.\]

Hence,

\[\left(\overrightarrow(gradw) \right)_(M) =2\cdot \overrightarrow(i) +8\cdot \overrightarrow(j) +6\cdot \overrightarrow(k) \]

\[\left(|\overrightarrow(gradw) |\right)_(M) =\sqrt(2^(2) +8^(2) +6^(2) ) =\sqrt(4+64+36 ) =\sqrt(104) .\]

Let's list some gradient properties:

    The derivative of a given function at a given point in the direction of some vector $\overrightarrow(s) $ has the greatest value if the direction of this vector $\overrightarrow(s) $ coincides with the direction of the gradient. In this case, this largest value of the derivative coincides with the length of the gradient vector, i.e. $|\overrightarrow(gradw) |$.

    The derivative of a given function in the direction of a vector that is perpendicular to the gradient vector, i.e. $\overrightarrow(gradw) $ is equal to 0. Since $\varphi =\frac(\pi )(2) $, then $\cos \varphi =0$; therefore, $\frac(\partial w)(\partial s) =|\overrightarrow(gradw) |\cdot \cos \varphi =0$.

Concept directional derivative considered for functions of two and three variables. To understand the meaning of the directional derivative, you need to compare the derivatives by definition

Hence,

Now we can find the directional derivative of this function using its formula:

And now - homework. It gives a function of not three, but only two variables, but the direction vector is specified somewhat differently. So you'll have to repeat it again vector algebra .

Example 2. Find the derivative of a function at a point M0 (1; 2) in the direction of the vector, where M1 - point with coordinates (3; 0).

The vector that specifies the direction of the derivative can also be given in the form as in the following example - in the form expansion in unit vectors of coordinate axes, but this is a familiar topic from the very beginning of vector algebra.

Example 3. Find the derivative of a function at the point M0 (1; 1; 1) in the direction of the vector.

Solution. Let's find the direction cosines of the vector

Let's find the partial derivatives of the function at the point M0 :

Therefore, we can find the directional derivative of this function using its formula:

.

Gradient function

Gradient of a function of several variables at a point M0 characterizes the direction of maximum growth of this function at the point M0 and the magnitude of this maximum growth.

How to find the gradient?

Need to determine a vector whose projections on the coordinate axes are the values partial derivatives, , this function at the corresponding point:

.

That is, it should work out representation of a vector by unit vectors of coordinate axes, in which the partial derivative corresponding to its axis is multiplied by each unit.

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 greatest 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 of 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.

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 the maximum rate of 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 three-dimensional space is considered, 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. Considering the form of the total differential du, we can conclude that the derivative in the direction s at point M is equal to: (дu/дs)|M=((дf/дх)|M)сos(alpha)+ ((дf/дy) |M) cos(beta) +((df/dz)|M) cos(gamma).If s= s(sx,sy,sz), then 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 Hamiltonian differential vector operator, then gradf can be written as the multiplication of this vector operator 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 under the scale in which you enter the required degree of 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, to give a circle the shape of a ball, a radial gradient is used, and to give a cone shape, 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

Share with friends or save for yourself:

Loading...