# Partial derivative

## Introduction to partial derivatives[edit | edit source]

This is an image of the function . Hopefully, after you have gotten this far, you have seen functions and graphs of two variables. If you have not, then they are usually in the form F(x,y) in functions and are graphed like the graph above.

The slope of a tangent line of a point will equal the derivative at that point. Unfortunately for us, this 3D graph doesn't have tangent lines; instead, it has tangent planes! We obviously can't find the derivative in the normal sense at any point, for there are infinite different tangent lines we can use. Partial differentiation is the act of choosing one of these lines, and finding the derivative from it.

For example, say we have the point (3,4,-2.191) for our above function. What tangent line should we use? Let's start by using the tangent line that has a constant y value of 4. But how do we even find this derivative? To do this, we will use the graph of a new function with y equal to the constant of 4.

This graph is of the equation . Notice that this graph is a slice of our above graph (with y substituted for z) that contains (3,4,-2.191), and is parallel to the y axis of that graph. The next step; we need to find what the derivative of this graph is at (3,-2.191), and we will know what one of this functions partial derivatives is! So we find the derivative.

TTYS 1- Find the value of the derivative of the above expression at (3,-2.191)

Now, hopefully you got that the answer was -2.829. If you didn't, it means either I screwed up or you screwed up. Maybe someone will change the answer if they know it is incorrect? Ah well. However, if you did get -2.829, congratulations! You have taken your first partial derivative. Now for the fun part. Treat y as a constant, but don't define the constant, and leave it as the letter y; treat x as the variable. Now we find the general function that will create the partial derivative as y remains constant anywhere on the graph. Time for real partial derivatives!

TTYS 2- I love using these. They mean I can leave out redundant information, such as the way you can find the partial derivative of the function xsin(x)+ysin(y) as you leave y constant. Hmm ha ha.

Now, hopefully again, you got the general partial derivative of this function as you leave y constant as xcos(x)+sin(x). If you did, congratulations! You now can basically find the partial derivative of anything if you leave y constant. But what if you leave x constant.

TTYS 3- Find the partial derivative of the previous expression, only leaving x constant this time.

The answer; cos(y)-ysin(y). Now you have two partial derivatives to choose from; the one where you leave x constant, and the one where you leave y constant.

TTYS 4- Find the partial derivatives of xsin(y)+ycos(x).

The partial derivatives of the previous expression are, leaving x constant, xcos(y)+cos(x)(Remember to treat x as a constant!) and, leaving y constant, sin(y)-ysin(x). Think you have a handle on this? Now for notation!

## Notation of Partial derivatives[edit | edit source]

For a function F(x,y), the partial derivative with respect to x (use this wording from now on as opposed to "leaving y constant") can be written as

Likewise, the partial derivative with respect to y can be written as

## Second partial derivatives; partial derivatives of more than two variables[edit | edit source]

The second partial derivative is not that hard to understand; it's just like the regular second derivative of one-variable functions.

Suppose. Then

To find the second derivative of f(x,y), you only need to take the partial derivative of its partial derivative. So,

## Partial derivative chain rules[edit | edit source]

Say we have a function, f(x,y,z). Then it can be shown that

df is said to be the "total differential" because it takes into account not only changes in x, as would , but also changes in y and z. That is, if we move dx in the x direction, dy in the y direction, and dz in the z direction, we know that the function will approximately change by df. When dx, dy, and dz become smaller, df approaches the actual value . One caveat is that the partial derivatives must be continuous. As far as physics goes, this is usually not a problem. Notice also that if f is a function of n variables, the chain rule extends in the obvious way.

Now, let us examine several special cases of the chain rule.

If x, y, and z are all functions of t, then the chain rule becomes

.

Although you can think of this as simply dividing by dt, it is not. It is obtained through methods beyond the scope of this physics-oriented calculus class. You should recognize it, however, as a special case of the chain rule with x, y, and z as functions of two variables (or n variables, but n variables should be clear from the case n=2).

.

We could follow the same pattern and write but we will take the convention that the partial derivative with respect to a variable automatically assumes that the other *explicitly appearing* variables are constant. Using this convention,

.

Now, for the more tricky case, suppose we have f(x, y(x), z(x)) (the same techniques used here will apply to anything similar). Let's apply the chain rule to find the total derivative of f with respect to x, including changes that occur through y and z.

Notice that you can obtain this by dividing the differential form of the chain rule by dx. But this does not always work, so beware.

Let's consider one final case, if we have f(x, y, z(x,y))

.

Putting the subscripts to indicate what is held constant is absolutely critical here. I put in the subscripts on the first term on the right-hand side for emphasis. The left-hand side is the derivative of f(x,y), with z having been replaced by something in terms of x's and y's, which is the whole point of the chain rule in the first place. Notice that if I accidentally omitted the subscript on the left, then it would cancel with the term on the right, and leave me with a horribly wrong answer. Also notice that the derivative with respect to y disappeared on the right, that is because the partial derivative of y with respect to x is zero since we assumed them to be independent.

When working with partial derivatives, you should never cancel them or treat them as fractions. When in doubt, apply the chain rule, not intuition. Also, it may be helpful to check your answers, as well as the results here, concrete examples.