The formula
Before you start: you'll need partial derivatives up to second or third order, and it helps to know Taylor's series for one variable.
\[\begin{aligned} f(a + h, b + k) = {} & f(a, b) + \big(h f_x + k f_y\big) \\ & + \frac{1}{2!}\big(h^2 f_{xx} + 2hk\,f_{xy} + k^2 f_{yy}\big) \\ & + \frac{1}{3!}\big(h^3 f_{xxx} + 3h^2k\,f_{xxy} + 3hk^2 f_{xyy} + k^3 f_{yyy}\big) + \cdots \end{aligned}\]
All the partial derivatives are evaluated at the point \((a, b)\).
In powers of \((x - a)\) and \((y - b)\)
Put \(h = x - a\) and \(k = y - b\).
Maclaurin's form (about the origin)
Put \(a = b = 0\), \(h = x\), \(k = y\).
An easy way to remember it. The \(n\)th group is \(\dfrac{1}{n!}\left(h\dfrac{\partial}{\partial x} + k\dfrac{\partial}{\partial y}\right)^n f\), expanded like a binomial. That's why the coefficients are 1, 2, 1 in the second group and 1, 3, 3, 1 in the third.
What each group of terms does
| Terms | What they capture | Geometric picture |
|---|---|---|
| \(f(a, b)\) | the value at the point | height of the surface |
| \(h f_x + k f_y\) | first-order (linear) change | the tangent plane |
| \(\dfrac{1}{2!}\big(h^2 f_{xx} + 2hk f_{xy} + k^2 f_{yy}\big)\) | curvature | how the surface bends away from the tangent plane |
This is the reason Taylor's theorem matters for maxima and minima. At a stationary point the first-order terms vanish, so the sign of the second-order bracket \(h^2 r + 2hk\,s + k^2 t\) decides whether the surface curves up, down or both ways. That is exactly where the \(rt - s^2\) test comes from.
Two ways to expand
- Using the formula. Find the partial derivatives, evaluate them at \((a, b)\), and substitute. This is the required method when the question says “using Taylor's theorem” or asks about a point other than the origin.
- Multiplying known series. About the origin, a product such as \(e^x\log(1 + y)\) can be expanded by multiplying the one-variable series. This is often much faster.
For a polynomial, the expansion is exact and stops after a finite number of terms.
Solved examples
Example 1: Second degree about the origin
EasyExpand \(e^x\cos y\) about \((0, 0)\) up to the second-degree terms.
- At \((0, 0)\): \(f = 1\), \(f_x = e^x\cos y = 1\), \(f_y = -e^x\sin y = 0\).
- \(f_{xx} = e^x\cos y = 1\), \(f_{xy} = -e^x\sin y = 0\), \(f_{yy} = -e^x\cos y = -1\).
- Substitute: \(1 + (x\cdot 1 + y\cdot 0) + \dfrac{1}{2}\big(x^2\cdot 1 + 0 + y^2\cdot(-1)\big)\).
Answer\(e^x\cos y \approx 1 + x + \dfrac{x^2 - y^2}{2}\)
Example 2: Multiplying series
MediumExpand \(e^x\log(1 + y)\) up to the third-degree terms.
- \(e^x = 1 + x + \dfrac{x^2}{2} + \cdots\) and \(\log(1 + y) = y - \dfrac{y^2}{2} + \dfrac{y^3}{3} - \cdots\)
- Multiply, keeping total degree \(\le 3\): \(1\cdot\left(y - \dfrac{y^2}{2} + \dfrac{y^3}{3}\right) + x\left(y - \dfrac{y^2}{2}\right) + \dfrac{x^2}{2}\cdot y\).
Answer\(y + xy - \dfrac{y^2}{2} + \dfrac{x^2 y}{2} - \dfrac{xy^2}{2} + \dfrac{y^3}{3} + \cdots\)
Example 3: A polynomial about a point
MediumExpand \(x^2 y + 3y - 2\) in powers of \((x - 1)\) and \((y + 2)\).
- Here \((a, b) = (1, -2)\). Let \(h = x - 1\), \(k = y + 2\). \(f(1, -2) = -2 - 6 - 2 = -10\).
- \(f_x = 2xy = -4\), \(f_y = x^2 + 3 = 4\).
- \(f_{xx} = 2y = -4\), \(f_{xy} = 2x = 2\), \(f_{yy} = 0\). Third order: only \(f_{xxy} = 2\) is non-zero.
- Substitute: \(-10 - 4h + 4k + \dfrac{1}{2}(-4h^2 + 2\cdot 2hk) + \dfrac{1}{6}(3h^2k\cdot 2)\).
Answer\(-10 - 4(x - 1) + 4(y + 2) - 2(x - 1)^2 + 2(x - 1)(y + 2) + (x - 1)^2(y + 2)\)
Example 4: Approximating a value
Exam levelUse Taylor's theorem to find an approximate value of \((1.1)^{1.02}\).
- Take \(f(x, y) = x^y\) about \((1, 1)\), with \(h = 0.1\), \(k = 0.02\).
- At \((1, 1)\): \(f = 1\); \(f_x = y\,x^{y-1} = 1\); \(f_y = x^y\log x = 0\).
- \(f_{xx} = y(y - 1)x^{y-2} = 0\); \(f_{xy} = x^{y-1}(1 + y\log x) = 1\); \(f_{yy} = x^y(\log x)^2 = 0\).
- So \(f \approx 1 + h + hk = 1 + 0.1 + 0.002\).
Answer\((1.1)^{1.02} \approx 1.102\) (the exact value is 1.1021…)
Example 5: Expanding an inverse tangent
Exam levelExpand \(\tan^{-1}\dfrac{y}{x}\) about \((1, 1)\) up to the second-degree terms.
- \(f(1, 1) = \tan^{-1} 1 = \dfrac{\pi}{4}\). \(f_x = -\dfrac{y}{x^2 + y^2} = -\dfrac{1}{2}\), \(f_y = \dfrac{x}{x^2 + y^2} = \dfrac{1}{2}\).
- \(f_{xx} = \dfrac{2xy}{(x^2 + y^2)^2} = \dfrac{1}{2}\), \(f_{yy} = -\dfrac{2xy}{(x^2 + y^2)^2} = -\dfrac{1}{2}\), \(f_{xy} = \dfrac{y^2 - x^2}{(x^2 + y^2)^2} = 0\).
- Substitute with \(h = x - 1\), \(k = y - 1\): \(\dfrac{\pi}{4} - \dfrac{h}{2} + \dfrac{k}{2} + \dfrac{1}{2}\left(\dfrac{h^2}{2} - \dfrac{k^2}{2}\right)\).
Answer\(\dfrac{\pi}{4} - \dfrac{x - 1}{2} + \dfrac{y - 1}{2} + \dfrac{(x - 1)^2 - (y - 1)^2}{4}\)
Make a small table of every partial derivative and its value at \((a, b)\) before you substitute. Most errors in this topic are slips in evaluating, not in the formula itself.
Common mistakes
1. Dropping the 2 in \(2hk\,f_{xy}\)
The second-degree group is \(h^2 f_{xx} + 2hk\,f_{xy} + k^2 f_{yy}\), like \((h + k)^2 = h^2 + 2hk + k^2\). Forgetting the 2 is the classic slip.
2. Forgetting the factorials
The second group is divided by \(2!\), the third by \(3!\).
3. Evaluating derivatives at \((x, y)\) instead of \((a, b)\)
Every coefficient is a number. If an \(x\) or \(y\) is left inside a coefficient, you haven't substituted the point.
4. Mixing \(h, k\) with \(x, y\)
In the final answer, \(h\) must become \((x - a)\) and \(k\) must become \((y - b)\).
How it's asked in exams
- Expand a function about a point, or in powers of \((x - a)\) and \((y - b)\), up to the second or third degree.
- Expand a polynomial exactly in powers of \((x - a)\) and \((y - b)\).
- Approximate a value such as \((1.1)^{1.02}\) or \(\sqrt{(2.98)^2 + (4.01)^2}\).
Practice questions
Try each one on paper before you open the answer.
Q1Expand \(e^{x + y}\) about \((0, 0)\) up to second degree.
\(1 + (x + y) + \dfrac{(x + y)^2}{2} = 1 + x + y + \dfrac{x^2}{2} + xy + \dfrac{y^2}{2}\).
Q2Expand \(\sin x\cos y\) up to third degree.
\(\left(x - \dfrac{x^3}{6}\right)\left(1 - \dfrac{y^2}{2}\right) \to x - \dfrac{x^3}{6} - \dfrac{xy^2}{2}\).
Q3Expand \(e^x\sin y\) up to third degree.
\(\left(1 + x + \dfrac{x^2}{2}\right)\left(y - \dfrac{y^3}{6}\right) \to y + xy + \dfrac{x^2y}{2} - \dfrac{y^3}{6}\).
Q4Expand \(x^3 + y^3 + xy^2\) in powers of \((x - 1)\) and \((y - 2)\).
With \(h = x - 1\), \(k = y - 2\): \(f = 13\), \(f_x = 7\), \(f_y = 16\), \(f_{xx} = 6\), \(f_{xy} = 4\), \(f_{yy} = 14\), \(f_{xxx} = 6\), \(f_{xxy} = 0\), \(f_{xyy} = 2\), \(f_{yyy} = 6\).
Result: \(13 + 7h + 16k + 3h^2 + 4hk + 7k^2 + h^3 + hk^2 + k^3\).
Q5Challenge. Approximate \((0.98)^{2.01}\) using \(f(x, y) = x^y\) about \((1, 2)\).
At \((1, 2)\): \(f = 1\), \(f_x = 2\), \(f_y = 0\), \(f_{xx} = 2\), \(f_{xy} = 1\), \(f_{yy} = 0\). With \(h = -0.02\), \(k = 0.01\):
\(1 + 2(-0.02) + \dfrac{1}{2}\big(2(0.0004) + 2(-0.02)(0.01)\big) = 0.96 + 0.0002 = 0.9602\). (Exact: 0.96021…)
Bring it to a free demo class and work through it with Vipul Sir. Book on WhatsApp.
Frequently asked questions
How is Taylor's theorem for two variables different from one variable?
Each group of terms involves all the partial derivatives of that order, with binomial coefficients: \(h f_x + k f_y\), then \(h^2 f_{xx} + 2hk f_{xy} + k^2 f_{yy}\), and so on.
What is the Maclaurin series of a function of two variables?
Taylor's expansion about the origin: put \(a = b = 0\), \(h = x\) and \(k = y\).
Why does this topic come before maxima and minima?
Because the second-order terms of the expansion explain the \(rt - s^2\) test for classifying stationary points.