Maximizing a function whose maximum is where the derivative is not defined

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I would like to solve the following optimization problem:
beginarrayll
textmaximize & 52 - 4(x-1)^2/3 - x^2 \
textsubject to& xge 0 \
&x le 11
endarray



I know that the answer is $x=1$, a point in which the derivative of the function is not defined.



How could I find that using traditional Lagrangean multipliers?
This is how I started:



$$L(x,lambda_1, lambda_2) = 52 - 4(x-1)^2/3 - x^2 + lambda_1x+lambda_2(11-x)$$



Which yields the following first order conditions:



beginalign
-frac83(x-1)^-1/3 - 2x + lambda_1 - lambda_2 = 0 \
lambda_1x=0 \
lambda_2(11-x)=0 \
x ge 0, x le 11 \
lambda_1 ge 0, lambda_2 ge 0
endalign



After some calculations I found out that $lambda_1$ has to be $0$. However, if $lambda_1 =0$, then $lambda_2 = 0$. This leads to:



$$ -frac83(x-1)^-1/3 - 2x =0$$



Which has no solution.



What am I missing here?







share|cite|improve this question



















  • Obviously you won't find $x=1$ because you pointed out that the derivative does not exist at that point and the first KKT condition is about stationarity.
    – LinAlg
    Jul 24 at 16:17










  • The derivative is $-2 x-frac83 sqrt[3]x-1$
    – Joseph Eck
    Jul 24 at 16:21










  • @LinAlg so using the lagrangean will not give me my solution? After finding no solution I should have just supposed that the point $x=1$ would give me my answer?
    – Arthur Carvalho Brito
    Jul 24 at 16:23














up vote
0
down vote

favorite












I would like to solve the following optimization problem:
beginarrayll
textmaximize & 52 - 4(x-1)^2/3 - x^2 \
textsubject to& xge 0 \
&x le 11
endarray



I know that the answer is $x=1$, a point in which the derivative of the function is not defined.



How could I find that using traditional Lagrangean multipliers?
This is how I started:



$$L(x,lambda_1, lambda_2) = 52 - 4(x-1)^2/3 - x^2 + lambda_1x+lambda_2(11-x)$$



Which yields the following first order conditions:



beginalign
-frac83(x-1)^-1/3 - 2x + lambda_1 - lambda_2 = 0 \
lambda_1x=0 \
lambda_2(11-x)=0 \
x ge 0, x le 11 \
lambda_1 ge 0, lambda_2 ge 0
endalign



After some calculations I found out that $lambda_1$ has to be $0$. However, if $lambda_1 =0$, then $lambda_2 = 0$. This leads to:



$$ -frac83(x-1)^-1/3 - 2x =0$$



Which has no solution.



What am I missing here?







share|cite|improve this question



















  • Obviously you won't find $x=1$ because you pointed out that the derivative does not exist at that point and the first KKT condition is about stationarity.
    – LinAlg
    Jul 24 at 16:17










  • The derivative is $-2 x-frac83 sqrt[3]x-1$
    – Joseph Eck
    Jul 24 at 16:21










  • @LinAlg so using the lagrangean will not give me my solution? After finding no solution I should have just supposed that the point $x=1$ would give me my answer?
    – Arthur Carvalho Brito
    Jul 24 at 16:23












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I would like to solve the following optimization problem:
beginarrayll
textmaximize & 52 - 4(x-1)^2/3 - x^2 \
textsubject to& xge 0 \
&x le 11
endarray



I know that the answer is $x=1$, a point in which the derivative of the function is not defined.



How could I find that using traditional Lagrangean multipliers?
This is how I started:



$$L(x,lambda_1, lambda_2) = 52 - 4(x-1)^2/3 - x^2 + lambda_1x+lambda_2(11-x)$$



Which yields the following first order conditions:



beginalign
-frac83(x-1)^-1/3 - 2x + lambda_1 - lambda_2 = 0 \
lambda_1x=0 \
lambda_2(11-x)=0 \
x ge 0, x le 11 \
lambda_1 ge 0, lambda_2 ge 0
endalign



After some calculations I found out that $lambda_1$ has to be $0$. However, if $lambda_1 =0$, then $lambda_2 = 0$. This leads to:



$$ -frac83(x-1)^-1/3 - 2x =0$$



Which has no solution.



What am I missing here?







share|cite|improve this question











I would like to solve the following optimization problem:
beginarrayll
textmaximize & 52 - 4(x-1)^2/3 - x^2 \
textsubject to& xge 0 \
&x le 11
endarray



I know that the answer is $x=1$, a point in which the derivative of the function is not defined.



