Partial Differentiation
☰ Contents
Profit depends on price and on how many are sold, so it is a function of two variables. Partial differentiation is calculus for functions like these. Every rule of ordinary differentiation still applies. What changes is the geometry: the graph is a surface, and a surface has a different slope in each direction.
What is a function of two variables?
A function of two variables takes a pair of numbers (x, y) and gives back one number, written f(x, y). The input is a point in a plane, not a position on a line, and the output is a height above that point. So the graph is a surface. See Functions of two variables and Surfaces in three dimensions.
A level curve is a slice of the surface at one fixed height. Cut the bowl at height 4 and the slice is the circle , which has radius 2. See Level curves.
Do limits still work with two variables?
Yes. On a line there are two ways to approach a point. On a plane there are infinitely many paths in, and the limit must give the same value along every one of them.
Two paths that give different values prove there is no limit. Two paths that agree prove nothing. See Limits of functions of two variables.
Continuity means the same as it did for one variable: the limit at a point exists and equals the value of the function there. See Continuity in two variables.
What is a partial derivative?
A partial derivative is the rate of change of f in one direction, with the other variable held constant. To find , treat y as a constant and differentiate with respect to x as usual. The symbol is used instead of d to show that other variables exist and are being held constant. See The partial derivative.
No new rules are needed. The usual rules apply, with the other variables treated as numbers. A term that does not contain your variable is a constant, so its derivative is 0. See Computing partial derivatives.
Let . Then , because y is a constant factor and is a constant. And , because is a constant factor and differentiates to .
What about second derivatives?
A partial derivative is itself a function of x and y, so it can be differentiated again. There are four second partial derivatives: twice in x, twice in y, x then y, and y then x. The last two are the mixed partial derivatives. See Higher partial derivatives.
The mixed derivative theorem says the order does not matter, provided both mixed partials are continuous. Take . Then , and differentiating that in y gives . Also , and differentiating that in x gives . See The mixed derivative theorem.
Now you
. What is ?
. Is equal to ?
Lesson complete. Continue in the app — your progress saves there.
How does the chain rule work here?
Suppose x and y both depend on time t. Then z = f(x, y) changes because x is changing and because y is changing. The total rate of change adds one term per variable: the partial derivative of z with respect to that variable, times how fast it changes.
.
Draw the dependence as a tree, multiply along each branch, then add the branches. With one variable there is one branch, and the formula is the ordinary chain rule. See The chain rule for partial derivatives.
What is the gradient vector?
The gradient vector has the two partial derivatives as its components: . At each point it points in the direction of steepest ascent, and its length is the slope in that direction. See The gradient vector.
The slope in any other direction is a directional derivative. To find it, take the dot product of the gradient with a unit vector pointing in that direction. At right angles to the gradient the dot product is 0, so the slope is 0. That is why the gradient is perpendicular to the level curve through the point. See Directional derivatives.
The flat plane that rests on a surface at a point is the tangent plane. The two partial derivatives give its tilt in the x and y directions, and that fixes it. See Tangent planes.
Now you
and the unit step u = (0.6, 0.8). What is the slope along u?
Walking at right angles to the gradient, the slope is
Lesson complete. Continue in the app — your progress saves there.
How do you find maxima and minima on a surface?
A stationary point is a point where the surface is level in both directions at once, so both partial derivatives are 0. Solve and together to find them.
Then classify each one. A saddle point is level too, yet it rises in one direction and falls in another, so it is neither a maximum nor a minimum. Because a saddle is possible, the second-derivative test in two variables uses all three second partial derivatives. See Stationary points of a surface.
| What the test shows | What the point is |
|---|---|
| Curving up in every direction | Local minimum |
| Curving down in every direction | Local maximum |
| Up one way, down another | Saddle point |
Now you
A surface is stationary where
. Where is it stationary?
Lesson complete. Continue in the app — your progress saves there.
What if the variables are constrained?
Often the variables must satisfy a condition, called a constraint. Write the constraint as g(x, y) = 0 and look for the largest or smallest value of f along that curve.
If the gradient of f pointed across the curve at an angle, you could still move along the curve and increase f. So at the best point, the gradient of f is parallel to the gradient of g. The method of Lagrange multipliers turns that into equations: set , and solve the two component equations together with g = 0. The number measures how much the optimum changes when the constraint is loosened by one unit. See Lagrange multipliers.
How do you integrate over a surface?
Integrate twice, once in each variable.
First hold y constant and integrate in x, which gives the area of one cross-section, . Then integrate those areas in y: . The inner integral treats y as a constant, the same discipline as a partial derivative. See The volume under a surface.
The mistakes worth naming
- Differentiating every variable at once. A term without your variable differentiates to 0.
- Expecting one number for the slope. The slope depends on direction, which is why the gradient is a vector.
- Believing a limit exists because two paths agree. The limit must be the same along every path in.
- Calling every stationary point a maximum or minimum. A saddle point makes both partial derivatives 0 and is neither.
- Substituting the constraint into f before forming the Lagrange equations. Take the gradients of the original f and g, then solve them together with the constraint.
Learn this properly in the app
Each lesson linked above is in Math Challenge. The single-variable rules that carry over are in the rules of differentiation, the optimization ideas are in applications of differentiation, and the vector language is in vectors.
Your turn
Three to try — tap what you get.
∂/∂x of x²y
∂/∂y of x²y
Taking ∂f/∂x, you treat y as
0 of 0 right on this page
Practice this lesson in the appThat is every question on this page.
0 of 0 right. Best run: 0 in a row.
The app carries on from here: practice that adapts to you, the full lesson ladder, and your progress saved.
Keep going in the app