Find absolute maximum of $f(x,y)=(x-1)^2+(y-2)^2$ within square $0\le x ,y\le 1$ (long but interesting)

1.7k Views Asked by At

Notice:

*"There is another possible and common interpretation for 0≤x,y≤1, namely 0≤x∧y≤1. Hence the OP's references to the infinite. – Git Gud"

If anyone ever stumbles upon this post in the future, and wonders what this post is all about...the above pretty much sums it up. Confused 0≤x,y≤1, with 0≤x∧y≤1. Nevertheless, I've gained from this by learning not to put both partial derivatives equal to each other and that it was possible to treat both x and y as independent. Case closed :)*


**strong text**Background: This problem is part of a list given to us in order to prepare for the final multivariable calculus exam. It's not a honours course, so I suspect a few of the problems(such as this one!) on the list are intended to be difficult in order to "calibrate" the class average. The problems on the list will closely mirror those on the exam.


First of all, I began setting the partial derivatives equal to zero to find critical points.

$$f'_x=2x-2, f'_y=2y-4$$ I set $f'_y=f'_x, 2x-2=2y-4\dots$.it gives the critical point $(0,1)$.

Then I used the $D(a,b)$ formula and found that $(0,1)$ corresponds to a local minimum point, $f(x,y)=2$ or $(0,1,2)$.


I used a graphing tool and realized that the graph of $f(x,y)$ represents an ellipsoid, which, as far as I know, has no absolute maximum on an unbounded domain. The problem states that $f(x,y)$ is bounded by a square $0\le x, y\le 1$.

After some thinking, I realized that since the "square" was bounded by $y=1$ and $x=0$, it made the situation complicated because it did not represent a "square" of finite proportions. Another problem is that $0\le x, y\le 1$ can also represent a rectangle...

I tried to think of a function that could "act" as a constraint which would limit the domain to a set of points which represented a family of squares, such as y=-x+1 which would generate points which make the domain square-shaped.

For example: $0\le x, y\le 1$, gives $(0,1)$ and with the function ${y=-x+1|0\le x,y\le 1}$, I can generate points such as $(1,0), (2,-1),\dots,(x,-x+1),$ which give squares when paired with point $(0,1)$.

But since the problem asks for the Absolute Maximum, I realized that depending on which point I used, I would get a different "Absolute Maximum" represented by a contour line of the ellipsoid depending on the size of the square I take as a domain.

First of all, I'm not even sure if my approach is mathematically correct. Secondly, I'm confused about the definition of "Absolute maximum"...

wikipedia: "The function $\cos(x)$ has infinitely many global maxima at $0, \pm 2\pi, \pm 4\pi, \dots,$ and infinitely many global minima at $\pm \pi, \pm 3\pi, \dots$." I understand this.

But in the case of this problem, can I say that the family of squares defined by constraints ${y=-x+1|0\le x,y\le 1} ; 0\le x,; y\le 1,$ each give a different global maxima?(contour line of the ellipsoid.)


While not related to the question, a second problem arose...

Using wolfram, I found that the point $(1,1)$ gives the absolute minima. In class, we only saw the partial derivative and second derivative test method for finding critical points. What methods were used to find this?

Thank you!

3

There are 3 best solutions below

1
On BEST ANSWER

You were right to take the partials, but you should not set them equal--you should set them simultaneously to $0$ (which you will find $x$ and $y$ are independent just as TonyK stated):

$$ 2(x - 1) = 0 \rightarrow x = 1 \\ 2(y - 2) = 0 \rightarrow y = 2 $$

