Local maxima on multivariable function using rects

33 Views Asked by At

Lets suppose you have a function $ f:\mathbb R^2 \rightarrow \mathbb R $ and you wanna know if a point $(x_0,y_0)$ is a local maximum.

If you equate $y=m(x-x_0)+y_0$, then analyze the resulting function $f_m(x)=f(x,m(x-x_0)+y_0)$ and find that for any $m$, $f_m$ has a maximum at $x_0$ (and $f(x_0,y)$ has a maximum at $y_0$), would that imply that $(x_0,y_0)$ is a local maximum of $f$?

My reasoning is that for $(x_0,y_0)$ to not be a maximum, there must be a point $\vec a$ close to $(x_0,y_0)$ such that $f(\vec a)<f(x_0,y_0)$, and that must imply that $x_0$ is not a maximum of the function $f(x,\frac{a_y-y_0}{a_x-x_0}(x-x_0)+y_0)$, so that implies that there is a $m$ for which $x_0$ is not a maximum of $f_m$. Therefore, if for all $m$ the function is a maximum, the original function has a maximum at $(x_0,y_0)$. Is that correct? Is there an extra condition $f$ needs to hold for this to be true?