Let $f: \mathbb{R}^n \to \mathbb{R}$ and $g: \mathbb{R}^n \to \mathbb{R}$. Is there a general formula for the Hessian matrix of their product?
That is, what is $H(f(x) g(x))$, where $H(f(x)) = \left(\frac{\partial^2 f}{\partial x_i \partial x_j}\right)_{i,j = 1 \dots n}$?
Hint: the product is a function:
$$P:\Bbb R^2\longrightarrow\Bbb R$$ $$(x,y)\longmapsto xy$$ and your function is a composition $$\Bbb R^n\overset{\Delta}\longrightarrow\Bbb R^n\times\Bbb R^n\overset{(f,g)}\longrightarrow\Bbb R\times\Bbb R\overset{P}\longrightarrow\Bbb R$$ $$x\longmapsto\pmatrix{x\cr x}\longmapsto\pmatrix{f(x)\cr g(x)}\longmapsto f(x)g(x)$$ Apply the chain rule two times.