What is the 2nd order taylor polynomial of f(x,y)?

182 Views Asked by At

I'm just computing the 2nd order taylor polynomial for $f(x,y) = tan(x + 3y + \frac{\pi}{4})$ centered at (3,-1) and wondering if I have done this correctly or if anyone has any suggestions on how I can improve my answer (I've never done this before with mulitvariables so just want to be sure I am on the right track):

I have that: $$f(3,-1) = tan(\frac{\pi}{4}) = 1$$ $$f_{x}(3,-1) = sec^2(\frac{\pi}{4}) = 2$$ $$f_{y}(3,-1) = 3sec^2(\frac{\pi}{4}) = 6$$

So the gradient vector for $f$ is $(2,6)$

The letting $u = x + 3y + \frac{\pi}{4}$, I get that $\frac{du}{dx}= 1 $ and $\frac{dy}{dx}= 3 $

So, $$f_{x}(u) = sec^2(u)$$ $$f_{xx}(u) = 2tan(u)sec^2(u)\frac{du}{dx}$$ $$f_{xy}(u) = 2tan(u)sec^2(u)\frac{du}{dy}$$ and similarly,

$$f_{y}(u) = 3sec^2(u)$$ $$f_{yx}(u) = 6tan(u)sec^2(u)\frac{du}{dx}$$ $$f_{yy}(u) = 6tan(u)sec^2(u)\frac{du}{dy}$$

Substituting back for $u$ and plugging in $(3,-1)$ I get:

$$f_{xx}(3,-1) = 2tan(\frac{\pi}{4})sec^2(\frac{\pi}{4})\cdot1 = 4$$ $$f_{xy}(3,-1) = 2tan(\frac{\pi}{4})sec^2(\frac{\pi}{4})\cdot3 = 12$$ and similarly,

$$f_{yx}(3,-1) = 6tan(\frac{\pi}{4})sec^2(\frac{\pi}{4})\cdot1 = 12$$ $$f_{yy}(3,-1) = 6tan(\frac{\pi}{4})sec^2(\frac{\pi}{4})\cdot3 = 36$$

So,

$$T_{2}((x,y),(3,-1)) = 1+(2,6) \cdot (x-3,y+1) + \frac{1}{2} \bigl( \begin{smallmatrix} x-3 & y+1\\ \end{smallmatrix} \bigr) \bigl( \begin{smallmatrix} 4 & 12\\ 12 & 36 \end{smallmatrix} \bigr) \bigl( \begin{smallmatrix} x-3 \\ y+1 \end{smallmatrix} \bigr)$$

Performing the calculations I get:

$$= 1+2x-6+6y+6+\frac{1}{2}[(x-3)(4x-12+12y+12)+(y+1)(12x-36+36y+36)]$$

$$ = 2x^2 + 18y^2 + 12xy + 2x + 6y + 1$$

Is this correct and have I done the steps correctly? Many thanks in advance!

1

There are 1 best solutions below

0
On

For what it's worth after two years, yes, you did everything correctly.

To back that up, the Mathematica expression for Taylor Series

f[x_,y_]=Tan[x+3y+Pi/4];
Normal[Series[f[(x-3)t+3,(y+1)t-1],{t,0,2}]] /. t-> 1

yields indeed

$$1+2 x+2 x^2+6 y+12 x y+18 y^2.$$

At least that's one unanswered question less.