0
$\begingroup$

The command

Maximize[{Sqrt[2 x + 13] + (3 y + 5)^(1/3) + (8 z + 12)^(1/4), x + y + z == 3&&{x,y,z} >= 0}, {x, y, z}]

is running without any response on my comp for hours (as well as many other Mathematica commands). This optimization problem is quite standard and easily solved by Lagrange multipliers

L=Sqrt[2x+13]+(3y+5)^(1/3)+(8z+12)^(1/4)-t*(x+y+z-3);

For simplicity the conditions {x,y,z}>=0 are not taken into account.

Reduce[D[L, x] == 0 && D[L, y] == 0 && D[L, z] == 0 && D[L, t] == 0, {x, y, z, t}, Reals]

x == 3/2 && y == 1 && z == 1/2 && t == 1/4

The Hessian of L at this point is easily found by

M = {{D[L, x, x], D[L, x, y], D[L, x, z], D[L, x, t]}, {D[L, y, x], 
D[L, y, y], D[L, y, z], D[L, y, t]}, {D[L, z, x], D[L, z, y], 
D[L, z, z], D[L, z, t]}, {D[L, t, x], D[L, t, y], D[L, t, z], 
D[L, t, t]}} /. {x -> 3/2, y -> 1, z -> 1/2, t -> 1/4}

Next, the result of

Resolve[ForAll[{a,b,c,d}, ({a,b,c,d}.M).{a,b,c,d} <= 0], PositiveReals]

True

states this is the maximum point (local and global) since the quadratic form ({a,b,c,d}.M).{a,b,c,d} takes nonpositive values on the positive reals. Is there anoter way to symbolically solve this optimization problem?

$\endgroup$
1
  • $\begingroup$ BTW. the command of Maple Student:-MultivariateCalculus:-LagrangeMultipliers(sqrt(2*x + 13) + (3*y + 5)^(1/3) + (8*z + 12)^(1/4), [x + y + z - 3], [x, y, z]) results in $\left[\frac{7}{2}-8^{\frac{1}{3}},1,-\frac{3}{2}+8^{\frac{1}{3}}\right]$. $\endgroup$
    – user64494
    Commented Jul 1, 2021 at 6:43

1 Answer 1

1
$\begingroup$

With a little help(substitute the rational powers, see @MichaelE2 coding the square ) Maximize solves the problem:

Maximize[{wx + wy + wz ,x + y + z == 3 && {x, y, z} >= 0 && wx^2 == 2 x + 13 &&wy^3 == 3 y + 5 && wz^4 == 8z + 12}, {x, y, z, wx, wy, wz} ]
(*{8, {x -> 3/2, y -> 1, z -> 1/2, wx -> 4, wy -> 2, wz -> 2}}*)
$\endgroup$
3
  • $\begingroup$ UlrichNeumann (@ does not work.) : Thank you for the reference. +1 for the MichaelE2's answer. However, this is done by hand, not automatically. $\endgroup$
    – user64494
    Commented Jul 1, 2021 at 6:25
  • 2
    $\begingroup$ You didn't ask for "automated code generation", my answer refers to your question and shows a way to force Maximize on a real solution branch. Not more. $\endgroup$ Commented Jul 1, 2021 at 6:37
  • $\begingroup$ Your statement "shows a way to force Maximize on a real solution branch. Not more." is built on the sand: Maximize[{Sqrt[2 x + 13] + Surd[3 y + 5, 3] + Surd[8 z + 12, 4], x + y + z == 3 && {x, y, z} >= 0}, {x, y, z}] is spinning too. $\endgroup$
    – user64494
    Commented Jul 1, 2021 at 6:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.