If you're seeing this message, it means we're having trouble loading external resources on our website.

Jeżeli jesteś za filtrem sieci web, prosimy, upewnij się, że domeny *.kastatic.org i *.kasandbox.org są odblokowane.

Główna zawartość

Wstęp do pochodnych kierunkowych

How does the value of a multivariable function change as you nudge the input in a specific direction?

Do czego zmierzamy

  • Załóżmy, że mamy daną funkcję dwóch zmiennych f, left parenthesis, x, comma, y, right parenthesis i wektor start bold text, v, end bold text, with, vector, on top znajdujący się w przestrzeni argumentów f, left parenthesis, x, comma, y, right parenthesis . Pochodna kierunkowa f, left parenthesis, x, comma, y, right parenthesis w kierunku wektora start bold text, v, end bold text, with, vector, on top określa szybkość zmiany wartości funkcji f, left parenthesis, x, comma, y, right parenthesis przy zmianie argumentu left parenthesis, x, comma, y, right parenthesis wzdłuż wektora start bold text, v, end bold text, with, vector, on top
Change input in the direction of start bold text, v, end bold text, with, vector, on top
  • Pochodną kierunkową funkcji wielu zmiennych f wzdłuż wektora v zapisujemy del, start subscript, start bold text, v, end bold text, with, vector, on top, end subscript, f i obliczamy mnożąc skalarnie gradient f z wektorem v, tzn. del, start subscript, start bold text, v, end bold text, with, vector, on top, end subscript, f = ∇f dot, start bold text, v, end bold text, with, vector, on top
  • Kiedy pochodna kierunkowa jest używana w celu obliczenia nachylenia, należy najpierw znormalizować wektor start bold text, v, end bold text, with, vector, on top (uzyskać wektor jednostkowy o tym samym kierunku)

Uogólnienie pochodnych cząstkowych

Niech funkcja dwóch zmiennych f, left parenthesis, x, comma, y, right parenthesis dana będzie wzorem:
f, left parenthesis, x, comma, y, right parenthesis, equals, x, squared, minus, x, y
Wiemy, że pochodne cząstkowe f, left parenthesis, x, comma, y, right parenthesis względem x lub y opisują szybkość zmiany f, left parenthesis, x, comma, y, right parenthesis, kiedy przesuwamy argument w kierunku osi O, X albo O, Y odpowiednio.
Pytanie teraz brzmi: co się stanie z wartością funkcji, kiedy przesuniemy argument w kierunku, który nie jest równoległy do osi O, X ani O, Y?
Na przykład obrazek poniżej przedstawia wykres funkcji f w trójwymiarowym układzie współrzędnych kartezjańskich. Na płaszczyźnie z=0 została umieszczona czerwona strzałka reprezentująca wektor start bold text, v, end bold text, with, vector, on top, w którego kierunku przesuwamy argument left parenthesis, x, comma, y, right parenthesis należący do dziedziny funkcji f - w tym przypadku płaszczyzny XY liczb rzeczywistych. Czy istnieje operator, określający jak zmienia się wartość funkcji, kiedy przesuwamy argument funkcji wzdłuż wektora start bold text, v, end bold text, with, vector, on top?
Change input in the direction of start bold text, v, end bold text, with, vector, on top
Jak się prawdopodobnie domyślasz, istnieje typ pochodnej, nazywany pochodną kierunkową, która odpowiada na pytanie, które przed chwilą sobie zadaliśmy.
Znane Ci już pochodne cząstkowe są obliczane względem zmiany jednego z argumentów (np. pochodna cząstkowa f, left parenthesis, x, comma, y, right parenthesis względem x lub względem y). Umożliwiają one badanie szybkości zmian funkcji, gdy zmienia się tylko pojedyńczy argument, a wartość reszty argumentów pozostaje stała. Natomiast pochodne kierunkowe dają cały wachlarz możliwości; argument może zmieniać się w kierunku dowolnego wektora start bold text, v, end bold text, with, vector, on top o ilości współrzędnych równej wymiarowi argumentu funkcji.
One very helpful way to think about this is to picture a point in the input space moving with velocity start bold text, v, end bold text, with, vector, on top. The directional derivative of f along start bold text, v, end bold text, with, vector, on top is the resulting rate of change in the output of the function. So, for example, multiplying the vector start bold text, v, end bold text, with, vector, on top by two would double the value of the directional derivative since all changes would be happening twice as fast.

