The pressure of a gas depends on its volume and on its temperature at the same time, and the calculus of one variable, built for a quantity that depends on a single number, has no way to ask how that pressure changes when both are free to move.
The previous course was about : one input, one output, a curve with one slope at each point. Almost nothing measured in a laboratory, a factory or a weather station behaves like that. This lesson sets up the objects the rest of this course differentiates and integrates, shows three ways of looking at them, and ends on the precise reason the old machinery breaks. It assumes Calculus I and nothing about vectors or three dimensional geometry.
One output, several inputs
A function of two variables is a rule that takes an ordered pair of real numbers and returns one real number, written . The pair is best thought of as a single input, a point in the plane, because the question will always be what happens as the point moves. A function of three variables takes a point , and so on.
The ideal gas law is the standard example. For moles of gas at absolute temperature in a volume , the pressure is
with joules per mole per kelvin. One mole at the freezing point of water, K, in a volume of cubic metres, has Pa, which is within a tenth of a percent of the standard atmosphere of Pa.
Economics has the same shape. In 1928 the mathematician Charles Cobb and the economist Paul Douglas fitted index numbers for American manufacturing from 1899 to 1922, labour and capital , to a production function of the form
and found that it tracked the actual output index closely for all twenty four years. The exponents add to , which has a checkable meaning: doubling both inputs gives , so doubling the factory doubles its output.
Weather forecasts supply a third. Since November 2001 the weather services of Canada and the United States have reported a wind chill index computed from the air temperature in degrees Celsius and the wind speed in kilometres per hour measured at ten metres:
The output is the temperature which, in near-calm air, would draw heat from exposed skin at the same rate. It is a fitted model of heat loss from a human face, not a law of nature.
Example. Find the wind chill at with a wind of .
First . Then the four terms are , , and . Their sum is . A thermometer reading of °C in a 30 km/h wind feels like °C.
Now you. Find the wind chill at with , to one decimal place.
Answer
Here , and the terms are , , and , which sum to . The air is degrees colder than in the example and the wind is lighter, and the second effect recovers only a little of the first.
Where a function is defined
A function of two variables is defined on a set of points in the plane, its domain, and domains in the plane come in far more shapes than intervals on a line.
When a formula is given without comment, the domain is taken to be every point where the formula makes sense. For the square root needs , and since is the square of the distance from the origin, the domain is the disc of radius centred there, boundary circle included. For the logarithm needs , which is every point strictly below the line : a half-plane, with its edge excluded. And is defined everywhere except the single point , a hole of a kind that has no counterpart on the real line, because a point in the plane can be approached from every direction at once. A later lesson shows that this particular hole cannot be filled.
Physical models add restrictions the algebra does not see. The gas law makes sense only for and , but it is also only accurate where the gas is dilute: squeeze carbon dioxide hard enough at room temperature and it liquefies, while the formula carries on regardless. The wind chill formula is published with the conditions and attached, because outside them the underlying experiment says nothing. The honest domain of a model is where it was tested.
Graphs are surfaces
The graph of needs two axes, one for the input and one for the output. A function of two variables needs three. Its graph is the set of points with , drawn with the and axes flat on a table and the axis pointing up, so that above each point of the domain there is exactly one point of the graph, at height . Those points form a surface, lying over the domain the way a landscape lies over a map.
Take . The height at each point is its squared distance from the origin, so all points at distance sit at height . The surface is a bowl called a paraboloid, flat at the bottom and steepening outwards. Take instead , defined on the disc of radius . Squaring gives , which says every point of the graph is at distance from the origin in space, and since the graph is the upper half of a sphere, a dome sitting on its domain.
The most useful trick for handling a surface is to slice it. Fixing cuts the surface with a vertical plane, and what remains is the curve , an ordinary function of the single variable called a trace. The paraboloid sliced at gives , a parabola lifted by . The dome sliced at gives , a semicircle. Every trace is a problem from the previous course.
The wind chill surface shows how different the traces in two directions can be. Hold the wind at and the formula collapses to : a straight line, saying that in that wind every degree of real cooling feels like degrees. Hold the temperature at instead and , a curve that falls steeply for light winds and flattens for strong ones, since going from to km/h costs degrees of wind chill and going from to costs only . One surface, straight when walked one way and bent when walked the other.
Level curves
The second way of looking at a surface slices it horizontally instead. The level curve of at height is the set of points in the domain where : cut the surface at height and drop the cut onto the input plane. Drawing several level curves for equally spaced values of , each labelled with its value, gives a picture of the whole function using only two dimensions.
For the paraboloid the level curve is a circle of radius . At the radii are , , and , so the circles crowd together further out. That crowding is the steepening of the bowl: the height rises by the same step between each pair of circles, and it does so over shorter and shorter distances.
Level curves have been reinvented in every subject that needed them. Temperature as a function of volume and pressure, , has level curves , the hyperbolas Robert Boyle measured in 1662 and physicists still call isotherms. Meteorologists draw isobars of equal pressure. Economists draw isoquants, the combinations of labour and capital giving equal output. Cartographers draw contours. The mathematics is the same in every case: a curve along which the function does not change.
For the Cobb-Douglas function the isoquant at output can be solved explicitly. Write , so that , and raise both sides to the fourth power to get , that is . Along an isoquant, capital must rise as the cube of the fall in labour.
Example. A plant with Cobb-Douglas production runs at , . If labour is halved, how much capital keeps output the same?
The current output is , so and the isoquant is . At that is . Halving labour needs eight times the capital, the factor that predicts without computing at all.
Now you. The same plant runs at , . If labour is cut to , how much capital keeps output the same?
Answer
Now , and the isoquant is . At this gives . Labour fell by a factor of , so capital rose by , from to .
Reading a contour map
Contour lines on maps have a mathematical origin. Charles Hutton, reducing the survey of the Scottish mountain Schiehallion made for Nevil Maskelyne's 1774 experiment to weigh the Earth, needed the volume of the mountain and had a mass of spot heights to organise; joining points of equal height turned the numbers into a picture, and his report of 1778 is often credited with the first contours of land relief. A walker's map is a level-curve diagram of height above sea level.
The Ordnance Survey's 1:50,000 Landranger maps of Great Britain draw contours every metres, and at that scale one millimetre on the paper is metres on the ground. Count the contour gaps crossed along a route to get the rise, measure the route on the map to get the run, and divide. Closely packed contours mean a steep slope, widely spaced ones a gentle slope, and walking along a contour means not climbing at all.
Example. On a Landranger map a path crosses five contour gaps in mm of paper. What is its average gradient, and at what angle does it climb?
The rise is metres and the run is metres, so the gradient is , a slope of one in four. The angle is degrees.
Now you. A route crosses eight contour gaps in mm on the same map. Find the gradient and the angle.
Answer
The rise is metres and the run is metres, so the gradient is and the angle is degrees.
Why one variable is not enough
The contour map already says what goes wrong. On a hillside the steepness depends on which way you walk: straight up the fall line it is greatest, along the contour it is zero, and every compass bearing in between gives something else. A function of one variable has one line through each point to move along; a function of two variables has a slope in every direction.
The paraboloid at the point , where , makes this quantitative. Step a distance due east, to , and the difference quotient is . Step due north instead and it is . Step directly away from the origin, east and north, and it is . Step along the level circle through the point, west and north, and it is , heading for zero. Four directions, four limits, , , and , and there are infinitely many more.
The same thing happens with the gas. At K and cubic metres, warming one mole by a kelvin raises the pressure by Pa, while adding a litre of volume lowers it by Pa. Doing both at once lowers it by Pa, close to the sum of the two separate changes, a hint that the separate rates may be enough to recover the rest.
So the derivative of the previous course cannot be reused as it stands. Its difference quotient divided a change in output by a change in input, and here the input change is a step in the plane with both a length and a direction. The limit is affected too: at the hole in the origin can be approached along infinitely many lines and curves, not just from the left and from the right. And the graph is a surface, so whatever replaces the tangent line must be a plane.
Every one of those needs geometry the previous course never built: distance between points in space, directions described by numbers, and equations for planes. That is the work of the next lesson, which sets up vectors in three dimensions.