Let $f:\mathbb R\times\mathbb R^n\to\mathbb R$ be the function defined as $$f(y, x)= G(y, x) -\frac{1}{4} M(y)x\cdot x,$$ where $G\in C^2(\mathbb R\times\mathbb R^n, \mathbb R)$ and $M\in C(\mathbb R, \mathbb R^{n\times n})$ such that the $n\times n$ matrix $M(y)$ is symmetric and positive definite for each $y\in\mathbb R$.
During class of today it was stated (the proof has been left as an exercise) that if $G(y, x)>0$ and $G(y, x)=o(|x|^2)$ as $x\to 0$, then $x=0$ is a local maximum for the function $f(y, x)$ for all $y\in\mathbb R$.
I have tried so far to evaluate the gradient of $f$ and evaluating the points in which it is null. The computations are not easy to me and I suspect that the conclusion could be come easier than doing this.
Does anyone have any hint?
It's not possible to have $ G ( y , x ) > 0 $ even when $ x = 0 $, if $ G $ is continuous and $ G ( y , x ) $ is $ \mathrm o ( \lvert x \rvert ^ 2 ) $ as $ x \to 0 $. Presumably your instructor meant either $ G ( y , x ) \geq 0 $, or $ G ( y , x ) > 0 $ only when $ x \ne 0 $. In any case, this isn't necessary for the proof; if $ G ( y , x ) \leq 0 $ ever, then that can only make the local maximum even stronger. We also won't need that $ G $ is differentiable (much less twice continuously so), only continuous in $ x $. Since the result is only needed for each $ y $ individually, we won't need the continuity of $ M $ either.
Fix any value of $ y $.
Since $ M ( y ) $ is positive definite, its eigenvalues are all positive; let $ m $ be the minimum eigenvalue. Since $ M ( y ) $ is symmetric, we have $ M ( y ) x \cdot x \geq m \lvert x \vert ^ 2 $. (If you don't see why, diagonalize $ M ( y ) $, which is always possible since $ M ( y ) $ is real and symmetric, and work in the basis that this gives you.)
Since $ G ( y , x ) $ is $ \mathrm o ( \lvert x \rvert ^ 2 ) $ as $ x \to 0 $, we have $ \lim \limits _ { x \to 0 } \bigl ( G ( y , x ) / \lvert x \rvert ^ 2 \bigr ) = 0 $. Let $ \epsilon $ be $ \frac 1 4 m > 0 $ (where $ m $ is that minimum eigenvalue again); then for some $ \delta > 0 $, whenever $ 0 < \lvert x \rvert < \delta $, we have $ \lvert G ( y , x ) \rvert / \lvert x \rvert ^ 2 < \frac 1 4 m $.
Since $ G $ is continuous and $ G ( y , x ) $ is $ \mathrm o ( \lvert x \vert ^ 2 ) $, we have $ G ( y , 0 ) = 0 $; I'll leave that to you since you just want a hint.
So: $ f ( y , 0 ) = G ( y , 0 ) - \frac 1 4 M ( y ) 0 \cdot 0 = 0 $; while whenever $ \lvert x \rvert < \delta $ and $ x \ne 0 $, we have $ f ( y , x ) = G ( y , x ) - \frac 1 4 M ( y ) x \cdot x < 0 $ (using the two inequalities that I derived above).