Maximizing the Area of an Inscribed Rectangle in an Ellipse
Authors: Housam Binous and Ahmed Bellagi
Maximizing the Area of an Inscribed Rectangle in an Ellipse
Authors: Housam Binous and Ahmed Bellagi
Authors: Housam Binous and Ahmed Bellagi
We find the maximum area of an inscribed rectangle in an ellipse using FindMaximum.
In[]:=
sol=FindMaximum[{xy,x^2/5+y^2==1},{x,1},{y,1}]
Out[]=
{1.11803,{x1.58114,y0.707107}}
In[]:=
Show[ContourPlot[x^2/5+y^2==1,{x,-2.5,2.5},{y,-2.2,2.2},ContourStyle->Darker@Red],Graphics[{Red,Opacity[0.3],EdgeForm[Thick],Rectangle[{-x,-y},{x,y}]/.sol[[2]]}],GridLines->Automatic,FrameLabel->{Style["x",16],Style["y",16]}](*theareaoftheinscribedrectangleis1.11803*)
Out[]=
In[]:=
sol=FindMaximum[{xy,3x^2+y^2==1},{x,1},{y,1}]
Out[]=
{0.288675,{x0.408248,y0.707107}}
In[]:=
Show[ContourPlot[3x^2+y^2==1,{x,-1,1},{y,-1,1},ContourStyle->Darker@Blue],Graphics[{Green,Opacity[0.3],EdgeForm[Thick],Rectangle[{-x,-y},{x,y}]/.sol[[2]]}],GridLines->Automatic,FrameLabel->{Style["x",16],Style["y",16]}](*theareaoftheinscribedrectangleis0.288675*)
Out[]=