Quantcast
Viewing all articles
Browse latest Browse all 10

Answer by Mark McClure for Finding maximum or minimum of implicit functions

You could use Lagrange multipliers to maximize $f(x,y)=y$ subject to the constraint that$$g(x,y) = x^2 + y^2 - (2 x^2 + 2 y^2 - x)^2 = 0.$$

f[x_, y_] = y;g[x_, y_] = x^2 + y^2 - (2 x^2 + 2 y^2 - x)^2;eqs = {D[f[x, y], x] == lambda*D[g[x, y], x],  D[f[x, y], y] == lambda*D[g[x, y], y], g[x, y] == 0};Solve[eqs, {x, y, lambda}] // InputForm(* Out: {  {x -> 3/8, y -> (-3*Sqrt[3])/8, lambda -> 2/(3*Sqrt[3])},   {x -> 3/8, y -> (3*Sqrt[3])/8, lambda -> -2/(3*Sqrt[3])}}*)

The maximum value of $y$ is $3\sqrt{3}/8 \approx 0.6495$. Of course, this should occur where the proper contour of $y$ is tangent to the restraint curve. You can visualize the situation like so.

contourPic = ContourPlot[y, {x, -1, 2}, {y, -1, 1},  Contours -> Range[-2, 2, 1/2]*3 Sqrt[3]/8];restraintPic  = ContourPlot[x^2 + y^2 - (2 x^2 + 2 y^2 - x)^2 == 0,   {x, -1, 2}, {y, -1, 1}, ContourStyle -> {Thick, Black}];Show[{contourPic, restraintPic}, AspectRatio -> Automatic,  Epilog -> {PointSize[Large], Blue, Point[{3/8, 3 Sqrt[3]/8}]}]

Image may be NSFW.
Clik here to view.
enter image description here


Viewing all articles
Browse latest Browse all 10

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>