# Finding max and min of functions in space

• Apr 10th 2011, 06:04 AM
Sabo
Finding max and min of functions in space
I need to find the maximum and minimum of functions in space. I've managed to solve a few exercises, but for some of them I get stuck when trying to solve for x and y. I'll give two examples below, hoping someone can point out what I'm doing wrong.

First example:
$\displaystyle f(x,y)=3x-4x^3+12xy, where \,x\geq0, y\geq0, x+y\leq1$

I approach this problem like this.
Find the points at the end (not sure what these are called in English?). They are
(0,0), (1,0), (0,1).
Find the maximum and minimum points inside the area. We find these by deriving the function twice; once with regards to x, once with regards to y. We then need find where they are zero.

$\displaystyle \frac{df}{dx}=3-12x^2+12y$
$\displaystyle \frac{df}{dy}=12x$

This is where I get stuck. How to proceed from here, assuming I've done right so far?
----------------------------------------------------------
Second example:
$\displaystyle f(x,y)=xy-ln(x^2+y^2), where \,\frac{1}{4}\leqx^2+y^2\leq4$

We see that the "extreme" points are
$\displaystyle \left(\frac{1}{2},0\right), (0, \frac{1}{2}), (2,0), (0,2)$

The two derivatives are

$\displaystyle \frac{df}{dx}=y-\frac{2x}{x^2+y^2}$
$\displaystyle \frac{df}{dy}=x-\frac{2y}{x^2+y^2}$

Again, stuck, not knowing how to proceed.

The exercies I did manage to solve made it easy for me, since adding/subtracting one to the other left me with something similiar to 2x-2y=0 etc. I know this is somewhat basic stuff, and unless I'm mistaken the exercies are created to avoid complex numbers and what not, so clearly I've missed something simple.
• Apr 10th 2011, 07:15 AM
earboth
Quote:

Originally Posted by Sabo
I need to find the maximum and minimum of functions in space. I've managed to solve a few exercises, but for some of them I get stuck when trying to solve for x and y. I'll give two examples below, hoping someone can point out what I'm doing wrong.

First example:
$\displaystyle f(x,y)=3x-4x^3+12xy, where \,x\geq0, y\geq0, x+y\leq1$

I approach this problem like this.
Find the points at the end (not sure what these are called in English?). They are
(0,0), (1,0), (0,1).
Find the maximum and minimum points inside the area. We find these by deriving the function twice; once with regards to x, once with regards to y. We then need find where they are zero.

$\displaystyle \frac{df}{dx}=3-12x^2+12y$
$\displaystyle \frac{df}{dy}=12x$

This is where I get stuck. How to proceed from here, assuming I've done right so far?
----------------------------------------------------------
...

All your considerations and calculations are OK. You only need one step to complete the question successfully:

Both derivatives must be zero. Calculate the x-value and consequently the y-value and f(x,y). You should come out with $\displaystyle Min\left(0,-\frac14 , 0\right)$
• Apr 10th 2011, 07:44 AM
Sabo
Right.
12x = 0 => x = 0
Inserted into the first equation that gives 3 +12y <=> y = -1/4.
I tried that, but somehow messed it up.

But, if we calculate f(0, -1/4) we still get 0?
3(0) - 4(0)^3+12(0)(-1/4) = 0.
• Apr 10th 2011, 04:46 PM
HallsofIvy
Quote:

Originally Posted by Sabo
I need to find the maximum and minimum of functions in space. I've managed to solve a few exercises, but for some of them I get stuck when trying to solve for x and y. I'll give two examples below, hoping someone can point out what I'm doing wrong.

First example:
$\displaystyle f(x,y)=3x-4x^3+12xy, where \,x\geq0, y\geq0, x+y\leq1$

I approach this problem like this.
Find the points at the end (not sure what these are called in English?)

"endpoints" will do
Quote:

. They are
(0,0), (1,0), (0,1).
However, that is not enough. This region is a triangle with corners at, as you say, (0, 0), (1, 0), and (1, 1). But the lines x= 0 ($\displaystyle 0\le y\le 1$), y= 0 ([tex]0\le x\le 1), and y= x ($\displaystyle 0\le x\le 1$) are also part of the boundary.
Quote:

