The full question is as follows :
Let $g(x,y)$ be a harmonic function in a domain $D$ such that $g(x,y) >0$ for all $(x,y) \in D$. Consider the function $$h(x,y) = \dfrac{1}{g(x,y)}$$
Show that $$\dfrac{d^{2}h}{dx^{2}}+\dfrac{d^{2}h}{dy^{2}} = \dfrac{2}{[g(x,y)]^{3}}[(\dfrac{dg}{dx})^{2}+(\dfrac{dg}{dy})^{2}] ~~ ~\text{on} ~ D.$$
Let $h= \dfrac{1}{g}$, by the chain rule? We have \begin{align*} h_{xx}+h_{yy} &= (\dfrac{1}{g})_{xx}+(\dfrac{1}{g})_{yy}\\ &= (-\dfrac{1}{g^{2}}\cdot g_x)_x + (-\dfrac{1}{g^{2}}\cdot g_y)_y\\ &= -\dfrac{1}{g^{2}} \cdot g_{xx} +\dfrac{2}{g^{3}} \cdot g_x \cdot g_x -\dfrac{1}{g^{2}}g_{yy}+\dfrac{2}{g^{3}} \cdot g_y \cdot g_y\\ &= -\dfrac{1}{g^{2}} \cdot (g_{xx} + g_{yy}) + \dfrac{2}{g^{3}}(g_{x}^{2}+g_{y}^{2})\\ &= 0 + \dfrac{2}{g^{3}} \cdot (g_{x}^{2}+g_{y}^{2})\\ &= \dfrac{2}{g^{3}} \cdot (g_{x}^{2}+g_{y}^{2})\\ \end{align*}
I did the question by a way of motion, not knowing the reason behind how the chain rule works. I read on wiki and other links alike, but i do not know how chain rule on these kind of questions are applied. Can anyone show me how is the chain rule applied with intermediate steps or formulas to guide me? thanks!
So far i know chain rule is something like $\dfrac{d}{dx}[g(g(x))] = f^{'}(g(x)) \cdot g^{'}(x)$