Partial and Directional Derivatives
In questa pagina 4
The idea is to reduce to one variable: we move from along a line and look at how varies. If the line is parallel to an axis we get a partial derivative, if it has an arbitrary direction a directional derivative.
Partial derivatives
Definition. Let be a function and an interior point of . The partial derivative of with respect to the variable at is the limit: where is the -th unit vectora vector of norm one of the canonical basis.
Example. : and ; at the point they equal and .
In two variables, at the point :
Meaning. is the derivative of the one-variable function , i.e. the slope of the curve obtained by cutting the graph with the vertical plane . Other notations: , , .
Practical computation
In practice, to compute we differentiate with respect to the variable treating all the other variables as constants, applying the differentiation rules of one-variable calculus.
Example: let .
- With respect to : treat as constants .
- With respect to : treat as constants .
- With respect to : treat as constants .
In the term , differentiating with respect to the chain rule gives (the derivative of the argument with respect to is ); differentiating with respect to gives .
More examples.
- : , .
- : , (the term does not depend on , so its derivative with respect to is ).
Definition. If all the partial derivatives of exist at , the function is said to be differentiable in the partial sense (it has all its partial derivatives) at . The vector collecting them is the gradient, denoted by the symbol (read "nabla"):
Example. has , so .
Directional derivatives
When we want to know the variation of along a generic direction given by a unit vector (with ), we use the directional derivative.
Definition. The directional derivative of at along the unit vector is the limit:
The partial derivatives are the directional derivatives along the unit vectors of the axes: . A unit vector is used so that measures exactly the distance travelled from : with a vector of length the difference quotient would be doubled.
Example (from the definition). at along . Setting , we have and
Link with the gradient
If the function is differentiablef is differentiable at x0 if f(x) = f(x0) + grad f(x0)·(x - x0) + o(‖x - x0‖), i.e. near x0 the graph is indistinguishable from the tangent plane z = f(x0) + grad f(x0)·(x - x0). Differentiable implies continuous, with partial derivatives and D_v f = grad f · v; continuous partial derivatives imply differentiable. The gradient gives the direction of steepest increase (slope ‖grad f‖) and is orthogonal to level curves.Differentiability and the Gradient → at , there is no need to compute the previous limit.
Theorem. If is differentiable at , then for every unit vector the directional derivative exists and equals the dot product of the gradient and the unit vector:
Example. at along : .
In the example above , so and : same result, without limits. The proof and the geometric meaning (the gradient points in the direction of steepest increase) are in Differentiability and the Gradientf is differentiable at x0 if f(x) = f(x0) + grad f(x0)·(x - x0) + o(‖x - x0‖), i.e. near x0 the graph is indistinguishable from the tangent plane z = f(x0) + grad f(x0)·(x - x0). Differentiable implies continuous, with partial derivatives and D_v f = grad f · v; continuous partial derivatives imply differentiable. The gradient gives the direction of steepest increase (slope ‖grad f‖) and is orthogonal to level curves.Differentiability and the Gradient →.
Having derivatives does not imply continuity
In one variable a differentiable function is continuous. In several variables it is not so: partial derivatives only look along the axes, and the function may behave badly along the other directions.
Example 1 (partial derivatives exist but not continuous). for , . On the axes the function equals : and . Hence The partial derivatives exist, but the function is not continuous at the origin: along it equals identically (see Limits and Continuity in Several VariablesThe limit of a function of several variables exists if the value approaches L independently of the path; it is shown to exist with estimates in polar coordinates and shown not to exist by restricting to different curves. Continuity requires the limit to equal the value of the function at the point.Limits and Continuity in Several Variables →).
Example 2 (all directional derivatives exist, but not continuous). , . For a unit vector with : and for the function vanishes on the axis, so the derivative is . All directional derivatives exist, and yet is not continuous at (along it equals ).
Example 3 (continuous but not differentiable). The norm is continuous, but at the origin equals for and for : the limit does not exist, as for in one variable. The graph is a cone with its tip at the origin.
The right notion, which implies continuity and directional derivatives, is differentiability: Differentiability and the Gradientf is differentiable at x0 if f(x) = f(x0) + grad f(x0)·(x - x0) + o(‖x - x0‖), i.e. near x0 the graph is indistinguishable from the tangent plane z = f(x0) + grad f(x0)·(x - x0). Differentiable implies continuous, with partial derivatives and D_v f = grad f · v; continuous partial derivatives imply differentiable. The gradient gives the direction of steepest increase (slope ‖grad f‖) and is orthogonal to level curves.Differentiability and the Gradient →.
Common mistakes
- Not checking that the vector is a unit vector: the formula holds only if is a unit vectora vector of modulus one. If a vector with is given, it must be normalized by dividing by its norm: .
- Confusing having partial derivatives with differentiability: in one-variable calculus the two notions coincide, but in several variables they do not. Do not deduce continuity from the mere existence of partial derivatives.
- Using the differentiation rules where the function is piecewise defined: at the junction point (often the origin) the partial derivatives are computed from the definition, using the value assigned at that point.
- Forgetting terms that are constant in the variable: when differentiating with respect to the is there, with respect to the term disappears.
Versione ripasso
Partial derivative. For and interior: with the -th vector of the canonical basis. In practice one differentiates with respect to treating the other variables as constants. Example: has , , so at .
Gradient. . Example: has .
Directional derivative along a unit vector (): Partial derivatives are directional derivatives along the axes. The unit vector makes the distance travelled.
Gradient theorem. If is differentiable at , for every unit vector : Example: at with : . The limit computation, with , gives the same result. See Differentiability and the Gradientf is differentiable at x0 if f(x) = f(x0) + grad f(x0)·(x - x0) + o(‖x - x0‖), i.e. near x0 the graph is indistinguishable from the tangent plane z = f(x0) + grad f(x0)·(x - x0). Differentiable implies continuous, with partial derivatives and D_v f = grad f · v; continuous partial derivatives imply differentiable. The gradient gives the direction of steepest increase (slope ‖grad f‖) and is orthogonal to level curves.Differentiability and the Gradient →.
Having derivatives does not imply continuity.
- with : , but along the function equals , so it is not continuous at the origin (Limits and Continuity in Several VariablesThe limit of a function of several variables exists if the value approaches L independently of the path; it is shown to exist with estimates in polar coordinates and shown not to exist by restricting to different curves. Continuity requires the limit to equal the value of the function at the point.Limits and Continuity in Several Variables →).
- with : for every unit vector with the directional derivative is , so all directional derivatives exist. But along the function equals , so it is not continuous.
Continuous does not imply having derivatives. at the origin: has no limit.
Differentiability, which implies continuity and directional derivatives, is the right notion: Differentiability and the Gradientf is differentiable at x0 if f(x) = f(x0) + grad f(x0)·(x - x0) + o(‖x - x0‖), i.e. near x0 the graph is indistinguishable from the tangent plane z = f(x0) + grad f(x0)·(x - x0). Differentiable implies continuous, with partial derivatives and D_v f = grad f · v; continuous partial derivatives imply differentiable. The gradient gives the direction of steepest increase (slope ‖grad f‖) and is orthogonal to level curves.Differentiability and the Gradient →.
Typical mistakes.
- Using a vector with in : normalize first, .
- Using the ordinary rules at the junction point of a piecewise function: there the definition must be used.
- Deducing continuity from the mere existence of partial derivatives.
- When differentiating with respect to , the term disappears.