Taylor's Formula for Functions from Rn to R Examples 1

# Taylor's Formula for Functions from Rn to R Examples 1

Recall from the Taylor's Formula for Functions from Rn to R that if $S \subseteq \mathbb{R}^n$, $f : S \to \mathbb{R}$, and if $f$ and all the partial derivatives of $f$ of order less than $m$ are differentiable on $S$ then if $\mathbf{a}, \mathbf{b} \in S$ and such that $L(\mathbf{a}, \mathbf{b}) \subset S$ then there exists a $\mathbf{z} \in L(\mathbf{a}, \mathbf{b})$ such that:

(1)
\begin{align} \quad f(\mathbf{b}) - f(\mathbf{a}) = \sum_{k=1}^{m-1} \frac{1}{k!} f^{(k)} (\mathbf{a}, \mathbf{b} - \mathbf{a}) + \frac{1}{m!} f^{(m)} (\mathbf{z}, \mathbf{b} - \mathbf{a}) \end{align}

We will now look at solving some example problems regarding Taylor's formula.

## Example 1

Express the function $f(x, y) = x^2 + 2xy + y$ in terms of $(x - 1)$ and $(y - 2)$ by using Taylor's formula.

First note that $f$ is a polynomial and hence its partial derivatives of all orders exist. In particular, all partial derivatives of order greater than or equal to $3$ will equal to $0$ since the largest exponent in $f$ is $2$. Let $\mathbf{b} = (x, y)$ and let $\mathbf{a} = (1, 2)$. Then by Taylor's formula there exists a point $\mathbf{z} \in L(\mathbf{a}, \mathbf{b})$ such that for $t_1 = x - 1$ and $t_2 = y - 2$ we have that:

(2)
\begin{align} \quad f(x, y) - f(1, 2) &= \sum_{k=1}^{2} \frac{1}{k!} f^{(k)} (\mathbf{a}, \mathbf{b} - \mathbf{a}) + \frac{1}{3!} \underbrace{f^{(3)}(\mathbf{z}, \mathbf{b} - \mathbf{a})}_{=0} \\ &= \frac{1}{1!} f' ((1, 2), (x, y) - (1, 2)) + \frac{1}{2!} f'' ((1, 2), (x, y) - (1, 2)) \\ &= f'((1, 2), (x - 1, y - 2)) + \frac{1}{2} f''((1, 2), (x - 1, y - 2)) \\ &= \sum_{i=1}^{2} D_i f(1, 2) t_i + \sum_{i=1}^{2} \sum_{j=1}^{2} D_{i,j} f(1, 2) t_j t_i \quad (*) \end{align}

Now we compute the first order partial derivatives of $f$:

(3)
\begin{align} \quad D_1 f(x, y) = 2x + 2y \quad , \quad D_2 f(x, y) = 2x + 1 \end{align}

And we compute the second order partial derivatives of $f$:

(4)

Evaluating the first and second order partial derivatives of $f$ at $(1, 2)$ and plugging them into Taylor's formula $(*)$ gives us:

(5)
\begin{align} \quad f(x, y) - f(1, 2) &= 6 (x - 1) + 3(y - 2) + \frac{1}{2} \left [ 2 (x - 1)^2 + 2(x - 1)(y-2) + 2(x - 1)(y - 2) + 0(y - 2)^2 \right ] \\ &= 6 (x - 1) + 3(y - 2) + \frac{1}{2} \left [ 2 (x - 1)^2 + 4(x - 1)(y - 2) \right ] \\ \end{align}

Therefore:

(6)
\begin{align} \quad f(x, y) &= f(1, 2) + 6(x - 1) + 3(y - 2) + \frac{1}{2} \left [ 2(x - 1)^2 + 4(x - 1)(y - 2) \right ] \\ &= 7 + 6(x - 1) + 3(y - 2) + (x - 1)^2 + 2(x - 1)(y - 2) \end{align}

## Example 2

Express the function $f(x, y) = x^2 + 2xy + y$ in terms of $(x - 1)$ and $(y - 3)$ by using Taylor's formula.

As noted above, $f$ is a polynomial and hence its partial derivatives of all orders exist and all partial derivatives of order $3$ and greater will be $0$. Let $\mathbf{b} = (x, y)$ and $\mathbf{a} = (1, 3)$. Then by Taylor's formula there exists a $\mathbf{z} \in L(\mathbf{a}, \mathbf{b})$ such that:

(7)
\begin{align} \quad f(\mathbf{b}) - f(\mathbf{a}) &= \sum_{k=1}^{2} \frac{1}{k!} f^{(k)} (\mathbf{a}, \mathbf{b} - \mathbf{a}) + \frac{1}{3!} \underbrace{f^{(3)} (\mathbf{z}, \mathbf{b} - \mathbf{a})}_{=0} \\ &= f'((1, 3), (x - 1, y - 3)) + \frac{1}{2!} f''((1, 3), (x - 1, y-3)) \\ &= \sum_{i=1}^{2} D_i f(1, 2) t_i + \sum_{i=1}^{2} \sum_{j=1}^{2} D_{i, j} f(1, 2) \: t_j t_i \\ \end{align}

As above, the first order partial derivatives of $f$ are:

(8)
\begin{align} \quad D_1 f(x, y) = 2x + 2y \quad , \quad D_2 f(x, y) = 2x + 1 \end{align}

And the second order partial derivatives of $f$:

(9)
We evaluate these first and second order partial derivatives of $f$ at $(1, 3)$ and plug them into the formula above to get: