Help with Lagrangian Constrained Optimisation

205 Views Asked by At

Question:
Maximise f (x, y) = x2y, where (x, y) ∈ R2
given the constraint that all (x, y) are points on a circle with radius √3 around origin (0, 0).

Solution:
f (±√2, 1) = 2 is the maximal value

I tried:

∂f/∂x = 2xy
∂f/∂y = x2
∂g/∂x = 2xy+y2
∂g/∂y = 2y + x2

∂f/∂x = λ(∂g/∂x) = 0
therefore:
2xy-2λx-λy2=0 {equation1}

∂f/∂y = λ(∂g/∂y) = 0
therefore:
x^2+2λy+λx2=0 {equation2}

x^2 + y2 = 3 {equation 3}

{eq1} in terms of λ:
λ = 2xy/(2x+y2)
sub λ into {eq2} gives me a big equation in terms of x and y {equation4}

Simultaneously solving {4} and {3}

2*((2xy)/(2x+y2))y + ((2xy)/(2x+y^2))(x^2) + (x^2) = 0, x^2+y^2 = 3

with wolfram, gives me answers that dont look like the given answer

4

There are 4 best solutions below

0
On BEST ANSWER

Here is a plot that shows what's going on geometrically with Lagrangian multipliers in this case. The red line is the $x^2+y^2=3$ constraint, whereas the underlying contour plot is $f(x,y)=x^2 y$ (lighter regions are at higher values:

$\hspace{3 cm}$ contours

The key observation is that the contour which just 'kisses' the constraint line represents larger values than any other contours which intersect the constraint line. So a way to maximize $f(x,y)$ while satisfying the constraint $g(x,y)$ is to require that the two curves be tangent at that intersection. That amounts to requiring that the gradients of the two functions be proportional i.e. $\nabla f =c\nabla g$ for some constant $c$. But that is equivalent (with $c=-\lambda$) to the Lagrangian multiplier scheme.

0
On

I had made errors in my partial derivatives of g:
They should be
∂g/∂x = 2xy
∂g/∂y = 2y
Making the solution alot easier

enter image description here

Thankyou to @semiclassical for the help

0
On

Alternative method:

$$v=\sin(\theta)$$

$$f = 3 \cos(\theta)^2 \sqrt{3} \sin(\theta)=3\sqrt{3} v(1-v^2)$$

$$f' = 3\sqrt{3}(1-3v^2)$$

Hence when $f$ is maximised $v= \pm 1/\sqrt{3}$, and we can see from the expression of $f$ this occurs at the positive value of $v$, leading to a maximum for $f$ of $2$.

Some trigonometry remains to get the full details.

0
On

Hint

You are asked to maximize $F=x^2 y$ subject to the constraint $G=x^2+y^2-3=0$. So, using Lagrange multipliers, let us minimize $$\Phi=x^2 y+\lambda (x^2+y^2-3)$$ The derivatives are $$\Phi'_x=2 \lambda x+2 x y=0$$ $$\Phi'_y=x^2+2 \lambda y=0$$ $$\Phi'_{\lambda}=x^2+y^2-3=0$$ The solutions of this system are $$x=0,y=-\sqrt 3,\lambda=0$$ $$x=0,y=\sqrt 3,\lambda=0$$ $$x=-\sqrt 2,y=-1,\lambda=1$$ $$x=-\sqrt 2,y=1,\lambda=-1$$ $$x=\sqrt 2,y=-1,\lambda=1$$ $$x=\sqrt 2,y=1,\lambda=-1$$

I am sure that you can take from here.