# Find more solutions by using Minimize function

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?

• 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 π}, θ]]]]]]] Jun 11, 2020 at 15:05
• Since x only appears as x^2 use Minimize[{x^2*y, x^2 + y^2 == 1, #}, {x, y}] & /@ {x >= 0, x < 0} Jun 11, 2020 at 16:50

## 2 Answers

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}


what kind of points are they?

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


strictly, these are saddle points

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}]
]


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}}$$:

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.

• 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]. Jun 12, 2020 at 0:53
• 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. Jun 12, 2020 at 12:13