How could I find that using traditional Lagrangean multipliers?
This is how I started:



$$L(x,lambda_1, lambda_2) = 52 - 4(x-1)^2/3 - x^2 + lambda_1x+lambda_2(11-x)$$



Which yields the following first order conditions:



beginalign
-frac83(x-1)^-1/3 - 2x + lambda_1 - lambda_2 = 0 \
lambda_1x=0 \
lambda_2(11-x)=0 \
x ge 0, x le 11 \
lambda_1 ge 0, lambda_2 ge 0
endalign



After some calculations I found out that $lambda_1$ has to be $0$. However, if $lambda_1 =0$, then $lambda_2 = 0$. This leads to:



$$ -frac83(x-1)^-1/3 - 2x =0$$



Which has no solution.



What am I missing here?









share|cite|improve this question










share|cite|improve this question




share|cite|improve this question









asked Jul 24 at 16:05









Arthur Carvalho Brito

165




165











  • Obviously you won't find $x=1$ because you pointed out that the derivative does not exist at that point and the first KKT condition is about stationarity.
    – LinAlg
    Jul 24 at 16:17










  • The derivative is $-2 x-frac83 sqrt[3]x-1$
    – Joseph Eck
    Jul 24 at 16:21










  • @LinAlg so using the lagrangean will not give me my solution? After finding no solution I should have just supposed that the point $x=1$ would give me my answer?
    – Arthur Carvalho Brito
    Jul 24 at 16:23
















  • Obviously you won't find $x=1$ because you pointed out that the derivative does not exist at that point and the first KKT condition is about stationarity.
    – LinAlg
    Jul 24 at 16:17










  • The derivative is $-2 x-frac83 sqrt[3]x-1$
    – Joseph Eck
    Jul 24 at 16:21










  • @LinAlg so using the lagrangean will not give me my solution? After finding no solution I should have just supposed that the point $x=1$ would give me my answer?
    – Arthur Carvalho Brito
    Jul 24 at 16:23















Obviously you won't find $x=1$ because you pointed out that the derivative does not exist at that point and the first KKT condition is about stationarity.
– LinAlg
Jul 24 at 16:17




Obviously you won't find $x=1$ because you pointed out that the derivative does not exist at that point and the first KKT condition is about stationarity.
– LinAlg
Jul 24 at 16:17












The derivative is $-2 x-frac83 sqrt[3]x-1$
– Joseph Eck
Jul 24 at 16:21




The derivative is $-2 x-frac83 sqrt[3]x-1$
– Joseph Eck
Jul 24 at 16:21












@LinAlg so using the lagrangean will not give me my solution? After finding no solution I should have just supposed that the point $x=1$ would give me my answer?
– Arthur Carvalho Brito
Jul 24 at 16:23




@LinAlg so using the lagrangean will not give me my solution? After finding no solution I should have just supposed that the point $x=1$ would give me my answer?
– Arthur Carvalho Brito
Jul 24 at 16:23










1 Answer
1






active

oldest

votes

















up vote
3
down vote



accepted










The short answer is this: people often forget that critical numbers aren't only where the derivative is equal to $0$, but they are also where the derivative is undefined.



The process I advise people to take is this:



1) Are you constrained by intervals? If so, include any interval endpoints as critical numbers.



2) Are you able to find the derivative of your given function? If so, find where the derivative is equal to $0$, and also, if applicable, find where your derivative is undefined.



The set of $x$-values that are gathered from steps 1) and 2) above are your critical numbers.



In this situation, we see that $0$, $11$ are critical numbers immediately, and since the derivative is undefined at $x = 1$, $1$ is also a critical number. Thus, all three of these numbers should be tested. You should input these values into the objective function and compare their outputs directly.



Note that IF the $x$-value $x_0$ is the location of a local extrema AND a function $f$ is differentiable at $x_0$, it is the case that $f^prime(x_0) = 0$. But this DOES NOT mean that if $f^prime(x_0) = 0 implies $ there is an extrema at $x_0$. Take $f(x) = x^3$ for example.