Find the maximum and mini/mum points inside the area. We find these by deriving the function twice; once with regards to x, once with regards to y. We then need find where they are zero.

$\displaystyle \frac{df}{dx}=3-12x^2+12y$
$\displaystyle \frac{df}{dy}=12x$

This is where I get stuck. How to proceed from here, assuming I've done right so far?
Do what you said: find where those derivatives are 0. 12x= 0 only when x= 0. Putting that into the first equation, $\displaystyle 3- 12x^2+ 12y= 3- 12y= 0$ only when y= 3/12= 1/4. However, that is NOT a point in the interior: x= 0 is part of the boundary.

Now look at the boundary. On x= 0, the function becomes f(0, y)= 0 for all x.
On y= 0, the function becomes $\displaystyle f(x, 0)= 3x- 4x^3$ differentiate that to find if there may be a max. or min in the interior of that interval.
On y= x, the function becomes $\displaystyle f(x, x)= 3x- 4x^3+ 12x^2$. Differentiate that to find any possible max or min.

Finally, evaluate the function at each of those points as well as at the three endpoints (0, 0), (0, 1), and (1, 0). Since the max or min must be at one of those points, the place where the function value is largest gives the maximum and the place where the function value is least gives the minimum.

Quote:

----------------------------------------------------------
Second example:
$\displaystyle f(x,y)=xy-ln(x^2+y^2), where \,\frac{1}{4}\leq x^2+y^2\leq4$

We see that the "extreme" points are
$\displaystyle \left(\frac{1}{2},0\right), (0, \frac{1}{2}), (2,0), (0,2)$
No, they are not. Your region is the ring between two concentric circles. There are no "corners" or vertices.

[quote]The two derivatives are

$\displaystyle \frac{df}{dx}=y-\frac{2x}{x^2+y^2}$
$\displaystyle \frac{df}{dy}=x-\frac{2y}{x^2+y^2}$

Again, stuck, not knowing how to proceed.[quote]
So $\displaystyle y- \frac{2x}{x^2+ y^2= 0$
$\displaystyle y= \frac{2x}{x^2+ y^2}$
$\displaystyle y(x^2+ y^2)= x^2y+ y^3= 2x$

[tex]x- \frac{2y}{x^2+ y^2}[tex]
$\displaystyle x= \frac{2y}{x^2+ y^2}$
$\displaystyle x(x^2+ y^2)= x^3+ xy^2= 2y$
Now, look what happens if you subtract the first equation we got from this:
$\displaystyle (x^3- y^3)+ (xy^2- x^2y)= 2y- 2x$
$\displaystyle (x- y)(x^2+ xy+ y^2)+ xy(y- x)= 2(y- x)$

Obviously y= x will make that 0. Replace y by x in either derivative to find a particular value. If y is not x, we can divide through by x- y to get
[tex](x^2+ xy+ y^2)+ xy= x^2+ 2xy+ y^2= (x+ y)^2= 2. Put that back into either equation to solve for x and y. And be sure to check to see if the points are in the given region.

Once you have found points, inside the region, that satisfy those equations, you need to look on the boundary $\displaystyle x^2+ y^2= 1/4$ and $\displaystyle x^2+ y^2= 4$.
You function will be $\displaystyle f(x,y)= x(1/4- x^2)^{1/2}- ln(1/4)= x(1/4- x^2)^{1/2}+ ln(1/4)$, $\displaystyle f(x,y)= -x(1/4- x^2)^{1/2}- ln(1/)= -x(1/4- x^2)^{1/2}+ ln(4)$, $\displaystyle f(x,y)= x(1/4- x^2)^{1/2}- ln(4)$, and $\displaystyle f(x,y)= x(1/4- x^2)^{1/4}- ln(4)$. Points where the derivatives of those, with respect to x, are 0 may be max or min.

Quote:

The exercies I did manage to solve made it easy for me, since adding/subtracting one to the other left me with something similiar to 2x-2y=0 etc. I know this is somewhat basic stuff, and unless I'm mistaken the exercies are created to avoid complex numbers and what not, so clearly I've missed something simple.
• Apr 10th 2011, 10:15 PM
Sabo
Thanks. It's all clear now.