# Max and Min of function via Lagrange multipliers

1. Oct 13, 2012

### CAF123

1. The problem statement, all variables and given/known data
If n is a fixed positive integer, compute the max and min values of the function $$(x-y)^n = f(x,y),$$ under the constraint $x^2 + 3y^2 = 1$

3. The attempt at a solution
I got the 4 critical points $(±\frac{\sqrt{3}}{2}, ±\frac{1}{2\sqrt{3}})\,\,\text{and}\,\, (±\frac{1}{2},±\frac{1}{2})$
Correct? My question is : to find the max and min of this function under this constraint, I split n into even and odd cases and found the values from there. Is that the right way to go about the question?

2. Oct 14, 2012

### CAF123

I alo noted that I got 4 values of x but I only had 3 equations. Does this make sense?

3. Oct 14, 2012

### micromass

4. Oct 14, 2012

### Ray Vickson

Sure: you can get more than one value from a single equation. For example, the single equation x^2 = 4 has two roots: x = 2 and x = -2.

RGV

5. Oct 14, 2012

### CAF123

I computed $f_{x}, f_{y}, g_{x}, g_{y}$ and solved the system of equations: $$n(x-y)^{n-1} = 2\lambda x, -n(x-y)^{n-1} = 6\lambda y\,\,\text{and}\,\, x^2 + 3y^2 =1$$ Adding the first of these equations gives λ=0 or x=-3y. Sub x=-3y into the constraint to give y= ±1/sqrt(12) which implies x= ±(sqrt(3))/2. Now using λ=0 gives x=y , which again by the constraint gives x=±1/2 and y=±1/2. Correct?

To find the max and min I split n into even and odd. I am pretty confident this is correct because I have suitable answers, but I was wondering if the question wanted me to do something else(purely because I had to prove the cases for any n=2k, n= 2k+1, etc.. which that sort of style of working I had not done before in calculus)