Notacja

Pochodną kierunkową można wyrażać za pomocą różnych oznaczeń:
  • del, start subscript, start bold text, v, end bold text, with, vector, on top, end subscript, f
  • start fraction, \partial, f, divided by, \partial, start bold text, v, end bold text, with, vector, on top, end fraction
  • f, start subscript, start bold text, v, end bold text, with, vector, on top, end subscript, prime
  • D, start subscript, start bold text, v, end bold text, with, vector, on top, f, end subscript
  • \partial, start subscript, start bold text, v, end bold text, with, vector, on top, end subscript, f
Jest to pięć alternatywnych sposobów zapisu pochodnej kierunkowej f po wektorze v, która określa szybkość zmiany f, kiedy argument infinitezymalnie przesuwa się wzdłuż wektora start bold text, v, end bold text, with, vector, on top. My będziemy używać notacji del, start subscript, start bold text, v, end bold text, with, vector, on top, end subscript, f (dlatego że jest cichą wskazówką, jak obliczyć pochodną kierunkową funkcji znając jej gradient; za chwilę to zobaczysz).

Przykład 1: start bold text, v, end bold text, with, vector, on top, equals, start bold text, j, end bold text, with, hat, on top

Before jumping into the general rule for computing del, start subscript, start bold text, v, end bold text, with, vector, on top, end subscript, f, let's look at how we can rewrite the more familiar notion of a partial derivative as a directional derivative.
For example, the partial derivative start fraction, \partial, f, divided by, \partial, y, end fraction tells us the rate at which f changes as we nudge the input in the y direction. In other words, as we nudge it along the vector start bold text, j, end bold text, with, hat, on top. Therefore, we could equivalently write the partial derivative with respect to y as start fraction, \partial, f, divided by, \partial, y, end fraction, equals, del, start subscript, start bold text, j, end bold text, with, hat, on top, end subscript, f.
This is all just fiddling with different notation. What's more important is to have a clear mental image of what all this notation​ represents.
Reflection Question: Suppose start bold text, v, end bold text, with, vector, on top, equals, start bold text, i, end bold text, with, hat, on top, plus, start bold text, j, end bold text, with, hat, on top, what is your best guess for del, start subscript, start bold text, v, end bold text, with, vector, on top, end subscript, f?

How to compute the directional derivative