share|cite|improve this answer























  • Thank you for clarifying! But I guess then that using Lagrange mulitpliers would not point out to all of these values gathered from your points 1 and 2?
    – Arthur Carvalho Brito
    Jul 24 at 16:33











  • @ArthurCarvalhoBrito I'm not sure how Lagrange multipliers could work in this situation. Aren't Lagrange multipliers meant to only work with equality constraints, rather than inequalities? I suppose you could look at this with a linear programming perspective, but I don't have much background there.
    – Clarinetist
    Jul 24 at 16:43










  • @ArthurCarvalhoBrito Now that I've looked at your Lagrange multiplier part of your question: it's not surprising to me that there is no solution: reason being that since Lagrange multpliers are meant to work with equality constraints, you applied two constraints with your work: $x = 0$ and $x = 11$. Obviously, these constraints cannot occur simultaneously and hence you have no solution with Lagrange multipliers.
    – Clarinetist
    Jul 24 at 16:50










  • Not sure if I am using the right words then. My book says that if I have a constrained optimization problem with inequalities, I could something similar with the lagrangian function. The difference would be the first order conditions: I would have to add that $lambda_1x=0$ and that $lambda_2(11-x)$ = 0
    – Arthur Carvalho Brito
    Jul 24 at 16:54










  • @ArthurCarvalhoBrito I'm not familiar with this idea unfortunately.
    – Clarinetist
    Jul 24 at 16:55











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',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2861501%2fmaximizing-a-function-whose-maximum-is-where-the-derivative-is-not-defined%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
3
down vote



accepted










The short answer is this: people often forget that critical numbers aren't only where the derivative is equal to $0$, but they are also where the derivative is undefined.



The process I advise people to take is this:



1) Are you constrained by intervals? If so, include any interval endpoints as critical numbers.



2) Are you able to find the derivative of your given function? If so, find where the derivative is equal to $0$, and also, if applicable, find where your derivative is undefined.



The set of $x$-values that are gathered from steps 1) and 2) above are your critical numbers.



In this situation, we see that $0$, $11$ are critical numbers immediately, and since the derivative is undefined at $x = 1$, $1$ is also a critical number. Thus, all three of these numbers should be tested. You should input these values into the objective function and compare their outputs directly.



Note that IF the $x$-value $x_0$ is the location of a local extrema AND a function $f$ is differentiable at $x_0$, it is the case that $f^prime(x_0) = 0$. But this DOES NOT mean that if $f^prime(x_0) = 0 implies $ there is an extrema at $x_0$. Take $f(x) = x^3$ for example.






share|cite|improve this answer























  • Thank you for clarifying! But I guess then that using Lagrange mulitpliers would not point out to all of these values gathered from your points 1 and 2?
    – Arthur Carvalho Brito
    Jul 24 at 16:33











  • @ArthurCarvalhoBrito I'm not sure how Lagrange multipliers could work in this situation. Aren't Lagrange multipliers meant to only work with equality constraints, rather than inequalities? I suppose you could look at this with a linear programming perspective, but I don't have much background there.
    – Clarinetist
    Jul 24 at 16:43










  • @ArthurCarvalhoBrito Now that I've looked at your Lagrange multiplier part of your question: it's not surprising to me that there is no solution: reason being that since Lagrange multpliers are meant to work with equality constraints, you applied two constraints with your work: $x = 0$ and $x = 11$. Obviously, these constraints cannot occur simultaneously and hence you have no solution with Lagrange multipliers.
    – Clarinetist
    Jul 24 at 16:50










  • Not sure if I am using the right words then. My book says that if I have a constrained optimization problem with inequalities, I could something similar with the lagrangian function. The difference would be the first order conditions: I would have to add that $lambda_1x=0$ and that $lambda_2(11-x)$ = 0
    – Arthur Carvalho Brito
    Jul 24 at 16:54










  • @ArthurCarvalhoBrito I'm not familiar with this idea unfortunately.
    – Clarinetist
    Jul 24 at 16:55















up vote
3
down vote



accepted










The short answer is this: people often forget that critical numbers aren't only where the derivative is equal to $0$, but they are also where the derivative is undefined.



The process I advise people to take is this:



1) Are you constrained by intervals? If so, include any interval endpoints as critical numbers.



2) Are you able to find the derivative of your given function? If so, find where the derivative is equal to $0$, and also, if applicable, find where your derivative is undefined.



The set of $x$-values that are gathered from steps 1) and 2) above are your critical numbers.



In this situation, we see that $0$, $11$ are critical numbers immediately, and since the derivative is undefined at $x = 1$, $1$ is also a critical number. Thus, all three of these numbers should be tested. You should input these values into the objective function and compare their outputs directly.



Note that IF the $x$-value $x_0$ is the location of a local extrema AND a function $f$ is differentiable at $x_0$, it is the case that $f^prime(x_0) = 0$. But this DOES NOT mean that if $f^prime(x_0) = 0 implies $ there is an extrema at $x_0$. Take $f(x) = x^3$ for example.






