Differentiate again
For , the first partial derivatives are and . Each is again a function of x and y: 2xy has a value at every point of the plane, and it changes from point to point.
So a partial derivative can be differentiated again, in x or in y. The results are the second partial derivatives. With two variables and two choices each time, there are four of them.
Twice in the same variable
Differentiate in x again, holding y constant: the result is 2y. This is written , and it measures how the slope in the x direction changes as you move in the x direction. It plays the part of the second derivative of the slice.
At y = 2 the slice of is , whose second derivative is 4. And at y = 2, as it should be.
Twice in y: has no y in it, so . Every slice with x held constant is a straight line, , so its gradient never changes as y changes.
Once in each
Now differentiate in y, holding x constant: the result is 2x. This is a mixed second partial derivative, written . Read the bottom from the right: first , then .
It measures how the slope in the x direction changes as you move in the y direction. At x = 1 the x-slope 2xy is 2 when y = 1, 4 when y = 2 and 6 when y = 3: it rises by 2 for each unit of y, and there.
The other mixed derivative takes the other order: differentiate in x to get . The two mixed derivatives agree here, and they agree for almost every function you will meet.
The x-slope of , , plotted upward against x, with y held at 1 and 3 (dashed) and at 2 (gold). Each line has gradient 2y, which is . At x = 1 the lines are at heights 2, 4 and 6, one step of 2 apart for each unit of y, which is .
All four for one function
Take . The first partial derivatives are and .
Twice in x: . Twice in y: . Mixed: differentiated in y gives , and differentiated in x gives as well.
At (1, 2) the four are 6 × 1 × 4 = 24, then 2 × 1 = 2, then 6 × 1 × 2 = 12 for each mixed one. Second differences with a step of 0.001 at (1, 2) give the same four values to within 0.00001.
The usual mistakes
Stopping after one differentiation. For , asks for two: , then 18x.
Reading as the square of . For at (1, 2), and its square is 16, but .
Holding the wrong variable constant on the second step. In the second differentiation is in y, so x is the constant then, even though y was the constant on the first step.
A cooling rod
In the application below, the temperature u along a steel rod depends on the distance x along it and the time m. The heat equation compares with , and the two turn out to be multiples of the same function.
Worked example: A Steel Rod Cooling With Its Ends in Ice: Checking the Heat Equation, and How Fast Its Middle Cools
Question A steel rod 100 centimeters long has both ends held in ice at 0°C. The temperature at the point x centimeters from one end, m minutes after the rod is set up, is modeled by u(x, m) = 80e−0.01msinπ x100 degrees Celsius. (a) Find ∂ u∂ m and ∂2 u∂ x2, and find the constant k for which u satisfies the heat equation ∂ u∂ m = k∂2 u∂ x2. This k is the thermal diffusivity of the steel, in square centimeters per minute. (b) Find the rate at which the middle of the rod is cooling at the start, and the time at which it is cooling at half that rate. What is its temperature then?
1.(a) Differentiate with respect to m, holding x constant, so that sinπ x100 is a constant factor: ∂ u∂ m = 80 × (−0.01)e−0.01msinπ x100 = −0.8e−0.01msinπ x100.
(a) At the start the rod is 80°C at the middle and 0°C at the ends. Differentiating in m with x held constant gives the rate at which each point cools. 2.Differentiate twice with respect to x, holding m constant. The first derivative is ∂ u∂ x = 80 × π100e−0.01mcosπ x100, and the second is ∂2 u∂ x2 = −80 × π210000e−0.01msinπ x100 = −π2125e−0.01msinπ x100.
Differentiating twice in x with m held constant measures how the profile bends. It bends downward all along the rod: each point is hotter than the average of the points on either side of it. 3.Both derivatives are multiples of e−0.01msinπ x100, so the heat equation holds at every point and every time when −0.8 = −π2125k, that is k = 0.8 × 125π2 = 100π2 ≈ 10.1 square centimeters per minute. The second derivative is negative all along the rod, so every point is cooling.
The two derivatives differ only by a constant factor, so the heat equation holds with k = 100π2 ≈ 10.1 square centimeters per minute. 4.(b) At the middle, x = 50 and sinπ2 = 1, so ∂ u∂ m = −0.8e−0.01m. At the start, m = 0, the middle is cooling at 0.8°C per minute.
(b) At the start the middle is cooling at 0.8°C per minute. 5.It cools at half that rate, 0.4°C per minute, when e−0.01m = 0.5, so −0.01m = ln 0.5 and m = 100ln 2 ≈ 69.3 minutes. The temperature of the middle is then 80 × 0.5 = 40°C. Check: at the middle ∂ u∂ m = −0.01u, and 0.01 × 40 = 0.4°C per minute.
After 100ln 2 ≈ 69.3 minutes the whole profile has halved: the middle is at 40°C and cooling at 0.4°C per minute.
Answer: (a) ∂ u∂ m = −0.8e−0.01msinπ x100 and ∂2 u∂ x2 = −π2125e−0.01msinπ x100, so the heat equation holds with k = 100π2 ≈ 10.1 square centimeters per minute; (b) 0.8°C per minute at the start, and half that after 100ln 2 ≈ 69.3 minutes, when the middle is at 40°C
Common mistakes
- Differentiating sinπ x100 as cosπ x100 and dropping the factor π100 that the chain rule brings. It appears once in each of the two differentiations, so the second derivative carries π210000.
- Assuming the middle keeps cooling at 0.8°C per minute, and so is cooling at half the rate after 50 minutes. The rate is 0.01 times the temperature, so it falls as the rod cools, and the rate halves only after 69.3 minutes.