I'm trying to find the $2$nd order Taylor polynomial for $z=g(x,y)$ near the point $(\frac {\pi}{2}, 1,1)$, given the function $\sin(xyz)=z^2$. I've never found the Taylor polynomial of a function defined implicitly before, but I think I've got it. I'd just like it if someone could let me know if I did it right.
Here's my attempt:
So I've got the function $F(x,y,z)=\sin(xyz)-z^2=0$. Where $z$ is a function of $x$ and $y$. We know that $\frac{\partial F}{\partial x} + \frac{\partial F}{\partial y}\frac{\partial y}{\partial x} + \frac{\partial F}{\partial z}\frac{\partial z}{\partial x} = \frac{\partial F}{\partial x} + \frac{\partial F}{\partial z}\frac{\partial g}{\partial x} =0$ by the chain rule. Thus $\frac{\partial g}{\partial x}=-\frac{\partial_x F}{\partial_z F} = -\frac{\cos(xyz)}{\cos(xyz)-2z}$.
Likewise $\frac{\partial F}{\partial y} + \frac{\partial F}{\partial z}\frac{\partial g}{\partial y} =0$. Then $\frac{\partial g}{\partial y} = -\frac{\partial_y F}{\partial_z F} = -\frac{\cos(xyz)}{\cos(xyz)-2z}$.
Then the $2$nd derivatives are:
$$\frac{\partial^2 g}{\partial x \partial x} = -\frac{\partial_x F\cdot(\partial_x\partial_z F) - \partial_z F\cdot(\partial_x\partial_x F)}{(\partial_z F)^2} = -\frac{\cos(xyz)(-\sin(xyz))-(\cos(xyz)-2z)(-\sin(xyz))}{(\cos(xyz)-2z)^2} = -\frac{2x}{(\cos(xyz)-2z)^2}$$
$$\frac{\partial^2 g}{\partial y \partial y} = -\frac{\partial_y F\cdot(\partial_y\partial_z F) - \partial_z F\cdot(\partial_y\partial_y F)}{(\partial_z F)^2}=-\frac{2y}{(\cos(xyz)-2z)^2}$$
$$\frac{\partial^2 g}{\partial x \partial y} = \frac{\partial^2 g}{\partial y \partial x} = -\frac{\partial_y F\cdot(\partial_x\partial_z F) - \partial_z F\cdot(\partial_x\partial_y F)}{(\partial_z F)^2}=-\frac{\cos(xyz)(-\sin(xyz))-(\cos(xyz)-2z)(-\sin(xyz))}{(\cos(xyz)-2z)^2}$$
Then the Taylor polynomial will look like: $$g(\frac {\pi}2 + h_1, 1+ h_2) = 1 + \frac{\partial g(\frac{\pi}2, 1)}{\partial x}h_1 + \frac{\partial g(\frac{\pi}2, 1)}{\partial y}h_2 + \frac{\partial^2 g(\frac{\pi}2, 1)}{\partial x \partial x}\frac{h_1^2}{2!}+ \frac{\partial^2 g(\frac{\pi}2, 1)}{\partial y \partial y}\frac{h_2^2}{2!} + \frac{\partial^2 g(\frac{\pi}2, 1)}{\partial x \partial y}h_1 h_2$$
After plugging in values, I have a polynomial in $h_1$ and $h_2$, which I think is my solution.
Edit: Also upon thinking about this, am I actually able to apply the chain rule like I did (in the second line under "Here's my attempt")? That is I have a $\frac {\partial F}{\partial x}$ which is the derivative of $F$ holding $y$ and $z$ constant. But because $z$ is a function of $x$, is this a legit move, or did I screw up right at the beginning?