share|cite|improve this answer























  • Thank you for clarifying! But I guess then that using Lagrange mulitpliers would not point out to all of these values gathered from your points 1 and 2?
    – Arthur Carvalho Brito
    Jul 24 at 16:33











  • @ArthurCarvalhoBrito I'm not sure how Lagrange multipliers could work in this situation. Aren't Lagrange multipliers meant to only work with equality constraints, rather than inequalities? I suppose you could look at this with a linear programming perspective, but I don't have much background there.
    – Clarinetist
    Jul 24 at 16:43










  • @ArthurCarvalhoBrito Now that I've looked at your Lagrange multiplier part of your question: it's not surprising to me that there is no solution: reason being that since Lagrange multpliers are meant to work with equality constraints, you applied two constraints with your work: $x = 0$ and $x = 11$. Obviously, these constraints cannot occur simultaneously and hence you have no solution with Lagrange multipliers.
    – Clarinetist
    Jul 24 at 16:50










  • Not sure if I am using the right words then. My book says that if I have a constrained optimization problem with inequalities, I could something similar with the lagrangian function. The difference would be the first order conditions: I would have to add that $lambda_1x=0$ and that $lambda_2(11-x)$ = 0
    – Arthur Carvalho Brito
    Jul 24 at 16:54










  • @ArthurCarvalhoBrito I'm not familiar with this idea unfortunately.
    – Clarinetist
    Jul 24 at 16:55













up vote
3
down vote



accepted







up vote
3
down vote



accepted






The short answer is this: people often forget that critical numbers aren't only where the derivative is equal to $0$, but they are also where the derivative is undefined.



The process I advise people to take is this:



1) Are you constrained by intervals? If so, include any interval endpoints as critical numbers.



2) Are you able to find the derivative of your given function? If so, find where the derivative is equal to $0$, and also, if applicable, find where your derivative is undefined.



The set of $x$-values that are gathered from steps 1) and 2) above are your critical numbers.



In this situation, we see that $0$, $11$ are critical numbers immediately, and since the derivative is undefined at $x = 1$, $1$ is also a critical number. Thus, all three of these numbers should be tested. You should input these values into the objective function and compare their outputs directly.



Note that IF the $x$-value $x_0$ is the location of a local extrema AND a function $f$ is differentiable at $x_0$, it is the case that $f^prime(x_0) = 0$. But this DOES NOT mean that if $f^prime(x_0) = 0 implies $ there is an extrema at $x_0$. Take $f(x) = x^3$ for example.






share|cite|improve this answer















The short answer is this: people often forget that critical numbers aren't only where the derivative is equal to $0$, but they are also where the derivative is undefined.



The process I advise people to take is this:



1) Are you constrained by intervals? If so, include any interval endpoints as critical numbers.



2) Are you able to find the derivative of your given function? If so, find where the derivative is equal to $0$, and also, if applicable, find where your derivative is undefined.



The set of $x$-values that are gathered from steps 1) and 2) above are your critical numbers.



In this situation, we see that $0$, $11$ are critical numbers immediately, and since the derivative is undefined at $x = 1$, $1$ is also a critical number. Thus, all three of these numbers should be tested. You should input these values into the objective function and compare their outputs directly.



Note that IF the $x$-value $x_0$ is the location of a local extrema AND a function $f$ is differentiable at $x_0$, it is the case that $f^prime(x_0) = 0$. But this DOES NOT mean that if $f^prime(x_0) = 0 implies $ there is an extrema at $x_0$. Take $f(x) = x^3$ for example.







share|cite|improve this answer















share|cite|improve this answer



share|cite|improve this answer








edited Jul 24 at 16:44


























answered Jul 24 at 16:25









Clarinetist

10.3k32767




