Partial Derivatives

Stage 21 of 23 Strand 2 of 2 11 lessons

11 illustrated lessons, each teaching the why before the how.

Revise Partial Derivatives with flashcards →

Jump to a lesson

The Partial Derivative

Hold every variable but one still.

Hold every variable but one constant, and differentiate as usual

A surface has no single slope: it depends on which direction you set off walking.

Fix y and walk only in the x direction. That slice is an ordinary curve again.

That slope is the partial derivative ∂f/∂x: differentiate in x, holding y constant.

Now you

f = 4x + y. What is ∂f/∂x?

f = 2x + y. What is ∂f/∂x?

Computing Partial Derivatives

Every ordinary rule still applies.

Every ordinary rule still applies, with the other variables treated as constants

Differentiate with respect to x: y is held constant and stays as a factor.

Differentiate with respect to y: is the constant factor, and y differentiates to 1.

A term that does not contain the variable you differentiate with respect to is a constant, so it vanishes.

Now you

f = x² + 6y. What is ∂f/∂x?

f = 3x²y. What is ∂f/∂y?

Higher Partial Derivatives

Differentiate again, in either variable.

Partial derivatives can be differentiated again, in either variable

A partial derivative is itself a function of both variables, so it can be differentiated again.

Differentiating twice in x measures how the slope in x changes as you move in x.

Differentiate once in each and you measure how the slope in x changes as you move in y.

Now you

f = 4x³. What is ∂²f/∂x²?

f = 3x³. What is ∂²f/∂x²?

The Mixed Derivative Theorem

x then y or y then x: the same answer.

For a well-behaved function the order of mixed partial differentiation makes no difference

Differentiate in x then y, or in y then x, and the answer comes out the same.

Try it: 2xy³ differentiated in y, and 3x²y² differentiated in x, both give 6xy².

It holds whenever the mixed partials are continuous, which is nearly always.

Now you

f = x³y³. What is ∂²f/∂x∂y?

f = x²y³. Is ∂²f/∂x∂y equal to ∂²f/∂y∂x?

The Chain Rule for Partial Derivatives

Both variables depend on time, so both count.

When both variables depend on time, each one contributes its own term to the change

If x and y both change with time, z changes because of both of them at once.

Add one term per variable: the partial derivative of z, times how fast that variable changes.

With only one variable this reduces to the ordinary chain rule.

Now you

Each term multiplies ∂z/∂x by

dz/dt =

The Gradient Vector

Collecting the partial derivatives into a vector.

The two partial derivatives form a vector that points straight uphill

Put the two partial derivatives side by side and you have a vector at every point.

That gradient vector points in the steepest uphill direction from where you stand.

Its length is how steep that climb is, so the gradient carries direction and steepness.

Now you

f = 6x + 2y. What is ∇f?

f = 3x + 5y. What is ∇f?

Directional Derivatives

Project the gradient onto your direction.

The slope in any direction is the gradient projected onto that direction

Walking sideways across a hill is gentler than walking straight up it.

Step a in x and b in y: each part is multiplied by its own partial derivative, and the two add.

The dot product of the gradient with a unit vector gives the slope in that direction.

At right angles to the gradient the slope is zero — that is why contours are level.

Now you

∇f = (15, 20) 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

Tangent Planes

The flat plane fitted at one point.

A surface has a tangent plane where a curve has a tangent line

A curve is approximated near a point by its tangent line.

A surface is approximated near a point by a flat plane resting on it.

The two partial derivatives give the tilt in each direction, and that fixes the plane.

Now you

A tangent plane is fixed by

A tangent plane is built at

Stationary Points of a Surface

Flat only when both partials vanish.

A stationary point is a place where both partial derivatives are zero

Level means level in both directions at once, so both partial derivatives must be zero.

That can be the bottom of a bowl, the top of a dome — or neither of them.

A saddle is level too, yet it rises one way and falls the other: neither a maximum nor a minimum.

Now you

A surface is stationary where

Rising in x and falling in y at a level point is a

Lagrange Multipliers

At the constrained best, gradients line up.

At a constrained maximum or minimum the two gradient vectors must line up

Find the smallest value of f, but only along a fixed path — a constraint.

If the two gradients pointed different ways, you could still improve f by sliding along the path.

So at the best point the two gradients must be parallel, differing only by a multiplier λ.

Now you

At a constrained optimum, ∇f and ∇g are

The λ in ∇f = λ∇g is called the

The Volume Under a Surface

Stack the slices twice.

Integrating the slice areas a second time stacks them into the volume under a surface

Under a curve the slices made an area. Under a surface the slices make a volume.

Cut the solid at a fixed y: the face is an area under a curve, A(y) = ∫ f(x, y) dx.

Stack the slice areas along y: V = ∫ A(y) dy — an integral of integrals, two signs.

The inner integral is ordinary integration in x, and the outer one repeats it in y.

Now you

The double integral is written as

Each fixed-y slice of the solid is

Continue your journey in the app — save your progress