Mathematica Asked on November 23, 2021
I am trying to find minimum of this expression:
$$log _aleft(frac{4}{9} (3b-1)right)+8 log_{frac{b}{a}}^2(a)-1,$$
where $ 0 < b < a < 1$. I tried
Clear[a, b]
Minimize[Log[a, 4 (3 b - 1)/9] + 8 (Log[b/a, a])^2 - 1,
0 < b < a < 1, {a, b}]
But I don’t get the result. How can I get the result?
You do not need numerical guess to find the minimum. Setting both partial derivatives to zero and eliminating variable a is enough.
f = Log[a, 4 (3 b - 1)/9] + 8 (Log[b/a, a])^2 - 1 //
PowerExpand[#, Assumptions -> {0 < a < 1, 1/3 < b < a}] &;
ee1 = (D[f, a] // Together // Numerator) //
PowerExpand[#, Assumptions -> {0 < a < 1, 1/3 < b < a}] &;
ee2 = (D[f, b] // Together // Numerator) //
PowerExpand[#, Assumptions -> {0 < a < 1, 1/3 < b < a}] &;
eli = Eliminate[{ee1 == 0, ee2 == 0}, Log[a]]
(* b Log[b]^5 (6 Log[2] - 6 Log[3] - 3 Log[b] + 3 Log[-1 + 3 b]) ==
Log[b]^5 (2 Log[2] - 2 Log[3] + Log[-1 + 3 b]) *)
Solve[eli && 1/3 < b < 1, b]
(* {{b -> 2/3}} *)
Solve[0 == (ee1 /. b -> 2/3) && 1/3 < a < 1, a]
(* {{a -> (2/3)^(1/3)}} *)
Answered by Akku14 on November 23, 2021
Clear["Global`*"]
f[a_, b_] := Log[a, 4 (3 b - 1)/9] + 8 (Log[b/a, a])^2 - 1
min = (FindMinimum[{f[a, b], 1/2 < b < a, 0 < a < 1}, {a, b},
WorkingPrecision -> 20] // N) /. x_Real :> RootApproximant[x] //
ToRadicals
(* {7, {a -> (2/3)^(1/3), b -> 2/3}} *)
Verifying that the approximated results are exact
{min[[1]] == f[a, b], D[f[a, b], a] == 0, D[f[a, b], b] == 0} /. min[[2]]
// FullSimplify
(* {True, True, True} *)
Answered by Bob Hanlon on November 23, 2021
We have a transcendental function of two variables and it is not straightforward to find global minima under given constraints because Minimize
behind the scene uses symbolic equation solving functionality and sometimes it has to be supported by user's insight. However using both numerical and symbolic approach we can find an exact global minimum.
We define
f[a_,b_]:= Log[a, 4 (3 b - 1)/9] + 8 (Log[b/a, a])^2 - 1
To get an insight we play with
MinimalBy[ Table[ FindMinimum[{f[a, b], 0 < b < a < 1}, {b}],
{a, 73/100, 95/100, 2/100}], First, 3]
{{7.00101, {b -> 0.659199}}, {7.02367, {b -> 0.702245}}, {7.04024, {b -> 0.619364}}}
By direct inspection we find out where we should look for the global minimum:
RegionPlot[{ f[a, b] < 7.01, f[a, b] < 7.001, f[a, b] < 7.0001},
{a, 0.84, 0.9}, {b, 0.64, 0.7}, AxesLabel -> Automatic,
WorkingPrecision -> 30, PlotPoints -> 60, MaxRecursion -> 5]
With quite a good numerical approximation we can find
FindMinimum[{f[a, b], 3/5 < b <= 4/5, b < a < 1}, {{a, 0.87}, {b, 2/3}}]
{7., {a -> 0.87358, b -> 0.666667}}
similarily works NMinimize[{f[a, b], 3/5 < b <= 4/5 < a < 1}, {a, b}]
,
while Minimize
doesn't work this way, nevertheless restricting one variable we can find an exact result. It is obvious that both partial derivatives have to vanish in the extremum:
Solve[Derivative[0, 1][f][a, 2/3] == 0 && 1/2 < a < 1, a]
{{a -> (2/3)^(1/3)}}
Minimize[{f[(2/3)^(1/3), b], 1/3 < b < 1}, b] // FullSimplify
{7, {b -> 2/3}}
Answered by Artes on November 23, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP