This University multivariable calculus revision notes is written for pupils aged 18-19. In short, it shows you how to use partial derivatives, optimisation and double integrals. Before you start, it helps to revise vector spaces and linear maps and eigenvalues and eigenvectors, because this lesson builds on them.
University multivariable calculus revision notes: what you will learn
Multivariable calculus extends differentiation and integration to functions of several variables. Moving through the plane can happen in many directions, so derivatives become vector objects.
Starter activity
On a hiking map, contour lines are drawn every 10 metres of height. Imagine you stand on a contour line. In which direction would you walk to stay at the same height? In which direction would you climb most steeply? What do closely spaced contours tell you? Draw a sketch map of a hill with a pass between two summits and mark where you think the flat points are.
Functions of several variables
Definition: surface and level curve
A function \(f:\mathbb R^2\to\mathbb R\), \(z=f(x,y)\), has as graph a surface in \(\mathbb R^3\). Level curves \(f(x,y)=c\) are slices at constant height and are drawn on contour maps.
Partial derivatives
Definition: partial derivative
The partial derivative \(f_x=\frac{\partial f}{\partial x}\) differentiates with respect to \(x\) treating \(y\) as a constant; similarly \(f_y\). Second derivatives are \(f_{xx},f_{xy},f_{yx},f_{yy}\).
Theorem: Clairaut's theorem
If the second partials are continuous then \(f_{xy}=f_{yx}\).
Example 1
Find the first partials of \(f=x^2y+3y^3\), and \(f_{xy}\) for \(f=\sin(xy)\).
\(f_x=2xy\) and \(f_y=x^2+9y^2\). For \(\sin(xy)\): \(f_x=y\cos(xy)\), and \(f_{xy}=\cos(xy)-xy\sin(xy)\), which equals \(f_{yx}\).
Gradient, directional derivative and tangent plane
Definition: gradient and directional derivative
The gradient is \(\nabla f=(f_x,f_y)\) (or \((f_x,f_y,f_z)\)). The directional derivative in the direction of a unit vector \(\mathbf u\) is \(D_{\mathbf u}f=\nabla f\cdot\mathbf u\).
Property: meaning of the gradient
The gradient points in the direction of steepest ascent, its length is the maximum rate of change, and it is perpendicular to level curves.
Rule: tangent plane
The tangent plane to \(z=f(x,y)\) at \((a,b)\) is \(z=f(a,b)+f_x(a,b)(x-a)+f_y(a,b)(y-b)\).
Example 2
For \(f=x^2y\) at \((1,2)\) find \(D_{\mathbf u}f\) in the direction \(\frac15(3,4)\). Then find the tangent plane to \(z=x^2+y^2\) at \((1,1)\).
\(\nabla f=(2xy,x^2)=(4,1)\), so \(D_{\mathbf u}f=\frac{12+4}5=\frac{16}5\). The tangent plane is \(z=2+2(x-1)+2(y-1)=2x+2y-2\).
The chain rule
Rule: chain rule
If \(z=f(x,y)\) with \(x=x(t)\), \(y=y(t)\) then \(\dfrac{dz}{dt}=f_x\dfrac{dx}{dt}+f_y\dfrac{dy}{dt}\).
Example 3
Find \(\dfrac{dz}{dt}\) for \(z=x^2y\), \(x=t^2\), \(y=t^3\).
\(\frac{dz}{dt}=2xy\cdot2t+x^2\cdot3t^2=4t^6+3t^6=7t^6\), matching the direct computation \(z=t^7\).
Optimisation
Rule: second derivative test for two variables
At a local extremum \(\nabla f=\mathbf 0\) (a critical point). Let \(D=f_{xx}f_{yy}-f_{xy}^2\) at the point. If \(D>0\) and \(f_{xx}>0\): local minimum. If \(D>0\) and \(f_{xx}<0\): local maximum. If \(D<0\): saddle point. If \(D=0\): inconclusive.
Method: classifying critical points
- Solve \(f_x=0\) and \(f_y=0\) together.
- Compute \(f_{xx}\), \(f_{yy}\), \(f_{xy}\).
- Evaluate \(D\) at each critical point.
- Apply the test and state the value of \(f\).
Example 4
Classify the critical points of \(f=x^3+y^3-3xy\).
\(\nabla f=(3x^2-3y,\ 3y^2-3x)=\mathbf 0\) at \((0,0)\) and \((1,1)\). The Hessian is \(\begin{pmatrix}6x&-3\\-3&6y\end{pmatrix}\): \(D=-9<0\) at the origin (saddle), and \(D=27>0\) with \(f_{xx}=6>0\) at \((1,1)\) (local minimum, value \(-1\)).
Rule: Lagrange multipliers
To optimise \(f\) subject to \(g(x,y)=c\), solve \(\nabla f=\lambda\nabla g\) together with the constraint.
Example 5
Maximise \(xy\) subject to \(x+y=10\). Then find the extremes of \(x+y\) on \(x^2+y^2=1\).
First: \(y=\lambda\), \(x=\lambda\), so \(x=y=5\) and the maximum is 25. Second: \((1,1)=\lambda(2x,2y)\) gives \(x=y=\pm\frac1{\sqrt2}\), with extreme values \(\pm\sqrt2\).
Double integrals
Definition: double integral
\(\iint_Rf\,dA\) is the volume under \(z=f\) above the region \(R\). It is computed as an iterated integral.
Method: double integrals
- Sketch the region \(R\).
- For a rectangle the limits are constants; otherwise the inner limits depend on the outer variable.
- If the inner integral is impossible, reverse the order of integration.
- For circular regions use polar coordinates \(x=r\cos\theta\), \(y=r\sin\theta\), \(dA=r\,dr\,d\theta\).
Example 6
Evaluate \(\int_0^1\int_0^x(x+y)\,dy\,dx\) and \(\int_0^1\int_y^1e^{x^2}dx\,dy\).
First: \(\int_0^1\tfrac32x^2dx=\tfrac12\). Second: reverse the order, \(\int_0^1\int_0^xe^{x^2}dy\,dx=\int_0^1xe^{x^2}dx=\frac{e-1}2\).
Example 7: polar coordinates
Integrate \(x^2+y^2\) over the disc of radius 2.
\(\int_0^{2\pi}\int_0^2r^3dr\,d\theta=8\pi\). Similarly \(\iint_{\mathbb R^2}e^{-(x^2+y^2)}dA=\pi\), which proves \(\int_{-\infty}^\infty e^{-x^2}dx=\sqrt\pi\).
Watch out
- Forgetting the factor \(r\) in polar coordinates.
- Using a non-unit vector in a directional derivative.
- Misreading the sign of \(D\), or mixing up the order of limits in iterated integrals.
Surfaces, gradients and integrals
Key fact: reading a contour map
Level curves, also called contour lines, join the points where a function takes the same value. On a hiking map they join points at equal height. The gradient vector \(\nabla f\) is always perpendicular to the level curve through the point, and it points in the direction in which \(f\) increases fastest. Where level curves are close together, \(|\nabla f|\) is large and the surface is steep; where they are far apart, the surface is gentle. A critical point appears on the map as the centre of a closed loop (a local maximum or minimum) or as the crossing of two families of curves (a saddle, like the middle of a mountain pass).
Method: classifying critical points of f(x, y)
- Solve \(f_x=0\) and \(f_y=0\) together to find the critical points.
- Compute \(f_{xx}\), \(f_{yy}\) and \(f_{xy}\), and form \(D=f_{xx}f_{yy}-f_{xy}^2\) at each critical point.
- If \(D>0\) and \(f_{xx}>0\) the point is a local minimum; if \(D>0\) and \(f_{xx}<0\) it is a local maximum; if \(D<0\) it is a saddle point.
- If \(D=0\) the test fails and you must examine the function near the point directly.
- For a closed region, also compare the values on the boundary.
Worked example 8: A tangent plane and a linear approximation
Use a tangent plane to estimate \(\sqrt{(3.02)^2+(3.98)^2}\).
Take \(f(x,y)=\sqrt{x^2+y^2}\) near \((3,4)\), where \(f=5\). The partial derivatives are \(f_x=\dfrac xf=0.6\) and \(f_y=\dfrac yf=0.8\). The linear approximation is \(f\approx5+0.6(0.02)+0.8(-0.02)=5-0.004=4.996\). The exact value is \(4.99596\), so the tangent plane gives an excellent estimate when the displacement is small.
Worked example 9: The chain rule with two parameters
Let \(z=x^2y\) with \(x=s+t\) and \(y=st\). Find \(\dfrac{\partial z}{\partial s}\) at \(s=1\), \(t=2\).
The chain rule gives \(\dfrac{\partial z}{\partial s}=z_x\dfrac{\partial x}{\partial s}+z_y\dfrac{\partial y}{\partial s}=2xy\cdot1+x^2\cdot t\). At \(s=1\), \(t=2\) we have \(x=3\) and \(y=2\), so the value is \(2\cdot3\cdot2+9\cdot2=12+18=30\). As a check, \(z=(s+t)^2st\), and differentiating directly with respect to \(s\) gives \(2(s+t)st+(s+t)^2t=2\cdot3\cdot2+9\cdot2=30\).
Worked example 10: Finding the absolute maximum on a closed region
Find the absolute maximum and minimum of \(f=x^2+y^2-2x\) on the square \(0\le x\le2\), \(0\le y\le2\).
Inside the square, \(f_x=2x-2=0\) and \(f_y=2y=0\) give the point \((1,0)\), which is on the boundary. We therefore check the four edges. On \(y=0\): \(f=x^2-2x\) with minimum \(-1\) at \(x=1\) and values \(0\) at \(x=0,2\). On \(y=2\): \(f=x^2-2x+4\) with minimum \(3\) and maximum \(4\). On \(x=0\): \(f=y^2\), from \(0\) to \(4\). On \(x=2\): \(f=y^2\), from \(0\) to \(4\). The absolute minimum is \(-1\) at \((1,0)\) and the absolute maximum is \(4\), attained at \((0,2)\) and \((2,2)\).
Worked example 11: Volume under a surface
Find the volume of the solid under \(z=xy\) over the rectangle \(0\le x\le2\), \(1\le y\le3\).
The volume is the double integral \(\int_1^3\int_0^2xy\,dx\,dy\). The inner integral gives \(\left[\dfrac{x^2}2y\right]_0^2=2y\), and the outer integral gives \(\int_1^3 2y\,dy=\left[y^2\right]_1^3=9-1=8\). Because the limits are constants and the integrand factorises, the double integral equals the product \(\left(\int_0^2x\,dx\right)\left(\int_1^3y\,dy\right)=2\times4=8\).
Worked example 12: Changing to polar coordinates
Find the area of the region inside the circle \(r=2\) but outside the circle \(r=1\).
The area element in polar coordinates is \(dA=r\,dr\,d\theta\). So the area is \(\int_0^{2\pi}\int_1^2r\,dr\,d\theta=2\pi\left[\dfrac{r^2}2\right]_1^2=2\pi\left(2-\dfrac12\right)=3\pi\). This agrees with \(\pi\cdot2^2-\pi\cdot1^2=3\pi\). Always remember the extra factor \(r\): forgetting it is the most common error in polar integrals.
Note: partial derivatives and units
Partial derivatives have units: if \(P\) is output in tonnes and \(L\) is labour in hours, then \(\partial P/\partial L\) is in tonnes per hour. Writing the units is a good check on a modelling answer. It also reminds you that a partial derivative answers a precise question: how fast does the output change when one input changes and all the others are held fixed? That is very different from asking how it changes when everything varies together, which needs the chain rule or the total differential.
Watch out: typical mistakes
- In the second derivative test, using only \(f_{xx}f_{yy}\) and forgetting the \(-f_{xy}^2\) term.
- Forgetting the Jacobian factor \(r\) when converting a double integral to polar coordinates.
- Reversing the order of integration without redrawing the region and recomputing the limits.
- Solving \(\nabla f=\lambda\nabla g\) but forgetting to use the constraint \(g=0\) to find the actual point.
Worked example 13: Lagrange multipliers in context
A rectangular field is fenced on three sides with 120 m of fencing; the fourth side is a straight river bank. Find the largest possible area.
Let \(x\) be the length of each side perpendicular to the river and \(y\) the side parallel to it. We maximise \(A=xy\) subject to \(g=2x+y=120\). The condition \(\nabla A=\lambda\nabla g\) gives \((y,x)=\lambda(2,1)\), so \(y=2\lambda\) and \(x=\lambda\), which means \(y=2x\). The constraint then gives \(4x=120\), so \(x=30\) m and \(y=60\) m. The largest area is \(1800\) m\(^2\). The multiplier \(\lambda=30\) tells us that each extra metre of fencing would add about 30 m\(^2\) of area. A quick check with one variable: \(A=x(120-2x)\) has derivative \(120-4x\), which is zero at \(x=30\), as expected.
Note: why the gradient test works
Near a critical point the surface looks like the quadratic \(\frac12\left(f_{xx}h^2+2f_{xy}hk+f_{yy}k^2\right)\), where \(h\) and \(k\) are small steps in \(x\) and \(y\). This quadratic form is positive for every non-zero step exactly when \(f_{xx}>0\) and \(D>0\), which makes the point a minimum. It takes both signs when \(D<0\), which is the shape of a saddle or a mountain pass. The test is therefore a statement about a symmetric \(2\times2\) matrix, the Hessian, and its eigenvalues: two positive eigenvalues give a minimum, two negative ones give a maximum, and one of each gives a saddle. This link with linear algebra becomes central in later courses on optimisation, where functions of many variables are studied in exactly the same way.
Did you know?
Joseph-Louis Lagrange introduced his multiplier method in 1788 to solve constrained problems in mechanics. Today the same idea is used in economics, in machine learning, and in the design of structures. Partial derivatives and double integrals are the tools that allow weather models to track temperature and pressure over the whole surface of the Earth.
Otto's tip
Sketch the region of integration before choosing limits.
How to use this University multivariable calculus revision notes
First, read the key points so that you know where the University multivariable calculus revision notes is going. Then work through each definition and worked example, and cover the solution before you read it. After that, practise with the multivariable calculus worksheet and check every question with the worksheet answers. When you feel ready, test yourself with the multiple choice questions or the quick quiz. Finally, sit the multivariable calculus test and mark it with the test answers.
Also, the starters are a good warm-up, so you can keep the key facts fresh. Moreover, all the pages of this chapter work together, so you can move between them at any time. For example, many pupils read the lesson on Monday, practise on Wednesday and test themselves on Friday. In short, this University multivariable calculus revision notes gives you everything you need for the chapter.
To sum up, regular practice works better than one long session. For instance, ten minutes a day is often enough. Besides, mistakes are useful, because they show what to revise next. Then, once a method feels easy, try a harder question. As a result, you build confidence step by step.


















