Can we tell if a function has a max or min by looking along specific directions?
Suppose we have a smooth function $f$ from $mathbb R^ntomathbb R$ such that $nabla f(0)=0$, and we want to check if $f$ has a local maximum at $0$ (as opposed to a local min or a saddle point).
For any vector $v$ in $mathbb R^n$, we can form a function $g_v:mathbb Rtomathbb R$ defined by $g_v(x)=f(vx)$. Intuitively, we are looking at the behavior of $f$ along the $v$ direction. If $f$ has a local max at zero, then of course $g_v$ also has a local max at zero. My question is, is the converse true? If the single-variable function $g_v$ has a local max at $0$ for every possible direction $v$, does $f$ also have a local max at $0$?
If the Hessian of $f$ at zero has full rank, then this question is easily answered as yes. By taking $v$ to be in turn each of the eigenvectors of the Hessian, the fact that $g_v$ has a local max means that the corresponding eigenvalues are all negative, and so $f$ has a local max at $0$. But if some of the eigenvalues are $0$, then I'm not sure how to analyze it.
As a first step in a proof, I might think: well, for any fixed direction, there is some radius $r$ such that as long as $v$ is within distance $r$ of the origin, then $f(v)le f(0)$. But since the $r$ depends on the direction, we can't necessarily find a single $r$ which works for all directions, so that might allow for a counter-example.
As a bonus, if it does hold for smooth functions, what about functions that are merely differentiable? Continuous? Or even all functions?
multivariable-calculus maxima-minima
add a comment |
Suppose we have a smooth function $f$ from $mathbb R^ntomathbb R$ such that $nabla f(0)=0$, and we want to check if $f$ has a local maximum at $0$ (as opposed to a local min or a saddle point).
For any vector $v$ in $mathbb R^n$, we can form a function $g_v:mathbb Rtomathbb R$ defined by $g_v(x)=f(vx)$. Intuitively, we are looking at the behavior of $f$ along the $v$ direction. If $f$ has a local max at zero, then of course $g_v$ also has a local max at zero. My question is, is the converse true? If the single-variable function $g_v$ has a local max at $0$ for every possible direction $v$, does $f$ also have a local max at $0$?
If the Hessian of $f$ at zero has full rank, then this question is easily answered as yes. By taking $v$ to be in turn each of the eigenvectors of the Hessian, the fact that $g_v$ has a local max means that the corresponding eigenvalues are all negative, and so $f$ has a local max at $0$. But if some of the eigenvalues are $0$, then I'm not sure how to analyze it.
As a first step in a proof, I might think: well, for any fixed direction, there is some radius $r$ such that as long as $v$ is within distance $r$ of the origin, then $f(v)le f(0)$. But since the $r$ depends on the direction, we can't necessarily find a single $r$ which works for all directions, so that might allow for a counter-example.
As a bonus, if it does hold for smooth functions, what about functions that are merely differentiable? Continuous? Or even all functions?
multivariable-calculus maxima-minima
I just had the same question myself. We can possibly apply compactness to get a minimum $r$, as long as we can choose $r$ as a continuous function of the direction, but I don't quite see a way to make this work.
– Misha Lavrov
2 days ago
add a comment |
Suppose we have a smooth function $f$ from $mathbb R^ntomathbb R$ such that $nabla f(0)=0$, and we want to check if $f$ has a local maximum at $0$ (as opposed to a local min or a saddle point).
For any vector $v$ in $mathbb R^n$, we can form a function $g_v:mathbb Rtomathbb R$ defined by $g_v(x)=f(vx)$. Intuitively, we are looking at the behavior of $f$ along the $v$ direction. If $f$ has a local max at zero, then of course $g_v$ also has a local max at zero. My question is, is the converse true? If the single-variable function $g_v$ has a local max at $0$ for every possible direction $v$, does $f$ also have a local max at $0$?
If the Hessian of $f$ at zero has full rank, then this question is easily answered as yes. By taking $v$ to be in turn each of the eigenvectors of the Hessian, the fact that $g_v$ has a local max means that the corresponding eigenvalues are all negative, and so $f$ has a local max at $0$. But if some of the eigenvalues are $0$, then I'm not sure how to analyze it.
As a first step in a proof, I might think: well, for any fixed direction, there is some radius $r$ such that as long as $v$ is within distance $r$ of the origin, then $f(v)le f(0)$. But since the $r$ depends on the direction, we can't necessarily find a single $r$ which works for all directions, so that might allow for a counter-example.
As a bonus, if it does hold for smooth functions, what about functions that are merely differentiable? Continuous? Or even all functions?
multivariable-calculus maxima-minima
Suppose we have a smooth function $f$ from $mathbb R^ntomathbb R$ such that $nabla f(0)=0$, and we want to check if $f$ has a local maximum at $0$ (as opposed to a local min or a saddle point).
For any vector $v$ in $mathbb R^n$, we can form a function $g_v:mathbb Rtomathbb R$ defined by $g_v(x)=f(vx)$. Intuitively, we are looking at the behavior of $f$ along the $v$ direction. If $f$ has a local max at zero, then of course $g_v$ also has a local max at zero. My question is, is the converse true? If the single-variable function $g_v$ has a local max at $0$ for every possible direction $v$, does $f$ also have a local max at $0$?
If the Hessian of $f$ at zero has full rank, then this question is easily answered as yes. By taking $v$ to be in turn each of the eigenvectors of the Hessian, the fact that $g_v$ has a local max means that the corresponding eigenvalues are all negative, and so $f$ has a local max at $0$. But if some of the eigenvalues are $0$, then I'm not sure how to analyze it.
As a first step in a proof, I might think: well, for any fixed direction, there is some radius $r$ such that as long as $v$ is within distance $r$ of the origin, then $f(v)le f(0)$. But since the $r$ depends on the direction, we can't necessarily find a single $r$ which works for all directions, so that might allow for a counter-example.
As a bonus, if it does hold for smooth functions, what about functions that are merely differentiable? Continuous? Or even all functions?
multivariable-calculus maxima-minima
multivariable-calculus maxima-minima
asked Sep 16 '18 at 23:49
Carmeister
2,7842921
2,7842921
I just had the same question myself. We can possibly apply compactness to get a minimum $r$, as long as we can choose $r$ as a continuous function of the direction, but I don't quite see a way to make this work.
– Misha Lavrov
2 days ago
add a comment |
I just had the same question myself. We can possibly apply compactness to get a minimum $r$, as long as we can choose $r$ as a continuous function of the direction, but I don't quite see a way to make this work.
– Misha Lavrov
2 days ago
I just had the same question myself. We can possibly apply compactness to get a minimum $r$, as long as we can choose $r$ as a continuous function of the direction, but I don't quite see a way to make this work.
– Misha Lavrov
2 days ago
I just had the same question myself. We can possibly apply compactness to get a minimum $r$, as long as we can choose $r$ as a continuous function of the direction, but I don't quite see a way to make this work.
– Misha Lavrov
2 days ago
add a comment |
1 Answer
1
active
oldest
votes
After thinking about it for a while I realized that the answer to this question is no, even for polynomial functions. Consider the following function, defined in polar coordinates:
$$f(r,theta)=r^4(r^2-cos^2theta)(r^2-2cos^2theta)$$
For any fixed value of $theta$, we have a local min at $0$: if $costheta=0$, then we just get $g(r)=r^8$, while for $costhetane 0$, we get $g(r)=2r^4cos^4theta-3r^6cos^2theta+r^8$. The leading term for small $r$ is $2r^4cos^4theta$, which also has a local min at $r=0$.
However, can find arbitrarily small $r$ with $f(r,theta)<0$. Given any (small) $r$, choose $theta$ so that $frac{r}{sqrt 2}<costheta<r$.
If we switch to rectangular coordinates, $x=rcostheta$, $y=rsintheta$, we get the degree $8$ polynomial:
$$2x^4-3x^6+x^8-6x^4y^2+4x^6y^2-3x^2y^4+6x^4y^4+4x^2y^6+y^8$$
So this function is, in fact, a polynomial, the nicest type of function around!
Neat construction! To visualize what's going on, we can factor $f(x,y)$ as $(x^2+y^2+x)(x^2+y^2-x)(x^2+y^2+sqrt2 x)(x^2+y^2-sqrt2 x)$: the product of four circles passing through $(0,0)$, two small ones inside two larger ones. For this product to be negative, $(x,y)$ must be inside a large circle but outside a small one; here is a plot of this region. In any direction from $0$, we must go through a positive region before reaching a negative one.
– Misha Lavrov
2 days ago
1
I guess on that basis, we could take half the picture for another counterexample: say, $f(x,y) = (x^2+y^2-x)(x^2+y^2-2x)$ would also work.
– Misha Lavrov
2 days ago
@MishaLavrov Ah, good thinking! Looking at the regions where $f$ is positive and negative is a nice way to visualize it.
– Carmeister
2 days ago
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2919600%2fcan-we-tell-if-a-function-has-a-max-or-min-by-looking-along-specific-directions%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
After thinking about it for a while I realized that the answer to this question is no, even for polynomial functions. Consider the following function, defined in polar coordinates:
$$f(r,theta)=r^4(r^2-cos^2theta)(r^2-2cos^2theta)$$
For any fixed value of $theta$, we have a local min at $0$: if $costheta=0$, then we just get $g(r)=r^8$, while for $costhetane 0$, we get $g(r)=2r^4cos^4theta-3r^6cos^2theta+r^8$. The leading term for small $r$ is $2r^4cos^4theta$, which also has a local min at $r=0$.
However, can find arbitrarily small $r$ with $f(r,theta)<0$. Given any (small) $r$, choose $theta$ so that $frac{r}{sqrt 2}<costheta<r$.
If we switch to rectangular coordinates, $x=rcostheta$, $y=rsintheta$, we get the degree $8$ polynomial:
$$2x^4-3x^6+x^8-6x^4y^2+4x^6y^2-3x^2y^4+6x^4y^4+4x^2y^6+y^8$$
So this function is, in fact, a polynomial, the nicest type of function around!
Neat construction! To visualize what's going on, we can factor $f(x,y)$ as $(x^2+y^2+x)(x^2+y^2-x)(x^2+y^2+sqrt2 x)(x^2+y^2-sqrt2 x)$: the product of four circles passing through $(0,0)$, two small ones inside two larger ones. For this product to be negative, $(x,y)$ must be inside a large circle but outside a small one; here is a plot of this region. In any direction from $0$, we must go through a positive region before reaching a negative one.
– Misha Lavrov
2 days ago
1
I guess on that basis, we could take half the picture for another counterexample: say, $f(x,y) = (x^2+y^2-x)(x^2+y^2-2x)$ would also work.
– Misha Lavrov
2 days ago
@MishaLavrov Ah, good thinking! Looking at the regions where $f$ is positive and negative is a nice way to visualize it.
– Carmeister
2 days ago
add a comment |
After thinking about it for a while I realized that the answer to this question is no, even for polynomial functions. Consider the following function, defined in polar coordinates:
$$f(r,theta)=r^4(r^2-cos^2theta)(r^2-2cos^2theta)$$
For any fixed value of $theta$, we have a local min at $0$: if $costheta=0$, then we just get $g(r)=r^8$, while for $costhetane 0$, we get $g(r)=2r^4cos^4theta-3r^6cos^2theta+r^8$. The leading term for small $r$ is $2r^4cos^4theta$, which also has a local min at $r=0$.
However, can find arbitrarily small $r$ with $f(r,theta)<0$. Given any (small) $r$, choose $theta$ so that $frac{r}{sqrt 2}<costheta<r$.
If we switch to rectangular coordinates, $x=rcostheta$, $y=rsintheta$, we get the degree $8$ polynomial:
$$2x^4-3x^6+x^8-6x^4y^2+4x^6y^2-3x^2y^4+6x^4y^4+4x^2y^6+y^8$$
So this function is, in fact, a polynomial, the nicest type of function around!
Neat construction! To visualize what's going on, we can factor $f(x,y)$ as $(x^2+y^2+x)(x^2+y^2-x)(x^2+y^2+sqrt2 x)(x^2+y^2-sqrt2 x)$: the product of four circles passing through $(0,0)$, two small ones inside two larger ones. For this product to be negative, $(x,y)$ must be inside a large circle but outside a small one; here is a plot of this region. In any direction from $0$, we must go through a positive region before reaching a negative one.
– Misha Lavrov
2 days ago
1
I guess on that basis, we could take half the picture for another counterexample: say, $f(x,y) = (x^2+y^2-x)(x^2+y^2-2x)$ would also work.
– Misha Lavrov
2 days ago
@MishaLavrov Ah, good thinking! Looking at the regions where $f$ is positive and negative is a nice way to visualize it.
– Carmeister
2 days ago
add a comment |
After thinking about it for a while I realized that the answer to this question is no, even for polynomial functions. Consider the following function, defined in polar coordinates:
$$f(r,theta)=r^4(r^2-cos^2theta)(r^2-2cos^2theta)$$
For any fixed value of $theta$, we have a local min at $0$: if $costheta=0$, then we just get $g(r)=r^8$, while for $costhetane 0$, we get $g(r)=2r^4cos^4theta-3r^6cos^2theta+r^8$. The leading term for small $r$ is $2r^4cos^4theta$, which also has a local min at $r=0$.
However, can find arbitrarily small $r$ with $f(r,theta)<0$. Given any (small) $r$, choose $theta$ so that $frac{r}{sqrt 2}<costheta<r$.
If we switch to rectangular coordinates, $x=rcostheta$, $y=rsintheta$, we get the degree $8$ polynomial:
$$2x^4-3x^6+x^8-6x^4y^2+4x^6y^2-3x^2y^4+6x^4y^4+4x^2y^6+y^8$$
So this function is, in fact, a polynomial, the nicest type of function around!
After thinking about it for a while I realized that the answer to this question is no, even for polynomial functions. Consider the following function, defined in polar coordinates:
$$f(r,theta)=r^4(r^2-cos^2theta)(r^2-2cos^2theta)$$
For any fixed value of $theta$, we have a local min at $0$: if $costheta=0$, then we just get $g(r)=r^8$, while for $costhetane 0$, we get $g(r)=2r^4cos^4theta-3r^6cos^2theta+r^8$. The leading term for small $r$ is $2r^4cos^4theta$, which also has a local min at $r=0$.
However, can find arbitrarily small $r$ with $f(r,theta)<0$. Given any (small) $r$, choose $theta$ so that $frac{r}{sqrt 2}<costheta<r$.
If we switch to rectangular coordinates, $x=rcostheta$, $y=rsintheta$, we get the degree $8$ polynomial:
$$2x^4-3x^6+x^8-6x^4y^2+4x^6y^2-3x^2y^4+6x^4y^4+4x^2y^6+y^8$$
So this function is, in fact, a polynomial, the nicest type of function around!
answered 2 days ago
Carmeister
2,7842921
2,7842921
Neat construction! To visualize what's going on, we can factor $f(x,y)$ as $(x^2+y^2+x)(x^2+y^2-x)(x^2+y^2+sqrt2 x)(x^2+y^2-sqrt2 x)$: the product of four circles passing through $(0,0)$, two small ones inside two larger ones. For this product to be negative, $(x,y)$ must be inside a large circle but outside a small one; here is a plot of this region. In any direction from $0$, we must go through a positive region before reaching a negative one.
– Misha Lavrov
2 days ago
1
I guess on that basis, we could take half the picture for another counterexample: say, $f(x,y) = (x^2+y^2-x)(x^2+y^2-2x)$ would also work.
– Misha Lavrov
2 days ago
@MishaLavrov Ah, good thinking! Looking at the regions where $f$ is positive and negative is a nice way to visualize it.
– Carmeister
2 days ago
add a comment |
Neat construction! To visualize what's going on, we can factor $f(x,y)$ as $(x^2+y^2+x)(x^2+y^2-x)(x^2+y^2+sqrt2 x)(x^2+y^2-sqrt2 x)$: the product of four circles passing through $(0,0)$, two small ones inside two larger ones. For this product to be negative, $(x,y)$ must be inside a large circle but outside a small one; here is a plot of this region. In any direction from $0$, we must go through a positive region before reaching a negative one.
– Misha Lavrov
2 days ago
1
I guess on that basis, we could take half the picture for another counterexample: say, $f(x,y) = (x^2+y^2-x)(x^2+y^2-2x)$ would also work.
– Misha Lavrov
2 days ago
@MishaLavrov Ah, good thinking! Looking at the regions where $f$ is positive and negative is a nice way to visualize it.
– Carmeister
2 days ago
Neat construction! To visualize what's going on, we can factor $f(x,y)$ as $(x^2+y^2+x)(x^2+y^2-x)(x^2+y^2+sqrt2 x)(x^2+y^2-sqrt2 x)$: the product of four circles passing through $(0,0)$, two small ones inside two larger ones. For this product to be negative, $(x,y)$ must be inside a large circle but outside a small one; here is a plot of this region. In any direction from $0$, we must go through a positive region before reaching a negative one.
– Misha Lavrov
2 days ago
Neat construction! To visualize what's going on, we can factor $f(x,y)$ as $(x^2+y^2+x)(x^2+y^2-x)(x^2+y^2+sqrt2 x)(x^2+y^2-sqrt2 x)$: the product of four circles passing through $(0,0)$, two small ones inside two larger ones. For this product to be negative, $(x,y)$ must be inside a large circle but outside a small one; here is a plot of this region. In any direction from $0$, we must go through a positive region before reaching a negative one.
– Misha Lavrov
2 days ago
1
1
I guess on that basis, we could take half the picture for another counterexample: say, $f(x,y) = (x^2+y^2-x)(x^2+y^2-2x)$ would also work.
– Misha Lavrov
2 days ago
I guess on that basis, we could take half the picture for another counterexample: say, $f(x,y) = (x^2+y^2-x)(x^2+y^2-2x)$ would also work.
– Misha Lavrov
2 days ago
@MishaLavrov Ah, good thinking! Looking at the regions where $f$ is positive and negative is a nice way to visualize it.
– Carmeister
2 days ago
@MishaLavrov Ah, good thinking! Looking at the regions where $f$ is positive and negative is a nice way to visualize it.
– Carmeister
2 days ago
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2919600%2fcan-we-tell-if-a-function-has-a-max-or-min-by-looking-along-specific-directions%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I just had the same question myself. We can possibly apply compactness to get a minimum $r$, as long as we can choose $r$ as a continuous function of the direction, but I don't quite see a way to make this work.
– Misha Lavrov
2 days ago