10.3k32767











  • Thank you for clarifying! But I guess then that using Lagrange mulitpliers would not point out to all of these values gathered from your points 1 and 2?
    – Arthur Carvalho Brito
    Jul 24 at 16:33











  • @ArthurCarvalhoBrito I'm not sure how Lagrange multipliers could work in this situation. Aren't Lagrange multipliers meant to only work with equality constraints, rather than inequalities? I suppose you could look at this with a linear programming perspective, but I don't have much background there.
    – Clarinetist
    Jul 24 at 16:43










  • @ArthurCarvalhoBrito Now that I've looked at your Lagrange multiplier part of your question: it's not surprising to me that there is no solution: reason being that since Lagrange multpliers are meant to work with equality constraints, you applied two constraints with your work: $x = 0$ and $x = 11$. Obviously, these constraints cannot occur simultaneously and hence you have no solution with Lagrange multipliers.
    – Clarinetist
    Jul 24 at 16:50










  • Not sure if I am using the right words then. My book says that if I have a constrained optimization problem with inequalities, I could something similar with the lagrangian function. The difference would be the first order conditions: I would have to add that $lambda_1x=0$ and that $lambda_2(11-x)$ = 0
    – Arthur Carvalho Brito
    Jul 24 at 16:54










  • @ArthurCarvalhoBrito I'm not familiar with this idea unfortunately.
    – Clarinetist
    Jul 24 at 16:55

















  • Thank you for clarifying! But I guess then that using Lagrange mulitpliers would not point out to all of these values gathered from your points 1 and 2?
    – Arthur Carvalho Brito
    Jul 24 at 16:33











  • @ArthurCarvalhoBrito I'm not sure how Lagrange multipliers could work in this situation. Aren't Lagrange multipliers meant to only work with equality constraints, rather than inequalities? I suppose you could look at this with a linear programming perspective, but I don't have much background there.
    – Clarinetist
    Jul 24 at 16:43










  • @ArthurCarvalhoBrito Now that I've looked at your Lagrange multiplier part of your question: it's not surprising to me that there is no solution: reason being that since Lagrange multpliers are meant to work with equality constraints, you applied two constraints with your work: $x = 0$ and $x = 11$. Obviously, these constraints cannot occur simultaneously and hence you have no solution with Lagrange multipliers.
    – Clarinetist
    Jul 24 at 16:50










  • Not sure if I am using the right words then. My book says that if I have a constrained optimization problem with inequalities, I could something similar with the lagrangian function. The difference would be the first order conditions: I would have to add that $lambda_1x=0$ and that $lambda_2(11-x)$ = 0
    – Arthur Carvalho Brito
    Jul 24 at 16:54










  • @ArthurCarvalhoBrito I'm not familiar with this idea unfortunately.
    – Clarinetist
    Jul 24 at 16:55
















Thank you for clarifying! But I guess then that using Lagrange mulitpliers would not point out to all of these values gathered from your points 1 and 2?
– Arthur Carvalho Brito
Jul 24 at 16:33





Thank you for clarifying! But I guess then that using Lagrange mulitpliers would not point out to all of these values gathered from your points 1 and 2?
– Arthur Carvalho Brito
Jul 24 at 16:33













@ArthurCarvalhoBrito I'm not sure how Lagrange multipliers could work in this situation. Aren't Lagrange multipliers meant to only work with equality constraints, rather than inequalities? I suppose you could look at this with a linear programming perspective, but I don't have much background there.
– Clarinetist
Jul 24 at 16:43




@ArthurCarvalhoBrito I'm not sure how Lagrange multipliers could work in this situation. Aren't Lagrange multipliers meant to only work with equality constraints, rather than inequalities? I suppose you could look at this with a linear programming perspective, but I don't have much background there.
– Clarinetist
Jul 24 at 16:43












@ArthurCarvalhoBrito Now that I've looked at your Lagrange multiplier part of your question: it's not surprising to me that there is no solution: reason being that since Lagrange multpliers are meant to work with equality constraints, you applied two constraints with your work: $x = 0$ and $x = 11$. Obviously, these constraints cannot occur simultaneously and hence you have no solution with Lagrange multipliers.
– Clarinetist
Jul 24 at 16:50




@ArthurCarvalhoBrito Now that I've looked at your Lagrange multiplier part of your question: it's not surprising to me that there is no solution: reason being that since Lagrange multpliers are meant to work with equality constraints, you applied two constraints with your work: $x = 0$ and $x = 11$. Obviously, these constraints cannot occur simultaneously and hence you have no solution with Lagrange multipliers.
– Clarinetist
Jul 24 at 16:50












Not sure if I am using the right words then. My book says that if I have a constrained optimization problem with inequalities, I could something similar with the lagrangian function. The difference would be the first order conditions: I would have to add that $lambda_1x=0$ and that $lambda_2(11-x)$ = 0
– Arthur Carvalho Brito
Jul 24 at 16:54




Not sure if I am using the right words then. My book says that if I have a constrained optimization problem with inequalities, I could something similar with the lagrangian function. The difference would be the first order conditions: I would have to add that $lambda_1x=0$ and that $lambda_2(11-x)$ = 0
– Arthur Carvalho Brito
Jul 24 at 16:54












@ArthurCarvalhoBrito I'm not familiar with this idea unfortunately.
– Clarinetist
Jul 24 at 16:55





@ArthurCarvalhoBrito I'm not familiar with this idea unfortunately.
– Clarinetist
Jul 24 at 16:55













 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2861501%2fmaximizing-a-function-whose-maximum-is-where-the-derivative-is-not-defined%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

What is the equation of a 3D cone with generalised tilt?

Color the edges and diagonals of a regular polygon

Relationship between determinant of matrix and determinant of adjoint?