This is the only critical point of the function $f(x, y)$ (and is outside of our region). When finding absolute extrema, you have to test all critical points (unless you can argue they aren't local extrema) and all boundary points (this is what a lot of Calculus students forget to do). You have four boundaries:

  1. $x = 0, 0 \leq y \leq 1$
  2. $x = 1, 0 \leq y \leq 1$
  3. $y = 0, 0 \leq x \leq 1$
  4. $y = 1, 0 \leq x \leq 1$

When you have a $1$-D function, the boundaries are single points. When you have a $2$-D function, the boundaries are curves ($1$-D objects), if you have a $3$-D function, the boundaries are surfaces ($2$-D objects), so on and so forth. So you have to now find the absolute extrema of four functions (the four boundaries--don't forget we'll need to test the endpoints, the boundaries, for each of those four functions):

$$ x = 0 \rightarrow f(0, y) = 1 + (y - 2)^2 \rightarrow f'(0, y) = 2(y -2) \rightarrow y = 2 \\ x = 1 \rightarrow f(1, y) = 0 + (y - 2)^2 \rightarrow f'(1, y) = 2(y - 2) \rightarrow y = 2 \\ y = 0 \rightarrow f(x, 0) = (x - 1)^2 + 4 \rightarrow f'(x,0) = 2(x - 1) \rightarrow x = 1 \\ y = 1 \rightarrow f(x, 1) = (x - 1)^2 + 1 \rightarrow f'(x, 1) = 2(x - 1) \rightarrow x = 1 \\ $$

The first two are outside of our region ($y = 2$) and the other two are corners of the square. So we just need to test each corner of the square since all of our critical points are either outside of the region or on the corners (and the corners are the boundaries, or endpoints, of each of the boundary line segments):

$$ f(0, 0) = 1 + 4 = 5 \\ f(0, 1) = 1 + 1 = 2 \\ f(1, 0) = 0 + 4 = 4 \\ f(1, 1) = 0 + 1 = 1 $$

That's all of the critical points and all of the boundary points (which were the corners of the square), so the absolute minimum occurs at $(1, 1)$ and $f(1, 1) = 1$ and the absolute maximum occurs at $(0, 0)$ and $f(0, 0) = 5$.

The key is that when finding absolute extrema you cannot only test critical points you must also test the boundaries.

4
On

This is much easier than you think! You can just maximise $(x-1)^2$ and $(y-2)^2$ independently, because the constraints for $x$ and $y$ are independent of each other. Specifically:

Let $M_x$ be the maximum of $(x-1)^2$ subject to $0 \le x \le 1$.
Let $M_y$ be the maximum of $(y-2)^2$ subject to $0 \le y \le 1$.

Then the maximum value of $f(x,y)$ is just $M_x + M_y$.

Hint: you don't need calculus to find $M_x$ and $M_y$!

0
On

$\newcommand{\+}{^{\dagger}} \newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle} \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack} \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,} \newcommand{\dd}{{\rm d}} \newcommand{\down}{\downarrow} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,{\rm e}^{#1}\,} \newcommand{\fermi}{\,{\rm f}} \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,} \newcommand{\half}{{1 \over 2}} \newcommand{\ic}{{\rm i}} \newcommand{\iff}{\Longleftrightarrow} \newcommand{\imp}{\Longrightarrow} \newcommand{\isdiv}{\,\left.\right\vert\,} \newcommand{\ket}[1]{\left\vert #1\right\rangle} \newcommand{\ol}[1]{\overline{#1}} \newcommand{\pars}[1]{\left(\, #1 \,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\pp}{{\cal P}} \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,} \newcommand{\sech}{\,{\rm sech}} \newcommand{\sgn}{\,{\rm sgn}} \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}} \newcommand{\ul}[1]{\underline{#1}} \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert} \newcommand{\wt}[1]{\widetilde{#1}}$ Lets $\ds{\quad{x \over y} = \sin\pars{\theta}\quad\mbox{with}\quad 0 \leq \theta \leq \pi}$. The task is to find the maximum of $\ds{\phi\pars{\theta,y} \equiv \bracks{y\sin\pars{\theta} - 1}^{2} + \pars{y - 2}^{2}}$

$\ds{\partiald{\phi\pars{\theta,y}}{\theta} = 0}$ and $\ds{\partiald{\phi\pars{\theta,y}}{y} = 0}$ lead to: \begin{align} \left\lbrace\begin{array}{rcl} \bracks{y\sin\pars{\theta} - 1}y\cos\pars{\theta} & = & 0 \\[1mm] \bracks{y\sin\pars{\theta} - 1}\sin\pars{\theta} & = & 2 - y \end{array}\right. \end{align}

  1. $\ds{y\sin\pars{\theta} - 1 = 0\quad\imp\quad x = 1\,,\quad y = 2}$.
  2. $\ds{y=0\quad\imp\quad\sin\pars{\theta} = -2}$ which doesn't have any sense.
  3. $\ds{\cos\pars{\theta}=0\quad\imp\quad x=y={3 \over 2}}$.

Solution $\ds{1.}$ yields the value $\ds{\fermi\pars{x=1,y=2} = 0}$ while solution $\ds{3.}$ yields the value $\ds{\fermi\pars{x={3 \over 2},y={3 \over 2}} = \pars{{3 \over 2} - 1}^{2} + \pars{{3 \over 2} - 2}^{2} = \half}$

$${\tt Maximum}:\qquad \color{#00f}{\large% x = y = {3 \over 2}\quad\imp\quad\fermi\pars{x,y} = \half} $$