<s>[INST] Maximizing Area of Triangle in Circle I was playing around with another example that I made up where I am trying to maximize the area of a triangle inscribed in a circle of radius. I want to do the problem using the method of Lagrange Multipliers.

Attempt: Consider the circle of radius 2 given by  $x^2+y^2=4$. The function we are trying to maximize is $A(x,y) = \frac{1}{2}xy$. Let $h(x,y)=4-x^2-y^2$.
Then, $\nabla h(x,y) = [-2x \ \ -2y ]$ and $\nabla A(x,y) = [\frac{y}{2} \ \ \frac{x}{2}]$. We want, $ [\frac{y}{2} \ \ \frac{x}{2}]= \lambda[-2x \ \ -2y ] $. So, $[x \ \ y]=[-4\lambda y \ \ -4\lambda x]$.
Hence, $(-4\lambda y)^2+(-4\lambda x)^2 = 4 \Rightarrow 4\lambda^2(y^2+x^2)=1 \Rightarrow x^2+y^2 = \frac{1}{4\lambda^2} \Rightarrow \lambda = \frac{1}{4}$. It then follows that $[x \ \ y] = [-0.5y \ \ -0.5x]$. And, $h(-0.5y,y) = 4-\frac{5}{4}y^2 = 0 \Rightarrow [x \ \ y] = [\frac{-4}{\sqrt{5}} \ \ \frac{4}{\sqrt{5}}]$. But then $A(x,y)<0$.

Question: What am I doing wrong?
 [/INST] The area is wrong. For a triangle inscribed in a circle (WLOG), you can assume one axis is parallel to the $x$ axis, say at height $y$. Then, the three points are:
$$\left(\sqrt{4-y^2},y\right),\ \left(-\sqrt{4-y^2},y\right), (x_3, y_3)$$
The area is therefore: $$A=(y_3-y)\sqrt{4-y^2}$$
</s>