Let's say you have a multivariable f, left parenthesis, x, comma, y, comma, z, right parenthesis which takes in three variables—x, y and z—and you want to compute its directional derivative along the following vector:
v=[231] \vec{\textbf{v}} = \left[ \begin{array}{c} \blueE{2} \\ \redE{3} \\ \greenE{-1} \end{array} \right]
The answer, as it turns out, is
del, start subscript, start bold text, v, end bold text, with, vector, on top, end subscript, f, equals, start color #0c7f99, 2, end color #0c7f99, start fraction, \partial, f, divided by, \partial, x, end fraction, plus, start color #bc2612, 3, end color #bc2612, start fraction, \partial, f, divided by, \partial, y, end fraction, plus, start color #0d923f, left parenthesis, minus, 1, right parenthesis, end color #0d923f, start fraction, \partial, f, divided by, \partial, z, end fraction
This should make sense because a tiny nudge along start bold text, v, end bold text, with, vector, on top can be broken down into start color #0c7f99, t, w, o, end color #0c7f99 tiny nudges in the x-direction, start color #bc2612, t, h, r, e, e, end color #bc2612 tiny nudges in the y-direction, and a tiny nudge backwards, by start color #0d923f, minus, 1, end color #0d923f, in the z-direction. We'll go through the rigorous reasoning behind this much more thoroughly in the next article.
More generally, we can write the vector start bold text, v, end bold text, with, vector, on top abstractly as follows:
v=[v1v2v3] \vec{\textbf{v}} = \left[ \begin{array}{c} \blueE{v_1} \\ \redE{v_2} \\ \greenE{v_3} \end{array} \right]
The directional derivative looks like this:
del, start subscript, start bold text, v, end bold text, with, vector, on top, end subscript, f, equals, start color #0c7f99, v, start subscript, 1, end subscript, end color #0c7f99, start fraction, \partial, f, divided by, \partial, x, end fraction, plus, start color #bc2612, v, start subscript, 2, end subscript, end color #bc2612, start fraction, \partial, f, divided by, \partial, y, end fraction, plus, start color #0d923f, v, start subscript, 3, end subscript, end color #0d923f, start fraction, \partial, f, divided by, \partial, z, end fraction
That is, a tiny nudge in the start bold text, v, end bold text, with, vector, on top direction consists of start color #0c7f99, v, start subscript, 1, end subscript, end color #0c7f99 times a tiny nudge in the x-direction, start color #bc2612, v, start subscript, 2, end subscript, end color #bc2612 times a tiny nudge in the y-direction, and start color #0d923f, v, start subscript, 3, end subscript, end color #0d923f times a tiny nudge in the z-direction.
This can be written in a super-pleasing compact way using the dot product and the gradient:
=vf(x,y,z)=v1fx(x,y,z)+v2fy(x,y,z)+v3fz(x,y,z)=[fx(x,y,z)fy(x,y,z)fz(x,y,z)][v1v2v3]=f(x,y,z)v\begin{aligned} &\phantom{=}\nabla_{\vec{\textbf{v}}} f(x, y, z) \\\\ &= \blueE{v_1} \dfrac{\partial f}{\partial x}(x, y, z) + \redE{v_2} \dfrac{\partial f}{\partial y}(x, y, z) + \greenE{v_3} \dfrac{\partial f}{\partial z}(x, y, z) \\\\ &= \left[ \begin{array}{c} \dfrac{\partial f}{\partial x}(x, y, z) \\\\ \dfrac{\partial f}{\partial y}(x, y, z) \\\\ \dfrac{\partial f}{\partial z}(x, y, z) \end{array} \right] \cdot \left[ \begin{array}{c} \blueE{v_1} \\\\ \redE{v_2} \\\\ \greenE{v_3} \end{array} \right] \\\\ &= \nabla f(x, y, z) \cdot \vec{\textbf{v}} \end{aligned}
This is why the notation del, start subscript, start bold text, v, end bold text, with, vector, on top, end subscript is so suggestive of the way we compute the directional derivative:
vf=fv\begin{aligned} \nabla_{\maroonD{\vec{\textbf{v}}}} f = \nabla f \cdot \maroonD{\vec{\textbf{v}}} \end{aligned}
Take a moment to delight in the fact that one single operation, the gradient, packs enough information to compute the rate of change of a function in every possible direction! That's so many directions! Left, right, up, down, north-north-east, 34.8degrees clockwise from the x-axis... Madness!

Przykład 2:

Problem: Take a look at the following function.
f, left parenthesis, x, comma, y, right parenthesis, equals, x, squared, minus, x, y,
What is the directional derivative of f at the point left parenthesis, 2, comma, minus, 3, right parenthesis along the vector v=0.6i^+0.8j^\begin{aligned} \vec{\textbf{v}} = \blueE{0.6} \hat{\textbf{i}} + \redE{0.8} \hat{\textbf{j}} \end{aligned}?
Solution: You can think of the direction derivative either as a weighted sum of partial derivatives, as below:
vf=0,6fx+0,8fy\begin{aligned} \nabla_{\vec{\textbf{v}}}f = \blueE{0{,}6} \dfrac{\partial f}{\partial x} + \redE{0{,}8} \dfrac{\partial f}{\partial y} \end{aligned}
Or, you can think of it as a dot product with the gradient, as you see here:
vf=fv\begin{aligned} \nabla_{\vec{\textbf{v}}}f = \nabla f \cdot \vec{\textbf{v}} \end{aligned}
The first is faster, but just for practice, let's see how the gradient interpretation unfolds. We start by computing the gradient itself:
f=[fxfy]=[x(x2xy)y(x2xy)]=[2xyx] \nabla f = \left[ \begin{array}{c} \dfrac{\partial f}{\blueE{\partial x}} \\ \\ \dfrac{\partial f}{\redE{\partial y}} \\ \end{array} \right] = \left[ \begin{array}{c} \dfrac{\partial }{\blueE{\partial x}} (\blueE{x}^2 - \blueE{x}y) \\ \\ \dfrac{\partial}{\redE{\partial y}} (x^2 - x\redE{y}) \\ \end{array} \right] = \left[ \begin{array}{c} 2\blueE{x} - y \\ -x \end{array} \right]
Next, plug in the point left parenthesis, x, comma, y, right parenthesis, equals, left parenthesis, 2, comma, minus, 3, right parenthesis since this is the point the question asks us about.
f(2,3)=[2(2)(3)(2)]=[72]\begin{aligned} \nabla f(2, -3) = \left[\begin{array}{c} 2(2) - (-3) \\\\ -(2) \end{array} \right] = \left[\begin{array}{c} 7 \\\\ -2 \end{array} \right] \end{aligned}
To get the desired directional derivative, we take the dot product between this gradient and start bold text, v, end bold text:
vf(2,3)=f(2,3)(0.6i^+0.8j^)=[72][0.60.8]=7(0.6)+(2)(0.8)=2.6\begin{aligned} \nabla_{\vec{\textbf{v}}} f(2, -3) &= \nabla f(2, -3) \cdot \left( \blueE{0.6} \hat{\textbf{i}} + \redE{0.8} \hat{\textbf{j}} \right) \\\\ &= \left[ \begin{array}{c} 7 \\\\ -2 \end{array} \right] \cdot \left[ \begin{array}{c} \blueE{0.6} \\\\ \redE{0.8} \end{array} \right] \\\\ &= 7(\blueE{0.6}) + (-2)(\redE{0.8}) \\\\ &= 2.6 \end{aligned}

