# Homework Help: Absolute extrema 2 variable function

1. Oct 24, 2015

### toothpaste666

1. The problem statement, all variables and given/known data
find the absolute extrema of f(x,y) = 2x - 2xy + y^2
in the region in the xy plane bounded by the graphs of y= x^2 and y = 1

3. The attempt at a solution
first we find the first partials
fx(x,y) = 2 - 2y
fy(x,y) = 2y-2x
2-2y = 0 when y = 1
2y - 2x = 0 when y=x in this case y=1 so x =1
f(1,1) = 1

now we check along y = 1
f(x,1) = 2x - 2x + 1 = 1
so z = 1 along the entire line y =1 . this includes the points where y=1 intersects with y=x^2

now we check along y = = x^2
f(x, x^2) = 2x -2x^3 + x^4
f'(x,x^2) = 2 - 6x^2 + 4x^3
we need this to equal 0
2 - 6x^2 + 4x^3 = 0
1 - 3x^2 + 2x^3 = 0
now I am a little lost. I need to solve this for x but there doesn't seem to be an easy way to do this. After I solve for x I plug the corresponding point into the original function to find the minimum. (the minimum has to be along this curve because it was nowhere else and it is a bounded region) I could be doing this wrong though as these types of problems are very confusing to me .

2. Oct 24, 2015

### Ray Vickson

If you want the max or min of f(x,y) along the parabola, just solve the equality-constrained problem
$$\begin{array}{rl}\max / \min & 2x - 2 xy + y^2\\ \text{subject to} &y - x^2 = 0 \end{array}$$
You can do that fairly easily using the Lagrange multiplier method.

Alternatively, you can try to solve your equation $2 x^3 - 3 x^2 + 1 = 0$, using the Rational Root Theorem, for example. Or, you can do it numerically if you are satisfied with an approximate numerical answer.

3. Oct 24, 2015

### toothpaste666

Ok i will use lagrange multipliers.
The gradient of f=(2-2y)i + (2y-2x)j
Let g= y-x^2 =0
= -2xi + j
Multiply the gradient of g by a constant c
= -2cxi + cj

We must solve the system
2-2y = -2cx
2y-2x = c
Y-x^2 = 0
Plug in our value for c into the first equation
2-2y=-2(2y-2x)x
2-2y = -4yx + 4x^2
Plug in y=x^2
2-2x^2= -4x^3 + 4x^2
2= 6x^3 - 4x^3

Wait i ended up with the same equation. I cant figure out where i went wrong

4. Oct 24, 2015

### toothpaste666

Thats supposed to be a 6x^2

5. Oct 24, 2015

### toothpaste666

I think I figured it out using the rational roots theorem.
for the equation 2x^3-3x^2 + 1
the possible rational roots are
-1/2 , 1/2 , -1 and 1
plugging them all in the only ones that give 0 are
1 and -1/2
since y = x^2 if x =1 y = 1 we already know z = 1 at this point
if x = -1/2 y = 1/4
plugging this into the original equation
f(-1/2, 1/4) = 2(-1/2) - 2(-1/2)(1/4) + (1/16)
= - 1 + (1/4) + (1/16)
= -(16/16) + (4/16) + (1/16)
= (5-16)/16
= -11/16
so the min is z = -11/16
and the max is z = 1

6. Oct 24, 2015

### Ray Vickson

Use the equations to solve for x and y in terms of c, giving
$$x = x(c) = \frac{2-c}{2(1-c)}, \; y = y(c) = \frac{2-c^2}{2(1-c)}$$
Then plug those expressions into the function g, which will now be a function $g = G(c)$ of c alone. You set $G(c) = 0$ to figure out the value (or values) of c. In this case,
$$g(x(c),y(c)) = G(c) = -\frac{c^2 (3 + 2c)}{4(1+c)^2},$$
so we need (i) $c = 0$, giving $x=1, \:y=1$; or (ii) $c = -3/2$, giving $x=-1/2, \:y = 1/4$.

That is usually (not always) the way these things are done: express the variables in terms of the multiplier, then use the constraint to fix the value of the multiplier.

7. Oct 24, 2015

thank you