Can we minimize two variable function by minimizing w.r.t one variable first followed by the other?

353 Views Asked by At

Consider the following problem.

Given a rectangular paper of size $2y+8$ and $16-y$. A quadrilateral $PQRS$ in green color below is obtained by removing the four triangles. What is the smallest area of this quadrilateral? enter image description here

Question

Can we minimize the paper area $(2y+8)(16-y)$ first in which I get $y=6$ and plug it to minimize the required area $(10)(20)-x(20-2x)-2x(10-x)$ in which I get $x=5$?

The required area can be represented as follows

\begin{align} \text{required area} &= 128 + 24 y - 2 y^2 + 4 (-10 + x) x \end{align}

No $xy$ terms involved.

2

There are 2 best solutions below

0
On BEST ANSWER

Before solving any optimization problem, the very first thing to do is to make two things clear, if that's not already the case:

  1. The objective function.

  2. The constraints.

For 1, simple calculation gives \begin{align}A &= \text{(area of quadrilateral)} \\ &= \text{(area of rectangle)} - \text{(area of triangles)}\\ &= (2y + 8)(16-y) - [2x (16 - y - x) + x (2y + 8 - 2x)]\\ &= 2(-y^2 + 12y + 64) + 4(x^2 - 10x). \end{align}

We need to minimize this function with respect to the following constraints: \begin{equation} 0 \le 2y + 8,\quad 0 \le 16 - y,\quad 0 \le x \le 16 - y,\quad 0 \le 2x \le 2y + 8, \end{equation} which can be simplified as \begin{equation} x \ge 0,\quad x-4 \le y \le 16-x. \end{equation} Therefore, we have reduced the problem to

Can we minimize two variable function by minimizing w.r.t one variable first followed by the other?

The answer is Yes, but you need to do it correctly.

Suppose we have for example the following problem: \begin{equation} \min f(x,y) \quad \mbox{s.t. } g(x,y) \ge 0 \end{equation} You can minimize over $x$ first by fixing $y$ and solving $$\min_{x: g(x,y) \ge 0} f(x,y).$$ Suppose that you can solve this analytically to obtain the optimal $x^* = h(y)$, then you can plug this into the original objective and minimize over $y$: $$\min_{y: g(h(y),y) \ge 0} f(h(y),y).$$

Now back to the original problem. We need to minimize $f(x) + g(y)$ subject to $x \ge 0,x-4 \le y \le 16-x$, where $f(x)$ and $g(y)$ are quadratic functions.

You can start by fixing $x$ and minimizing over $y$. This is just minimizing a quadratic function over an interval, so you can totally do that. Once you have found the solution (which is a function on $x$), plug it to the original problem and reduce it to, again, minimizing a quadratic function (of $x$) over an interval.

Hint: At some point you may want to use a change of variables for a nicer solution: $a = x - 5, b=y-6$ ;)

2
On

Area of triangles $A_T = 2x (16 - y - x) + x (2y + 8 - 2x)$

$A_T = 32x - 2xy - 2x^2 + 2xy + 8x - 2x^2$

$A_T = 40x - 4x^2$

So you can see it is not dependent on $y$. Now if you maximize the area of the triangles, you get

$x = 5, A_T = 100$. Of course this will work only for a range of $y, 1 \lt y \lt 11$

So subtract from rectangle area and you get smallest quadrilateral area in terms of $y$.