Finding slope

How do you find the slope of a graph intersected with a plane that is not parallel to the x or y axes?
Slice graph in a direction not parallel to x or y directions
You can use the directional derivative, but there is one important thing to remember:
If the directional derivative is used to compute slope, either start bold text, v, end bold text, with, vector, on top must be a unit vector or you must remember to divide by vertical bar, vertical bar, start bold text, v, end bold text, with, vector, on top, vertical bar, vertical bar at the end.
In the definition and computation above, doubling the length of start bold text, v, end bold text, with, vector, on top would double the value of the directional derivative. In terms of the computation, this is because del, f, dot, left parenthesis, 2, start bold text, v, end bold text, with, vector, on top, right parenthesis, equals, 2, left parenthesis, del, f, dot, v, right parenthesis.
However, this might not always be what you want. The slope of a graph in the direction of start bold text, v, end bold text, with, vector, on top, for example, depends only on the direction of start bold text, v, end bold text, with, vector, on top, not the magnitude vertical bar, vertical bar, start bold text, v, end bold text, with, vector, on top, vertical bar, vertical bar. Let's see why.
How can we imagine this slope? Slice the graph of f with a vertical plane that cuts the x, y-plane in the direction of start bold text, v, end bold text, with, vector, on top. The slope in question is that of a line tangent to the resulting curve. As with any slope, we look for the rise over run.
Computing slope using the directional derivative
In this case, the run will be the distance of a small nudge in the direction of start bold text, v, end bold text, with, vector, on top. We can express such a nudge as an addition of h, start bold text, v, end bold text, with, vector, on top to an input point start bold text, x, end bold text, start subscript, 0, end subscript, where h is thought of as some small number. The magnitude of this nudge is h, vertical bar, vertical bar, start bold text, v, end bold text, with, vector, on top, vertical bar, vertical bar.
The resulting change in the output of f can be approximated by multiplying this little value h by the directional derivative:
h, del, start subscript, start bold text, v, end bold text, with, vector, on top, end subscript, f, left parenthesis, x, start subscript, 0, end subscript, comma, y, start subscript, 0, end subscript, right parenthesis
In fact, the rise of the tangent line—as opposed to the graph of the function— is precisely h, del, start subscript, start bold text, v, end bold text, with, vector, on top, end subscript, f, left parenthesis, x, start subscript, 0, end subscript, comma, y, start subscript, 0, end subscript, right parenthesis due to this run of size h, vertical bar, vertical bar, start bold text, v, end bold text, with, vector, on top, vertical bar, vertical bar. For full details on why this is true, see the formal definition of the directional derivative in the next article.
Therefore, the rise-over-run slope of our graph is
hvf(x0,y0)hv=vf(x0,y0)v\begin{aligned} \quad \dfrac{h\nabla_{\vec{\textbf{v}}}f(x_0, y_0)}{h||v||} = \boxed{\dfrac{\nabla_{\vec{\textbf{v}}}f(x_0, y_0)}{||v||}} \end{aligned}
Notice, if start bold text, v, end bold text, with, vector, on top is a unit vector, meaning vertical bar, vertical bar, start bold text, v, end bold text, with, vector, on top, vertical bar, vertical bar, equals, 1, then the directional derivative does give the slope of a graph along that direction. Otherwise, it is important to remember to divide out by the magnitude of start bold text, v, end bold text, with, vector, on top.
Some authors even go so far as to include normalization in the definition of del, start subscript, start bold text, v, end bold text, with, vector, on top, end subscript, f.
Alternate definition of directional derivative:
vf(x)=limh0f(x+hv)f(x)hv\begin{aligned} \nabla_{\vec{\textbf{v}}} f(\textbf{x}) = \lim_{h \to 0}\dfrac{f(\textbf{x} + h\vec{\textbf{v}}) - f(\textbf{x})}{h\blueE{||\vec{\textbf{v}}||}} \end{aligned}
Personally, I think this definition puts too much emphasis on the particular use case of finding slope, so I prefer to use the original definition and normalize start bold text, v, end bold text, with, vector, on top when necessary.

