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
How to split a string in two substrings of same length using bash?
If Boris Johnson were prosecuted and convicted of lying about Brexit, can that be used to cancel Brexit?
Is the capacitor drawn or wired wrongly?
Is there any word or phrase for negative bearing?
Is it possible for people to live in the eye of a permanent hypercane?
Responsibility for visa checking
Did thousands of women die every year due to illegal abortions before Roe v. Wade?
You've spoiled/damaged the card
Avoiding cliches when writing gods
Metal bar on DMM PCB
Working in the USA for living expenses only; allowed on VWP?
What happens to foam insulation board after you pour concrete slab?
Traffic law UK, pedestrians
Is the decompression of compressed and encrypted data without decryption also theoretically impossible?
Riley's, assemble!
What happens if you do emergency landing on a US base in middle of the ocean?
What are they doing to this poor rocket?
Could the Missouri River be running while Lake Michigan was frozen several meters deep?
Can Green-Flame Blade be cast twice with the Hunter ranger's Horde Breaker ability?
Java 8: How to convert String to Map<String,List<String>>?
Why is c4 bad when playing the London against a King's Indian?
How to pass a regex when finding a directory path in bash?
Did Darth Vader wear the same suit for 20+ years?
Can a magnetic field of an object be stronger than its gravity?
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
81.7k3105209
81.7k3105209
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