Taylor Series for Functions of Several Variables

You've seen Taylor series for functions $y = f(x)$ of 1 variable. For a function $f: \real \to \real$ satisfying the appropriate conditions, we have

$$f(x) = f(c) + f'(c) (x - c) + \dfrac{f''(c)}{2!} (x - c)^2 + \cdots + \dfrac{f^{(n)}(c)}{n!} (x - c)^n + R_n(x, c).$$

$R_n(x, c)$ is the remainder term:

$$R_n(x, c) = \dfrac{f^{(n + 1)}(z)}{(n + 1)!} (x - c)^{n + 1}.$$

z is a number between c and x. The Remainder Term gives the error that occurs in approximating $f(x)$ with the $n^{\rm th}$ degree Taylor polynomial.

There is a similar formula for functions of several variables. To make the notation a little better, I'll define higher-order differentials as follows. Let $h = (h_1, h_2,
   \ldots, h_n) \in \real^n$ .

$$D^2f(x, h) = \sum_{i = 1}^n \sum_{j = 1}^n \pdertwom f {x_i} {x_j} \cdot h_i h_j.$$

$$D^3f(x, h) = \sum_{i = 1}^n \sum_{j = 1}^n \sum_{k = 1}^n \dfrac{\partial^3 f}{\partial x_i \partial x_j \partial x_k} \cdot h_i h_j h_k.$$

And so on. Here's Taylor's formula for functions of several variables. With more variables, it's more complicated and technical; try to see the resemblance between the formula here and the one for functions of one variable.

Theorem. Suppose $f: U \to \real$ , where U is an open set in $\real^n$ . Suppose f has continuous partial derivatives at all points of U through order $m + 1$ . Let $x, c \in U$ , where $x \ne c$ and the segment from c to x is contained in U. Then for some point z on the segment from c to x,

$$f(x) = f(c) + \sum_{k = 1}^m \dfrac{1}{k!} D^kf(c, x - c) + \dfrac{1}{(m + 1)!} D^{(m + 1)}f(z, x - c).\quad\halmos$$

Example. Write out the Taylor expansion through terms of degree 2 for a function of 2 variables $z = f(x, y)$ .

Let's say we're expanding at a point $(c, d)$ . Then

$$f(x, y) = f(c, d) + \left(\pder f x (c, d) \cdot (x - c) + \pder f y (c, d) \cdot (y - d)\right) + $$

$$\dfrac{1}{2!} \left(\pdertwo f x (c, d)\ (x - c)^2 + 2 \pdertwom f x y (c, d)\ (x - c)(y - d) + \pdertwo f y (c, d)\ (y - d)^2\right) + \cdots.\quad\halmos$$


Example. For a function $z = f(x, y)$ ,

$$f(1, 2) = 29, \quad f_x(1, 2) = 19, \quad f_y(1, 2) = 24,$$

$$f_{x x}(1, 2) = 22, \quad f_{x y}(1, 2) = 8, \quad f_{y y}(1, 2) = 10.$$

Write out the Taylor expansion of f at $(1, 2)$ through terms of degree 2.

$$f(x, y) = 29 + 19 (x - 1) + 24 (y - 2) + \dfrac{1}{2} \left(22 (x - 1)^2 + 16 (x - 1)(y - 2) + 10 (y - 2)^2\right) + \cdots.\quad\halmos$$


Example. Construct the Taylor series through the $2^{\rm
   nd}$ order for $f(x, y) = x^2 y +
   y^2$ at $(x, y) = (1, 3)$ .

$$f(1, 3) = 12.$$

$$\pder f x = 2 x y, \quad \pder f x (1, 3) = 6.$$

$$\pder f y = x^2 + 2 y, \quad \pder f y (1, 3) = 7.$$

$$\pdertwo f x = 2 y, \quad \pdertwo f x (1, 3) = 2.$$

$$\pdertwom f x y = 2 x, \quad \pdertwom f x y (1, 3) = 2.$$

$$\pdertwo f y = 2, \quad \pdertwo f y (1, 3) = 2.$$

$$f(x, y) = 12 + 6 (x - 1) + 7 (y - 3) + \dfrac{1}{2} \left(2 (x - 1)^2 + 4 (x - 1)(y - 3) + 2 (y - 3)^2\right) + \cdots.\quad\halmos$$


Example. Let $f(x, y) = x
   \sqrt{y}$ . Use a $1^{\rm st}$ -order Taylor approximation to approximate $f(5.9, 4.1)$ .

I'll use a Taylor expansion at $(6, 4)$ , since it's the closest "nice" point to $(5.9,
   4.1)$ .

$$f(6, 4) = 12.$$

$$\pder f x = \sqrt{y}, \quad \pder f x (6, 4) = 2.$$

$$\pder f y = \dfrac{x}{2 \sqrt{y}}, \quad \pder f y (6, 4) = \dfrac{3}{2}.$$

The series is

$$f(x, y) = 12 + 2 (x - 6) + \dfrac{3}{2} (y - 4) + \cdots.$$

Then

$$f(5.9, 4.1) \approx 12 + 2 (5.9 - 6) + \dfrac{3}{2} (4.1 - 4) = 11.95.\quad\halmos$$


Contact information

Bruce Ikenaga's Home Page

Copyright 2020 by Bruce Ikenaga