Download Partial derivatives

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Divergent series wikipedia , lookup

Pi wikipedia , lookup

Multiple integral wikipedia , lookup

Automatic differentiation wikipedia , lookup

Distribution (mathematics) wikipedia , lookup

Sobolev space wikipedia , lookup

Series (mathematics) wikipedia , lookup

Lie derivative wikipedia , lookup

Fundamental theorem of calculus wikipedia , lookup

Partial differential equation wikipedia , lookup

Matrix calculus wikipedia , lookup

Neumann–Poincaré operator wikipedia , lookup

Chain rule wikipedia , lookup

Derivative wikipedia , lookup

Function of several real variables wikipedia , lookup

Transcript
LECTURE 11 - PARTIAL DIFFERENTIATION
CHRIS JOHNSON
Abstract. Partial differentiation is a natural generalization of
the differentiation of a function of a single variable that you are
familiar with.
1. Introduction
Given a function of two variables, f (x, y), we may like to know how
the function changes as the variables change. In general this is a complicated problem because the variables can change in so many different
ways: one variable may increase exponentially as another decreases linearly; or one variable may decrease logarithmically while the other variable decreases quadratically; or many more complicated things could
happen. In order to make our lives easier we will first suppose that
only one variable changes at a time, since this is most directly related
to the derivatives of single-variable functions that we understand.
Example 1.1. As a motivating example, consider the function
3
x
.
f (x, y) = sin(xy) + cos
100
The surface z = f (x, y) associated to this function consists of ripples
and waves that change in complicated ways as we change x and y. See
Figure 1
Let’s suppose that y is some fixed constant, say y = 3, and only
x-varies. Geometrically, we’re intersecting the surface with the plane
y = 3. See Figures 2 and 3.
The intersection of our surface with the plane gives us a curve, which
is naturally the graph of the function
3
x
F (x) = sin(3x) + cos
.
100
If we differentiate this function we have
3x2
F (x) = 3 cos(3x) −
sin
100
0
1
x3
100
.
2
CHRIS JOHNSON
Figure 1. The surface z = sin(xy) + cos
Figure 2. The surface z = sin(xy) + cos
with the plane y = 3.
x3
100
Figure 3. The graph of sin(3x) + cos
x3
100
.
together
x3
100
.
This derivative represents how the “elevation” of the surface z =
f (x, y) changes if we walk along the surface keeping y fixed at y = 3,
but letting x change.
LECTURE 11 - PARTIAL DIFFERENTIATION
3
If we had instead picked y = 5 instead of y = 3, how would this
change things? We intersect our surface with the plane y = 5 to get a
different curve. See Figure 4.
Figure 4. Intersecting with y = 5 gives a different curve.
x3
.
G(x) = sin(5x) + cos
100
Now when we take the derivative we calculate,
3
3x2
x
0
G (x) = 5 cos(5x) −
sin
.
100
100
This is certainly a different derivative than what we calculated earlier, but it’s very closely related to our previous derivative. In particular, all of the 3’s that came from y = 3 before are now 5’s, which isn’t
too surprising.
2. Partial Derivatives
In general, we could calculate the derivative of f (x, y) after choosing
y to be any constant we want. Instead of picking a new constant each
time, though, let’s suppose that we don’t pick the constant we want
to plug in for y yet, but instead just keep in mind that y represents
a constant – whatever that constant may happen to be. When we
then differentiate f (x, y), treating y as a constant, we’re calculating
the partial derivative of f (x, y) with respect to x. Notationally this
4
CHRIS JOHNSON
partial derivative is usually denoted
follows:
∂f
∂x
or fx . Formally, it’s defined as
f (x, y0 ) − f (x0 , y0 )
∂f f (x0 + h, y0 ) − f (x0 , y0 )
= lim
= lim
x→x0
∂x (x0 ,y0 ) h→0
h
x − x0
That is, we’re calculate the derivative like normal, but we have this
extra y thrown into our function. In the formula for the derivative
above, though, notice that only x is changing (because of the x + h),
and the y is not: the y is constant.
There’s nothing special about x of course, we could repeat all of the
above by letting y change and keeping x constant. This is the partial
or fy . In
derivative of f (x, y) with respect to y, which is denoted ∂f
∂y
terms of limits,
f (x0 , y0 + h) − f (x0 , y0 )
f (x0 , y) − f (x0 , y0 )
∂f = lim
= lim
y→y
∂y (x0 ,y0 ) h→0
h
y − y0
0
Notice that what we’re doing is keeping one of the variable set to be
a constant, and letting the other variable change. We can then apply
all of our usual calculus rules to determine the partial derivative: just
“pretend” one of the variables is constant.
3
∂f
∂f
x
Example 2.1. Calculate ∂x and ∂y of f (x, y) = sin(xy) + cos 100
.
To calculate ∂f
, just “pretend” that y is constant and apply your
∂x
usual rules from calculus, differentiating with respect to x:
3
3x2
x
∂f
= y cos(xy) −
sin
.
∂x
100
100
To calculate partialf
, repeat the process, but this time pretend x is
∂y
the constant and y the variable:
∂f
= x cos(xy).
∂y
Example 2.2. Calculate both partial derivatives of z = xy + 2xy .
∂z
=yxy−1 + 2xy y ln(2)
∂x
∂z
=xy ln(x) + 2xy x ln(2)
∂y
LECTURE 11 - PARTIAL DIFFERENTIATION
5
3. Higher-Order Partials
Notice that given a function of two variables, f (x, y), both of our
derivatives ∂f
and ∂f
are again functions of x and y, so we can take
∂x
∂y
the partial derivatives again. If f (x, y) = x3 y 2 + cos(xy), then we know
∂f
= 3x2 y 2 − y sin(xy)
∂x
We could then differentiate this derivative once again:
∂
∂x
∂f
∂x
= 6xy 2 − y 2 cos(xy).
This is called a second-order partial derivative of f (x, y), and is denoted
∂ 2f
∂x2
or fxx .
We didn’t just have to take the partial with respect to x there: we
could have taken the partial with respect to y of ∂f
∂x
∂
∂y
∂f
∂x
= 6x2 y − xy cos(xy)
This is another second-order derivative and is denoted
∂ 2f
∂y ∂x
or fxy
We could of course keep doing this, calculating partial derivatives of
our partial derivatives, and the notation extends the way you would
expect:
6
CHRIS JOHNSON
∂ 2f
∂y 2
∂ 2f
∂x ∂y
∂ 3f
∂x3
∂ 3f
∂x2 ∂y
∂ 3f
∂x ∂y ∂x
∂3
∂x ∂y 2
=fyy
=fyx
=fxxx
=fyxx
=fxyx
=fyyx
..
.
When we take three partial derivatives, as in the case of ∂x∂f
2 ∂y where
we first differentiate with respect to y and then differentiate with respect to x two more times, we’ve taken a third-order partial derivative.
If we calculate four partial derivatives, we’ve taken a fourth-order partial derivative, and so on.
Any of these higher-order partial derivatives where we differentiate
with respect to different variables is called a mixed partial derivative.
The second-order mixed partials are
∂
∂x ∂y
and
∂
.
∂y ∂x
Some of the third-order mixed partials are
∂
,
∂x ∂y ∂x
∂
,
∂x2 ∂y
and
∂
.
∂y∂x2
A reasonable question to ask would be how these mixed partial
derivatives are related: Is there any relationship between fxy and fyx ?
This is answered by Clairaut’s theorem.
Theorem 3.1 (Clairaut’s Theorem). If f is defined in a neighborhood
of (x0 , y0 ) and if fxy and fyx are both defined and continuous in this
neighborhood, then fxy (x0 , y0 ) = fyx (x0 , y0 ).
Corollary 3.2. Under all of the assumptions of Clairaut’s theorem,
we can move the order of differentiation around to our heart’s content
LECTURE 11 - PARTIAL DIFFERENTIATION
7
for any n-th order partial derivative:
∂ 4f
∂ 4f
∂ 4f
=
= ··· .
=
∂x2 ∂y 2
∂y∂x2 ∂y
∂x∂y∂x∂y
The assumptions in Clairaut’s theorem will be satisfied for most of
the functions we care about, and so for practical purposes, in this
class fxy = fyx . However, in general, it’s possible to find functions
that do not satisfy the assumptions of Clairaut’s theorem, and in such
situations there’s no guarantee that the partial derivatives agree!
4. Functions of More Than Two Variables
This notion partially differentiating a function of two variables naturally extends to partial derivatives of functions of any number of variables. For a function of three variables, f (x, y, z), for instance, we can
define
∂f
f (x, y, z + h) − f (x, y, z)
= lim
.
h→0
∂z
h
we differentiate like normal, but now pretend that both
To calculate ∂f
∂z
x and y are constants.
Example 4.1. Calculate
∂f
∂z
of f (x, y, z) = x2 y 3 z 4 .
∂f
= 4x2 y 3 z 3 .
∂z
This same idea works for any (finite!) number of variables. If we
have with twenty-six variables, given by the twenty-six letters of the
English alphabet, to differentiate with respect to any one, we treat the
other twenty-five as constant:
∂
∂2
ab c − `5 mu − usin(x) =
−`5 m − sin(x)usin(x)−1
∂` ∂u
∂`
= − 5`4 m