$\newenvironment {prompt}{}{} \newcommand {\ungraded }{} \newcommand {\todo }{} \newcommand {\oiint }{{\large \bigcirc }\kern -1.56em\iint } \newcommand {\mooculus }{\textsf {\textbf {MOOC}\textnormal {\textsf {ULUS}}}} \newcommand {\npnoround }{\nprounddigits {-1}} \newcommand {\npnoroundexp }{\nproundexpdigits {-1}} \newcommand {\npunitcommand }{\ensuremath {\mathrm {#1}}} \newcommand {\RR }{\mathbb R} \newcommand {\R }{\mathbb R} \newcommand {\N }{\mathbb N} \newcommand {\Z }{\mathbb Z} \newcommand {\sagemath }{\textsf {SageMath}} \newcommand {\d }{\mathop {}\!d} \newcommand {\l }{\ell } \newcommand {\ddx }{\frac {d}{\d x}} \newcommand {\zeroOverZero }{\ensuremath {\boldsymbol {\tfrac {0}{0}}}} \newcommand {\inftyOverInfty }{\ensuremath {\boldsymbol {\tfrac {\infty }{\infty }}}} \newcommand {\zeroOverInfty }{\ensuremath {\boldsymbol {\tfrac {0}{\infty }}}} \newcommand {\zeroTimesInfty }{\ensuremath {\small \boldsymbol {0\cdot \infty }}} \newcommand {\inftyMinusInfty }{\ensuremath {\small \boldsymbol {\infty -\infty }}} \newcommand {\oneToInfty }{\ensuremath {\boldsymbol {1^\infty }}} \newcommand {\zeroToZero }{\ensuremath {\boldsymbol {0^0}}} \newcommand {\inftyToZero }{\ensuremath {\boldsymbol {\infty ^0}}} \newcommand {\numOverZero }{\ensuremath {\boldsymbol {\tfrac {\#}{0}}}} \newcommand {\dfn }{\textbf } \newcommand {\unit }{\mathop {}\!\mathrm } \newcommand {\eval }{\bigg [ #1 \bigg ]} \newcommand {\seq }{\left ( #1 \right )} \newcommand {\epsilon }{\varepsilon } \newcommand {\phi }{\varphi } \newcommand {\iff }{\Leftrightarrow } \DeclareMathOperator {\arccot }{arccot} \DeclareMathOperator {\arcsec }{arcsec} \DeclareMathOperator {\arccsc }{arccsc} \DeclareMathOperator {\si }{Si} \DeclareMathOperator {\scal }{scal} \DeclareMathOperator {\sign }{sign} \newcommand {\arrowvec }{{\overset {\rightharpoonup }{#1}}} \newcommand {\vec }{{\overset {\boldsymbol {\rightharpoonup }}{\mathbf {#1}}}\hspace {0in}} \newcommand {\point }{\left (#1\right )} \newcommand {\pt }{\mathbf {#1}} \newcommand {\Lim }{\lim _{\point {#1} \to \point {#2}}} \DeclareMathOperator {\proj }{\mathbf {proj}} \newcommand {\veci }{{\boldsymbol {\hat {\imath }}}} \newcommand {\vecj }{{\boldsymbol {\hat {\jmath }}}} \newcommand {\veck }{{\boldsymbol {\hat {k}}}} \newcommand {\vecl }{\vec {\boldsymbol {\l }}} \newcommand {\uvec }{\mathbf {\hat {#1}}} \newcommand {\utan }{\mathbf {\hat {t}}} \newcommand {\unormal }{\mathbf {\hat {n}}} \newcommand {\ubinormal }{\mathbf {\hat {b}}} \newcommand {\dotp }{\bullet } \newcommand {\cross }{\boldsymbol \times } \newcommand {\grad }{\boldsymbol \nabla } \newcommand {\divergence }{\grad \dotp } \newcommand {\curl }{\grad \cross } \newcommand {\lto }{\mathop {\longrightarrow \,}\limits } \newcommand {\bar }{\overline } \newcommand {\surfaceColor }{violet} \newcommand {\surfaceColorTwo }{redyellow} \newcommand {\sliceColor }{greenyellow} \newcommand {\vector }{\left \langle #1\right \rangle } \newcommand {\sectionOutcomes }{} \newcommand {\HyperFirstAtBeginDocument }{\AtBeginDocument }$

We introduce Taylor polynomials for functions of several variables.

Recall the definition of a Taylor polynomial:
Let $f(x) = \sin (x)$. Compute the degree $7$ Taylor polynomial centered at $x=0$.
Let $f(x) = \cos (x)$. Compute the degree $7$ Taylor polynomial centered at $x=0$.
Let $f(x) = e^x$. Compute the degree $7$ Taylor polynomial centered at $x=0$.

We have a similar formula for functions $F:\R ^n\to \R$.

As you can see, it is more complex than the formula for a single variable. Good news everyone: In this class, we will only compute the degree two polynomial for functions of two variables. In this case $P_2$ is:

Basically, given a function $F:\R ^2\to \R$, the second degree Taylor polynomial $P_2$ at a point $\vec {c}$ is a polynomial “cooked-up” so that:

• The values are equal: $P_2(\vec {c}) = F(\vec {c})$.
• The first partial derivatives are equal: $P_2^{(1,0)}(\vec {c}) = F^{(1,0)}(\vec {c})$ and $P_2^{(0,1)}(\vec {c}) = F^{(0,1)}(\vec {c})$.
• The second partial derivatives are equal: $P_2^{(2,0)}(\vec {c}) = F^{(2,0)}(\vec {c})$, $P_2^{(0,2)}(\vec {c}) = F^{(0,2)}(\vec {c})$, and $P_2^{(1,1)}(\vec {c}) = F^{(1,1)}(\vec {c})$.

Here’s the plan. Soon we will be trying to find maximums and minimums for functions of two variables. The second degree Taylor polynomial will be the key to developing a “second derivative test” for identifying these extrema.

### Try it, you might like it

Computing the Taylor polynomial is not so bad, you just need to get the hang of it.

Compute the degree $2$ Taylor polynomial for: centered at $(0,0)$.
Start by making a table of partial derivatives along with their value when evaluated at $(0,0)$.
Compute the degree $2$ Taylor polynomial for: centered at $(-1/2,1/8)$.
Start by making a table of partial derivatives along with their value when evaluated at $(-1/2,1/8)$.
Compute the degree $2$ Taylor polynomial for: centered at $(1,2)$.
Start by making a table of partial derivatives along with their value when evaluated at $(1,2)$.

### In other words

Now that we have a formula and we (hopefully!) can apply it. Let’s finish by talking about what is really going on. Given a function $f:\R \to \R$, the Taylor polynomial is a polynomial “cooked-up” to share the value of the function, meaning and share values of the first $d$ derivatives, meaning whenever $0\le i\le d$. The exact same idea is true for functions of several variables. Let’s explain the construction of the Taylor polynomial as an iterative process. Given $F:\R ^2\to \R$ (and similarly for functions $F:\R ^n\to \R$) the degree zero Taylor polynomial is just the value of the function where $\vec {c}=\vector {c_1,c_2}$ is the center of the Taylor polynomial. The degree one Taylor polynomial is just the degree zero polynomial plus the first partial derivatives with respect to $x_i$ multiplied by $(x_i-c_i)$ The degree two Taylor polynomial can be found by adding the degree one Taylor polynomial to one-half of all the second partial derivatives with respect to $x$ and $y$ multiplied by

• $(x-c_1)^2$ when taking the partial derivative with respect to $x$,
• $(y-c_2)^2$ when taking the partial derivative with respect to $y$, and
• $2(x-c_1)(y-c_2)$ when taking the partial derivative with respect to $x$ and $y$.

Putting this together, we see

The interested reader can (repeatedly) differentiate $P_2(x,y)$ to see that its value at $\vec {x}=\vec {c}$ and the values of the first two derivatives of $P_2(x,y)$ do indeed match those of $F(x,y)$.

### Unpacking the general formula

This final section is for the interested student, and is not required for this course.

Recall that if $F:\R ^n\to \R$ is a function whose first $d$ derivatives exist at $\vec {x}=\vec {c}$. The Taylor polynomial of degree $d$ of $F$ centered at $\vec {x}=\vec {c}$ is

This formula is complex and will take some unpacking. We’ll walk you through this.

#### The degree zero Taylor polynomial

First note that

This means for any function $F:\R ^n\to \R$, the $0$th degree Taylor polynomial for $F$ at $\vec {x}=\vec {c}$ is just

#### The degree one Taylor polynomial

Now let’s look at the $1$st degree Taylor polynomial:

Now we ask, what is $(\vec {a}\dotp \grad )F$? Well, computing the dot product, and to find $(\vec {a}\dotp \grad )F$, we distribute $F$ to obtain

So

This means for any function $F:\R ^n\to \R$, the $1$st degree Taylor polynomial for $F$ at $\vec {x}=\vec {c}$ is just the tangent “plane” for $F$ at $\vec {x}= \vec {c}$.

#### The degree two Taylor polynomial

To get our hands on the $2$nd degree Taylor polynomial, we will specialize to functions $F:\R ^2\to \R$. Let $\vec {c}=\vector {c_1,c_2}$ and let $\vec {x} = \vector {x,y}$. Write with me:

Now we ask ourselves, what is $(\vec {a}\dotp \grad )^2 F(\vec {x})$? Well, we know that and

Now we use the distributively property and (since we are assuming that all derivatives of $F$ exist) we have that so We can now unpack our second degree Taylor polynomial:

as

and finally we see:

Whew. That was a lot of work. However, as we have said before, all you need to know right now, is how to compute the degree two Taylor polynomial for functions of two variables.