Minimum of $f(x) := x^2$ subject to $g(x) := 2 x + 1 = 0$

55 Views Asked by At

If I want to find the minimum of $f(x) = x^2$ subject to the constraint $g(x) = 2x + 1 = 0$, then I would first isolate $x$ from $g$ and insert into $f$:

$$ 2x + 1 = 0\\ x = -1/2 $$

So $$ f(x) = x^2 = (-1/2)^2 = 1/4 $$

And now set the first derivative equal $0$:

$$ df/dx (-1/4) = 0 $$

So the derivative is constant zero.

But clearly, the constrained minima are not zero: enter image description here

Where is the approach wrong?

3

There are 3 best solutions below

2
On BEST ANSWER

$g(x)$ defines your feasible set. Solving it, gives you the answer.

0
On

In the question as stated, there is only one variable.

If $g(x)=2x+1=0,$ then $x=-\frac12,$ so $f(x)=\frac14;$ that's it!

0
On

Your step of "setting the first derivative to 0" is logically incorrect. The function $f$ is already given and thus $f'(x)$ at $x=-1/2$ is already set [and is nonzero]; informally speaking you can't "make" $f'(x)$ be 0 at $x=-1/2$. I am guessing that you were concerned that $f'(-1/2)$ was nonzero, and were trying to find the value of $x$ so that $f'(x) = 0$?

More generally, the minimum of a function $f$ over a domain $S$ can occur at a point $x$ in the domain that does NOT satisfy $f'(x)=0$. There are even instances for $f$ and $S$ where $S$ contains a point $x_1$ that satisfies $f'(x_1) = 0$ yet $f$ achieves its minimum not at $x_1$ but at another point $x_2$ where $f'(x_2)$ is nonzero. For example, the minimum of $f(x)=x^2$ on $S = [2,4]$ occurs at $x=2$, and the minimum of $h(x) = x^3$ on $S = [-1,1]$ occurs at $x=-1$.

Anyway, getting back to this specific exercise, the way to solve this is to find the (one) point $x$ satisfying $g(x)=0$, and plug that value of $x$ i.e., $x= -1/2$ into $f(x)$ i.e., calculate $f(-1/2)$, to get that the minimum value of $f(x)$ restricted to $g(x)=0$ is $f(-1/2) = 1/4$.