2
$\begingroup$

I'd like to find minmum value in x^2*y under equation constraint x^2 + y^2 == 1 Hence, I use following code:

Minimize[{x^2*y, x^2 + y^2 == 1}, {x, y}]

I got

$$\left\{-\frac{2}{3 \sqrt{3}},\left\{x\to -\sqrt{\frac{2}{3}},y\to -\frac{1}{\sqrt{3}}\right\}\right\}$$

For the method of Lagrange multipliers,

s1 = Solve[{2 x*y + 2 l*x == 0, x^2 + 2 l*y == 0, 
    x^2 + y^2 - 1 == 0}, {x, y, l}];
ReplaceAll[x^2 y, #] & /@ s1
s1[[3]]
s1[[5]]

$$\left\{0,0,-\frac{2}{3 \sqrt{3}},\frac{2}{3 \sqrt{3}},-\frac{2}{3 \sqrt{3}},\frac{2}{3 \sqrt{3}}\right\}$$ $$\left\{x\to -\sqrt{\frac{2}{3}},y\to -\frac{1}{\sqrt{3}},l\to \frac{1}{\sqrt{3}}\right\}$$

$$\left\{x\to \sqrt{\frac{2}{3}},y\to -\frac{1}{\sqrt{3}},l\to \frac{1}{\sqrt{3}}\right\}$$

I can get two solutions. If I use Minimize function, How to get more Minimum solution?

$\endgroup$
2
  • $\begingroup$ Note you can convert to polar using $x = \cos(\theta), y = \sin(\theta)$ and $r=1$, so you could also do this: FullSimplify[ToRadicals[Quiet[Minimize[{Cos[θ]^2 Sin[θ], 0 <= θ <= 2 π}, θ]]]]]]] $\endgroup$
    – flinty
    Jun 11 '20 at 15:05
  • 2
    $\begingroup$ Since x only appears as x^2 use Minimize[{x^2*y, x^2 + y^2 == 1, #}, {x, y}] & /@ {x >= 0, x < 0} $\endgroup$
    – Bob Hanlon
    Jun 11 '20 at 16:50
0
$\begingroup$
f[x_, y_] = x^2*y;
g[x_, y_] = x^2 + y^2 - 1;

I take up Bob Hanlon's thoughts here:

min = Minimize[{f[x, y], g[x, y] == 0, #}, {x, y}] & /@ {x >= 0, x < 0}

enter image description here

what kind of points are they?

hessian = D[f[x, y], {{x, y}, 2}] /. {min[[1, 2]], min[[2, 2]]};
Det /@ hessian

enter image description here

strictly, these are saddle points

$\endgroup$
2
$\begingroup$

First, let's plot the surface $z=x^2y$ and a circle projected onto the surface. This should help you see that there are only two minima - the two warped down parts of the circle nearest to us in the plot:

Show[
 Plot3D[x^2 y, {x, -1, 1}, {y, -1.3, 1.3}, PlotTheme -> "Classic", 
  BoxRatios -> 1],
 ParametricPlot3D[{Cos[t], Sin[t], Cos[t]^2 Sin[t]}, {t, 0, 2 π}, 
  PlotStyle -> {Green, Thick}]
 ]

surface plot with circle

If we use the transformation $x = \cos(\theta), y = \sin(\theta)$ and $r=1$, we can minimize $x^2 y = \cos(\theta)^2\sin(\theta)$ to find a family of solutions:

solutions = 
 FullSimplify[ToRadicals[
   Quiet[Minimize[{Cos[θ]^2 Sin[θ], 12 π <= θ}, θ]]]]

You can see this minimium attained along a line at $y = \frac{-2}{3\sqrt{3}}$:

plot with minima

Then get the values of $\theta$ with:

solt = t /. Solve[Cos[t]^2 Sin[t] == -2/(3 Sqrt[3]), t, Reals];

Though it should be obvious the wave repeats cycles $2\pi$ apart without needing to solve it.

We have $\hat{\theta}_1=2 \pi k-\arctan\left(1/\sqrt{2}\right)$ and $\hat{\theta}_2=2 \pi k-\pi+\arctan\left(1/\sqrt{2}\right)$ for $k\in\mathbb{Z}$.

These correspond to the pairs of points in each cycle of the wave above. If you plug these back into $x=\cos(\hat{\theta}_i),y=\sin(\hat{\theta}_i)$ there are only two possible solutions - and you've already given them.

$\endgroup$
2
  • $\begingroup$ I use solt = t /. Solve[Cos[t]^2 Sin[t] == -2/(3 Sqrt[3]), t, Reals]; I got ConditionalExpression[2 ArcTan[ Root[1 - 10 #^2 + #^4& , 1, 0]] + 2 [Pi] ConditionalExpression[1, [Placeholder]], ConditionalExpression[1, [Placeholder]] [Element] Integers] and ConditionalExpression[2 ArcTan[ Root[1 - 10 #^2 + #^4& , 2, 0]] + 2 [Pi] ConditionalExpression[1, [Placeholder]], ConditionalExpression[1, [Placeholder]] [Element] Integers]. $\endgroup$
    – licheng
    Jun 12 '20 at 0:53
  • $\begingroup$ That's weird but I can confirm. If you remove Reals you get answers with Arctan[1/Sqrt[2]] but note that -2 ArcTan[Sqrt[5 + 2 Sqrt[6]]] == -\[Pi] + ArcTan[1/Sqrt[2]] anyway so you can still proceed to solve the problem. FullSimplify[Cos[-2 ArcTan[Sqrt[5 + 2 Sqrt[6]]]]] gives -Sqrt[2/3] for instance. $\endgroup$
    – flinty
    Jun 12 '20 at 12:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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