# Why would you use penalty methods for a simple problem?

Consider the following problem: $$\text{minimize} \ \ f(x) \\ \text{subject to} \ \ x = 4$$

To find the minimum, we can just plug in $x=4$? Why even use other methods? Also how would you find the associated Lagrange Multplier?

-
Your logic is absolutely correct. Of course we can plug in. It is hard to imagine that you would be asked to minimize $f(x)$ subject to $x=4$. Could it be that $f$ is a function not only of $x$, but of other variables $y$, $z$, and so on? –  André Nicolas May 10 '12 at 13:53
@AndréNicolas: Maybe the simple problem is used to illustrate a method. How would you find the Lagrange multiplier associated with the constraint $x=4$? –  Shawn May 10 '12 at 13:56
The same as usual, $\lambda(x-4)$. However, differentiation is irrelevant, everything is a boundary point. –  André Nicolas May 10 '12 at 14:07