Example 3: Slope

Problem: On the stage for this problem we have three players.
Player 1, the function:
f, left parenthesis, x, comma, y, right parenthesis, equals, sine, left parenthesis, x, y, right parenthesis
Player 2, the point:
left parenthesis, x, start subscript, 0, end subscript, comma, y, start subscript, 0, end subscript, right parenthesis, equals, left parenthesis, start fraction, pi, divided by, 3, end fraction, comma, start fraction, 1, divided by, 2, end fraction, right parenthesis
Player 3, the vector:
start bold text, v, end bold text, with, vector, on top, equals, 2, start bold text, i, end bold text, with, hat, on top, plus, 3, start bold text, j, end bold text, with, hat, on top
What is the slope of the graph of f at the point left parenthesis, x, start subscript, 0, end subscript, comma, y, start subscript, 0, end subscript, right parenthesis along the vector start bold text, v, end bold text, with, vector, on top?
Answer: Since we are finding slope, we must first normalize the vector in question. The magnitude vertical bar, vertical bar, start bold text, v, end bold text, with, vector, on top, vertical bar, vertical bar is square root of, 2, squared, plus, 3, squared, end square root, equals, square root of, 13, end square root, so we divide each term by square root of, 13, end square root to get the resulting unit vector start bold text, u, end bold text, with, hat, on top in the direction of start bold text, v, end bold text, with, vector, on top:
Next, find the gradient of f:
Plug in the point left parenthesis, x, start subscript, 0, end subscript, comma, y, start subscript, 0, end subscript, right parenthesis, equals, left parenthesis, start fraction, pi, divided by, 3, end fraction, comma, start fraction, 1, divided by, 2, end fraction, right parenthesis to this gradient.
Finally, take the dot product between start bold text, u, end bold text, with, hat, on top and del, f, left parenthesis, pi, slash, 3, comma, 1, slash, 2, right parenthesis:

Podsumowanie

  • Załóżmy, że mamy daną funkcję dwóch zmiennych f, left parenthesis, x, comma, y, right parenthesis i wektor start bold text, v, end bold text, with, vector, on top znajdujący się w przestrzeni argumentów f, left parenthesis, x, comma, y, right parenthesis . Pochodna kierunkowa f, left parenthesis, x, comma, y, right parenthesis w kierunku wektora start bold text, v, end bold text, with, vector, on top określa szybkość zmiany wartości funkcji f, left parenthesis, x, comma, y, right parenthesis przy zmianie argumentu left parenthesis, x, comma, y, right parenthesis wzdłuż wektora start bold text, v, end bold text, with, vector, on top
  • The notation here is del, start subscript, start bold text, v, end bold text, with, vector, on top, end subscript, f, and it is computed by taking the dot product between the gradient of f and the vector start bold text, v, end bold text, with, vector, on top, that is, del, f, dot, start bold text, v, end bold text, with, vector, on top.
  • Kiedy pochodna kierunkowa jest używana w celu obliczenia nachylenia, należy najpierw znormalizować wektor start bold text, v, end bold text, with, vector, on top (uzyskać wektor jednostkowy o tym samym kierunku)

Chcesz dołączyć do dyskusji?

Na razie brak głosów w dyskusji
Rozumiesz angielski? Kliknij tutaj, aby zobaczyć więcej dyskusji na angielskiej wersji strony Khan Academy.