How can I get exact maximal value of this expression?Finding maximum value with position from Table of valuesHow do I find the position of the maximum value in each column of a table?Finding the associated parameter of the maximumHow to maximize the modulus of a multivariate complex-valued function?Finding maximum in the boundary limits using mathematicaNSum: Summand (or its derivative) is not numerical at pointHow to do Maximum Likelihood Estimation with this Multivariate Normal?NMaximize is not converging to a solutionUnable to find maximum value of my custom functionParametric Find Maximum
Why do radiation hardened IC packages often have long leads?
How do you play "tenth" chords on the guitar?
Difference between prepositions in "...killed during/in the war"
I've been given a project I can't complete, what should I do?
Is there a DSLR/mirorless camera with minimal options like a classic, simple SLR?
Does the new finding on "reversing a quantum jump mid-flight" rule out any interpretations of QM?
How can I write the maximally mixed state on m qubits as a linear combination of basis vectors
Do empty drive bays need to be filled?
Why did the World Bank set the global poverty line at $1.90?
To what extent do precedents in Westminster systems apply in other countries that use it?
If there's something that implicates the president why is there then a national security issue? (John Dowd)
As easy as Three, Two, One... How fast can you go from Five to Four?
Housemarks (superimposed & combined letters, heraldry)
So a part of my house disappeared... But not because of a chunk resetting
Suppose leased car is totalled: what are financial implications?
Converting from CMYK to RGB (to work with it), then back to CMYK
Rail-to-rail op-amp only reaches 90% of VCC, works sometimes, not everytime
Make Gimbap cutter
Why is the length of the Kelvin unit of temperature equal to that of the Celsius unit?
Why is Na5 not played in this line of the French Defense, Advance Variation?
How can one's career as a reviewer be ended?
bash vs. zsh: What are the practical differences?
What is the logic behind charging tax _in the form of money_ for owning property when the property does not produce money?
Should I put programming books I wrote a few years ago on my resume?
How can I get exact maximal value of this expression?
Finding maximum value with position from Table of valuesHow do I find the position of the maximum value in each column of a table?Finding the associated parameter of the maximumHow to maximize the modulus of a multivariate complex-valued function?Finding maximum in the boundary limits using mathematicaNSum: Summand (or its derivative) is not numerical at pointHow to do Maximum Likelihood Estimation with this Multivariate Normal?NMaximize is not converging to a solutionUnable to find maximum value of my custom functionParametric Find Maximum
$begingroup$
I am trying to find the exact maximum value of the expression
$$ E= sqrt5 a^2+a (4 b-2 c)+2b^2+4 b c+5 c^2+sqrt2a^2+a (2 b+2 c)+2 b^2-2 bc+2 c^2+sqrt26 a^2+a (10c-2 b)+26 b^2+10 b c+2 c^2 ,$$ where $a^2 + b^2 + c^2 = 1$ and $a, b, c > 0$.
I know that, the answer is $ 4sqrt3 + sqrt6 .$
When I tried
NMaximize[(Sqrt[2*a^2 + (2*b + 2*c)*a + 2*b^2 - 2*b*c + 2*c^2] +
Sqrt[5*a^2 + (4*b - 2*c)*a + 2*b^2 + 4*b*c + 5*c^2] +
Sqrt[26*a^2 + (-2*b + 10*c)*a + 26*b^2 + 10*b*c + 2*c^2]),
a^2 + b^2 + c^2 == 1, a > 0, b > 0, c > 0, a, b, c]
I got the approximate answer
9.37769, a -> 0.801784, b -> 0.534523, c -> 0.267261
When I tried,
Maximize[(Sqrt[2*a^2 + (2*b + 2*c)*a + 2*b^2 - 2*b*c + 2*c^2] +
Sqrt[5*a^2 + (4*b - 2*c)*a + 2*b^2 + 4*b*c + 5*c^2] +
Sqrt[26*a^2 + (-2*b + 10*c)*a + 26*b^2 + 10*b*c + 2*c^2]),
a^2 + b^2 + c^2 == 1, a > 0, b > 0, c > 0, a, b, c]
It's take about 3 minutes, I could't get the answer. How can I get exact maximize value of that expression?
maximum
$endgroup$
add a comment |
$begingroup$
I am trying to find the exact maximum value of the expression
$$ E= sqrt5 a^2+a (4 b-2 c)+2b^2+4 b c+5 c^2+sqrt2a^2+a (2 b+2 c)+2 b^2-2 bc+2 c^2+sqrt26 a^2+a (10c-2 b)+26 b^2+10 b c+2 c^2 ,$$ where $a^2 + b^2 + c^2 = 1$ and $a, b, c > 0$.
I know that, the answer is $ 4sqrt3 + sqrt6 .$
When I tried
NMaximize[(Sqrt[2*a^2 + (2*b + 2*c)*a + 2*b^2 - 2*b*c + 2*c^2] +
Sqrt[5*a^2 + (4*b - 2*c)*a + 2*b^2 + 4*b*c + 5*c^2] +
Sqrt[26*a^2 + (-2*b + 10*c)*a + 26*b^2 + 10*b*c + 2*c^2]),
a^2 + b^2 + c^2 == 1, a > 0, b > 0, c > 0, a, b, c]
I got the approximate answer
9.37769, a -> 0.801784, b -> 0.534523, c -> 0.267261
When I tried,
Maximize[(Sqrt[2*a^2 + (2*b + 2*c)*a + 2*b^2 - 2*b*c + 2*c^2] +
Sqrt[5*a^2 + (4*b - 2*c)*a + 2*b^2 + 4*b*c + 5*c^2] +
Sqrt[26*a^2 + (-2*b + 10*c)*a + 26*b^2 + 10*b*c + 2*c^2]),
a^2 + b^2 + c^2 == 1, a > 0, b > 0, c > 0, a, b, c]
It's take about 3 minutes, I could't get the answer. How can I get exact maximize value of that expression?
maximum
$endgroup$
add a comment |
$begingroup$
I am trying to find the exact maximum value of the expression
$$ E= sqrt5 a^2+a (4 b-2 c)+2b^2+4 b c+5 c^2+sqrt2a^2+a (2 b+2 c)+2 b^2-2 bc+2 c^2+sqrt26 a^2+a (10c-2 b)+26 b^2+10 b c+2 c^2 ,$$ where $a^2 + b^2 + c^2 = 1$ and $a, b, c > 0$.
I know that, the answer is $ 4sqrt3 + sqrt6 .$
When I tried
NMaximize[(Sqrt[2*a^2 + (2*b + 2*c)*a + 2*b^2 - 2*b*c + 2*c^2] +
Sqrt[5*a^2 + (4*b - 2*c)*a + 2*b^2 + 4*b*c + 5*c^2] +
Sqrt[26*a^2 + (-2*b + 10*c)*a + 26*b^2 + 10*b*c + 2*c^2]),
a^2 + b^2 + c^2 == 1, a > 0, b > 0, c > 0, a, b, c]
I got the approximate answer
9.37769, a -> 0.801784, b -> 0.534523, c -> 0.267261
When I tried,
Maximize[(Sqrt[2*a^2 + (2*b + 2*c)*a + 2*b^2 - 2*b*c + 2*c^2] +
Sqrt[5*a^2 + (4*b - 2*c)*a + 2*b^2 + 4*b*c + 5*c^2] +
Sqrt[26*a^2 + (-2*b + 10*c)*a + 26*b^2 + 10*b*c + 2*c^2]),
a^2 + b^2 + c^2 == 1, a > 0, b > 0, c > 0, a, b, c]
It's take about 3 minutes, I could't get the answer. How can I get exact maximize value of that expression?
maximum
$endgroup$
I am trying to find the exact maximum value of the expression
$$ E= sqrt5 a^2+a (4 b-2 c)+2b^2+4 b c+5 c^2+sqrt2a^2+a (2 b+2 c)+2 b^2-2 bc+2 c^2+sqrt26 a^2+a (10c-2 b)+26 b^2+10 b c+2 c^2 ,$$ where $a^2 + b^2 + c^2 = 1$ and $a, b, c > 0$.
I know that, the answer is $ 4sqrt3 + sqrt6 .$
When I tried
NMaximize[(Sqrt[2*a^2 + (2*b + 2*c)*a + 2*b^2 - 2*b*c + 2*c^2] +
Sqrt[5*a^2 + (4*b - 2*c)*a + 2*b^2 + 4*b*c + 5*c^2] +
Sqrt[26*a^2 + (-2*b + 10*c)*a + 26*b^2 + 10*b*c + 2*c^2]),
a^2 + b^2 + c^2 == 1, a > 0, b > 0, c > 0, a, b, c]
I got the approximate answer
9.37769, a -> 0.801784, b -> 0.534523, c -> 0.267261
When I tried,
Maximize[(Sqrt[2*a^2 + (2*b + 2*c)*a + 2*b^2 - 2*b*c + 2*c^2] +
Sqrt[5*a^2 + (4*b - 2*c)*a + 2*b^2 + 4*b*c + 5*c^2] +
Sqrt[26*a^2 + (-2*b + 10*c)*a + 26*b^2 + 10*b*c + 2*c^2]),
a^2 + b^2 + c^2 == 1, a > 0, b > 0, c > 0, a, b, c]
It's take about 3 minutes, I could't get the answer. How can I get exact maximize value of that expression?
maximum
maximum
edited May 27 at 4:08
minhthien_2016
asked May 26 at 12:58
minhthien_2016minhthien_2016
600311
600311
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
Writing:
rad1 = Sqrt[5 a^2 + 4 a b + 2 b^2 - 2 a c + 4 b c + 5 c^2];
rad2 = Sqrt[2] Sqrt[a^2 + b^2 - b c + c^2 + a (b + c)];
rad3 = Sqrt[2] Sqrt[13 a^2 - a b + 13 b^2 + 5 (a + b) c + c^2];
str = "PossibleClosedForm", 1, "FormulaData";
fct = rad1 + rad2 + rad3;
bond = a^2 + b^2 + c^2 == 1, a > 0, b > 0, c > 0;
sol1 = NMaximize[fct, bond, a, b, c, WorkingPrecision -> 40];
max = WolframAlpha[ToString[sol1[[1]]], str][[1, 1]];
a0 = WolframAlpha[ToString[sol1[[2, 1, 2]]], str][[1, 1]];
b0 = WolframAlpha[ToString[sol1[[2, 2, 2]]], str][[1, 1]];
c0 = WolframAlpha[ToString[sol1[[2, 3, 2]]], str][[1, 1]];
sol2 = max, a -> a0, b -> b0, c -> c0
sol1 == N[sol2]
I get:
4 Sqrt[3] + Sqrt[6], a -> 3/Sqrt[14], b -> Sqrt[2/7], c -> 1/Sqrt[14]
True
which is what is desired.
$endgroup$
add a comment |
$begingroup$
I don't know why Maximize
is unable to find the maximum. Instead of using Maximize
, you could try using Lagrange multipliers. To make the algebra easier, define:
constraint1 = 2*a^2+(2*b+2*c)*a+2*b^2-2*b*c+2*c^2 - d^2;
constraint2 = 5*a^2+(4*b-2*c)*a+2*b^2+4*b*c+5*c^2 - e^2;
constraint3 = 26*a^2+(-2*b+10*c)*a+26*b^2+10*b*c+2*c^2 - f^2;
constraint4 = a^2 + b^2 + c^2 - 1;
Then, the goal is to maximize d + e + f
subject to having each constraint equal to 0 (I'm ignoring the positivity constraint for now). Using Lagrange multipliers, we want to extremize the function:
obj = d + e + f + λ1 constraint1 + λ2 constraint2 + λ3 constraint3 + λ4 constraint4;
Setting the derivatives with respect to each of the unknowns to 0:
eqns = Thread[D[obj, a, b, c, d, e, f, λ1, λ2, λ3, λ4] == 0];
Let's solve them:
sols = Solve[eqns, a, b, c, d, e, f, λ1, λ2, λ3, λ4, Reals];//AbsoluteTiming
1.77698, Null
Now, let's impose the constraints that a
, b
, c
, d
, e
, and f
are all positive:
r = Cases[sols, x_ /; AllTrue[a, b, c, d, e, f /. x, GreaterEqualThan[0]]]
a -> 3/Sqrt[14], b -> Sqrt[2/7], c -> 1/Sqrt[14], d -> Sqrt[3],
e -> Sqrt[6],
f -> 3 Sqrt[3], λ1 -> 1/(2 Sqrt[3]), λ2 -> 1/(
2 Sqrt[6]), λ3 -> 1/(6 Sqrt[3]), λ4 ->
1/2 (-4 Sqrt[3] - Sqrt[6])
So, the maximum value is:
d + e + f /. First [r]
4 Sqrt[3] + Sqrt[6]
$endgroup$
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "387"
;
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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
,
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%2fmathematica.stackexchange.com%2fquestions%2f199132%2fhow-can-i-get-exact-maximal-value-of-this-expression%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Writing:
rad1 = Sqrt[5 a^2 + 4 a b + 2 b^2 - 2 a c + 4 b c + 5 c^2];
rad2 = Sqrt[2] Sqrt[a^2 + b^2 - b c + c^2 + a (b + c)];
rad3 = Sqrt[2] Sqrt[13 a^2 - a b + 13 b^2 + 5 (a + b) c + c^2];
str = "PossibleClosedForm", 1, "FormulaData";
fct = rad1 + rad2 + rad3;
bond = a^2 + b^2 + c^2 == 1, a > 0, b > 0, c > 0;
sol1 = NMaximize[fct, bond, a, b, c, WorkingPrecision -> 40];
max = WolframAlpha[ToString[sol1[[1]]], str][[1, 1]];
a0 = WolframAlpha[ToString[sol1[[2, 1, 2]]], str][[1, 1]];
b0 = WolframAlpha[ToString[sol1[[2, 2, 2]]], str][[1, 1]];
c0 = WolframAlpha[ToString[sol1[[2, 3, 2]]], str][[1, 1]];
sol2 = max, a -> a0, b -> b0, c -> c0
sol1 == N[sol2]
I get:
4 Sqrt[3] + Sqrt[6], a -> 3/Sqrt[14], b -> Sqrt[2/7], c -> 1/Sqrt[14]
True
which is what is desired.
$endgroup$
add a comment |
$begingroup$
Writing:
rad1 = Sqrt[5 a^2 + 4 a b + 2 b^2 - 2 a c + 4 b c + 5 c^2];
rad2 = Sqrt[2] Sqrt[a^2 + b^2 - b c + c^2 + a (b + c)];
rad3 = Sqrt[2] Sqrt[13 a^2 - a b + 13 b^2 + 5 (a + b) c + c^2];
str = "PossibleClosedForm", 1, "FormulaData";
fct = rad1 + rad2 + rad3;
bond = a^2 + b^2 + c^2 == 1, a > 0, b > 0, c > 0;
sol1 = NMaximize[fct, bond, a, b, c, WorkingPrecision -> 40];
max = WolframAlpha[ToString[sol1[[1]]], str][[1, 1]];
a0 = WolframAlpha[ToString[sol1[[2, 1, 2]]], str][[1, 1]];
b0 = WolframAlpha[ToString[sol1[[2, 2, 2]]], str][[1, 1]];
c0 = WolframAlpha[ToString[sol1[[2, 3, 2]]], str][[1, 1]];
sol2 = max, a -> a0, b -> b0, c -> c0
sol1 == N[sol2]
I get:
4 Sqrt[3] + Sqrt[6], a -> 3/Sqrt[14], b -> Sqrt[2/7], c -> 1/Sqrt[14]
True
which is what is desired.
$endgroup$
add a comment |
$begingroup$
Writing:
rad1 = Sqrt[5 a^2 + 4 a b + 2 b^2 - 2 a c + 4 b c + 5 c^2];
rad2 = Sqrt[2] Sqrt[a^2 + b^2 - b c + c^2 + a (b + c)];
rad3 = Sqrt[2] Sqrt[13 a^2 - a b + 13 b^2 + 5 (a + b) c + c^2];
str = "PossibleClosedForm", 1, "FormulaData";
fct = rad1 + rad2 + rad3;
bond = a^2 + b^2 + c^2 == 1, a > 0, b > 0, c > 0;
sol1 = NMaximize[fct, bond, a, b, c, WorkingPrecision -> 40];
max = WolframAlpha[ToString[sol1[[1]]], str][[1, 1]];
a0 = WolframAlpha[ToString[sol1[[2, 1, 2]]], str][[1, 1]];
b0 = WolframAlpha[ToString[sol1[[2, 2, 2]]], str][[1, 1]];
c0 = WolframAlpha[ToString[sol1[[2, 3, 2]]], str][[1, 1]];
sol2 = max, a -> a0, b -> b0, c -> c0
sol1 == N[sol2]
I get:
4 Sqrt[3] + Sqrt[6], a -> 3/Sqrt[14], b -> Sqrt[2/7], c -> 1/Sqrt[14]
True
which is what is desired.
$endgroup$
Writing:
rad1 = Sqrt[5 a^2 + 4 a b + 2 b^2 - 2 a c + 4 b c + 5 c^2];
rad2 = Sqrt[2] Sqrt[a^2 + b^2 - b c + c^2 + a (b + c)];
rad3 = Sqrt[2] Sqrt[13 a^2 - a b + 13 b^2 + 5 (a + b) c + c^2];
str = "PossibleClosedForm", 1, "FormulaData";
fct = rad1 + rad2 + rad3;
bond = a^2 + b^2 + c^2 == 1, a > 0, b > 0, c > 0;
sol1 = NMaximize[fct, bond, a, b, c, WorkingPrecision -> 40];
max = WolframAlpha[ToString[sol1[[1]]], str][[1, 1]];
a0 = WolframAlpha[ToString[sol1[[2, 1, 2]]], str][[1, 1]];
b0 = WolframAlpha[ToString[sol1[[2, 2, 2]]], str][[1, 1]];
c0 = WolframAlpha[ToString[sol1[[2, 3, 2]]], str][[1, 1]];
sol2 = max, a -> a0, b -> b0, c -> c0
sol1 == N[sol2]
I get:
4 Sqrt[3] + Sqrt[6], a -> 3/Sqrt[14], b -> Sqrt[2/7], c -> 1/Sqrt[14]
True
which is what is desired.
edited May 26 at 17:11
answered May 26 at 17:05
TeMTeM
2,131621
2,131621
add a comment |
add a comment |
$begingroup$
I don't know why Maximize
is unable to find the maximum. Instead of using Maximize
, you could try using Lagrange multipliers. To make the algebra easier, define:
constraint1 = 2*a^2+(2*b+2*c)*a+2*b^2-2*b*c+2*c^2 - d^2;
constraint2 = 5*a^2+(4*b-2*c)*a+2*b^2+4*b*c+5*c^2 - e^2;
constraint3 = 26*a^2+(-2*b+10*c)*a+26*b^2+10*b*c+2*c^2 - f^2;
constraint4 = a^2 + b^2 + c^2 - 1;
Then, the goal is to maximize d + e + f
subject to having each constraint equal to 0 (I'm ignoring the positivity constraint for now). Using Lagrange multipliers, we want to extremize the function:
obj = d + e + f + λ1 constraint1 + λ2 constraint2 + λ3 constraint3 + λ4 constraint4;
Setting the derivatives with respect to each of the unknowns to 0:
eqns = Thread[D[obj, a, b, c, d, e, f, λ1, λ2, λ3, λ4] == 0];
Let's solve them:
sols = Solve[eqns, a, b, c, d, e, f, λ1, λ2, λ3, λ4, Reals];//AbsoluteTiming
1.77698, Null
Now, let's impose the constraints that a
, b
, c
, d
, e
, and f
are all positive:
r = Cases[sols, x_ /; AllTrue[a, b, c, d, e, f /. x, GreaterEqualThan[0]]]
a -> 3/Sqrt[14], b -> Sqrt[2/7], c -> 1/Sqrt[14], d -> Sqrt[3],
e -> Sqrt[6],
f -> 3 Sqrt[3], λ1 -> 1/(2 Sqrt[3]), λ2 -> 1/(
2 Sqrt[6]), λ3 -> 1/(6 Sqrt[3]), λ4 ->
1/2 (-4 Sqrt[3] - Sqrt[6])
So, the maximum value is:
d + e + f /. First [r]
4 Sqrt[3] + Sqrt[6]
$endgroup$
add a comment |
$begingroup$
I don't know why Maximize
is unable to find the maximum. Instead of using Maximize
, you could try using Lagrange multipliers. To make the algebra easier, define:
constraint1 = 2*a^2+(2*b+2*c)*a+2*b^2-2*b*c+2*c^2 - d^2;
constraint2 = 5*a^2+(4*b-2*c)*a+2*b^2+4*b*c+5*c^2 - e^2;
constraint3 = 26*a^2+(-2*b+10*c)*a+26*b^2+10*b*c+2*c^2 - f^2;
constraint4 = a^2 + b^2 + c^2 - 1;
Then, the goal is to maximize d + e + f
subject to having each constraint equal to 0 (I'm ignoring the positivity constraint for now). Using Lagrange multipliers, we want to extremize the function:
obj = d + e + f + λ1 constraint1 + λ2 constraint2 + λ3 constraint3 + λ4 constraint4;
Setting the derivatives with respect to each of the unknowns to 0:
eqns = Thread[D[obj, a, b, c, d, e, f, λ1, λ2, λ3, λ4] == 0];
Let's solve them:
sols = Solve[eqns, a, b, c, d, e, f, λ1, λ2, λ3, λ4, Reals];//AbsoluteTiming
1.77698, Null
Now, let's impose the constraints that a
, b
, c
, d
, e
, and f
are all positive:
r = Cases[sols, x_ /; AllTrue[a, b, c, d, e, f /. x, GreaterEqualThan[0]]]
a -> 3/Sqrt[14], b -> Sqrt[2/7], c -> 1/Sqrt[14], d -> Sqrt[3],
e -> Sqrt[6],
f -> 3 Sqrt[3], λ1 -> 1/(2 Sqrt[3]), λ2 -> 1/(
2 Sqrt[6]), λ3 -> 1/(6 Sqrt[3]), λ4 ->
1/2 (-4 Sqrt[3] - Sqrt[6])
So, the maximum value is:
d + e + f /. First [r]
4 Sqrt[3] + Sqrt[6]
$endgroup$
add a comment |
$begingroup$
I don't know why Maximize
is unable to find the maximum. Instead of using Maximize
, you could try using Lagrange multipliers. To make the algebra easier, define:
constraint1 = 2*a^2+(2*b+2*c)*a+2*b^2-2*b*c+2*c^2 - d^2;
constraint2 = 5*a^2+(4*b-2*c)*a+2*b^2+4*b*c+5*c^2 - e^2;
constraint3 = 26*a^2+(-2*b+10*c)*a+26*b^2+10*b*c+2*c^2 - f^2;
constraint4 = a^2 + b^2 + c^2 - 1;
Then, the goal is to maximize d + e + f
subject to having each constraint equal to 0 (I'm ignoring the positivity constraint for now). Using Lagrange multipliers, we want to extremize the function:
obj = d + e + f + λ1 constraint1 + λ2 constraint2 + λ3 constraint3 + λ4 constraint4;
Setting the derivatives with respect to each of the unknowns to 0:
eqns = Thread[D[obj, a, b, c, d, e, f, λ1, λ2, λ3, λ4] == 0];
Let's solve them:
sols = Solve[eqns, a, b, c, d, e, f, λ1, λ2, λ3, λ4, Reals];//AbsoluteTiming
1.77698, Null
Now, let's impose the constraints that a
, b
, c
, d
, e
, and f
are all positive:
r = Cases[sols, x_ /; AllTrue[a, b, c, d, e, f /. x, GreaterEqualThan[0]]]
a -> 3/Sqrt[14], b -> Sqrt[2/7], c -> 1/Sqrt[14], d -> Sqrt[3],
e -> Sqrt[6],
f -> 3 Sqrt[3], λ1 -> 1/(2 Sqrt[3]), λ2 -> 1/(
2 Sqrt[6]), λ3 -> 1/(6 Sqrt[3]), λ4 ->
1/2 (-4 Sqrt[3] - Sqrt[6])
So, the maximum value is:
d + e + f /. First [r]
4 Sqrt[3] + Sqrt[6]
$endgroup$
I don't know why Maximize
is unable to find the maximum. Instead of using Maximize
, you could try using Lagrange multipliers. To make the algebra easier, define:
constraint1 = 2*a^2+(2*b+2*c)*a+2*b^2-2*b*c+2*c^2 - d^2;
constraint2 = 5*a^2+(4*b-2*c)*a+2*b^2+4*b*c+5*c^2 - e^2;
constraint3 = 26*a^2+(-2*b+10*c)*a+26*b^2+10*b*c+2*c^2 - f^2;
constraint4 = a^2 + b^2 + c^2 - 1;
Then, the goal is to maximize d + e + f
subject to having each constraint equal to 0 (I'm ignoring the positivity constraint for now). Using Lagrange multipliers, we want to extremize the function:
obj = d + e + f + λ1 constraint1 + λ2 constraint2 + λ3 constraint3 + λ4 constraint4;
Setting the derivatives with respect to each of the unknowns to 0:
eqns = Thread[D[obj, a, b, c, d, e, f, λ1, λ2, λ3, λ4] == 0];
Let's solve them:
sols = Solve[eqns, a, b, c, d, e, f, λ1, λ2, λ3, λ4, Reals];//AbsoluteTiming
1.77698, Null
Now, let's impose the constraints that a
, b
, c
, d
, e
, and f
are all positive:
r = Cases[sols, x_ /; AllTrue[a, b, c, d, e, f /. x, GreaterEqualThan[0]]]
a -> 3/Sqrt[14], b -> Sqrt[2/7], c -> 1/Sqrt[14], d -> Sqrt[3],
e -> Sqrt[6],
f -> 3 Sqrt[3], λ1 -> 1/(2 Sqrt[3]), λ2 -> 1/(
2 Sqrt[6]), λ3 -> 1/(6 Sqrt[3]), λ4 ->
1/2 (-4 Sqrt[3] - Sqrt[6])
So, the maximum value is:
d + e + f /. First [r]
4 Sqrt[3] + Sqrt[6]
answered May 26 at 20:33
Carl WollCarl Woll
83.2k3105216
83.2k3105216
add a comment |
add a comment |
Thanks for contributing an answer to Mathematica 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.
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%2fmathematica.stackexchange.com%2fquestions%2f199132%2fhow-can-i-get-exact-maximal-value-of-this-expression%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