Re: maximization problem--lagrange



In article <1180923942.875675.321960@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
"C6L1V@xxxxxxx" <C6L1V@xxxxxxx> wrote:

On Jun 3, 5:01 pm, chri...@xxxxxxxxx wrote:
Using lagrange's method, I want to find the maximum value of

f(x1, ..., xn) = | sum_(k=1)^n a_k*x_k |

subject to the constraint g(x1,...,xn) = sum_(k=1)^n x_k^2 = 1

I know I need to take the gradient of f and g and suppose they are
scalar multiples.

It was suggested to maximize the square of f to get rid of the
absolute value. Doing this I get the kth equation from grad(f) =
\lambda*grad(g) as follows:

2( sum_(k=1)^n a_k*x_k = 2\lambda*x_k

2a_k^2*x_1 + ... + 2(a_k^2 - \lambda)*x_k + ... + 2a_k^2*x_n = 0
(k=1 to n)

Is there an easy way to solve this system?

Denote the inner product of two vectors u and v as <u,v>. The problem
is max <a,x>^2, subject to <x,x>=1. The Lagrange equations read as
2*<a,x>*a_i = 2*lambda*x_i for i = 1,2,...,n; that is, <a,x>*a =
lambda*x .....(1).



Once you translate it into vector terms, it is clear without needing
calculus that the maximum of the inner product between a and x, occurs
when the angle between a, as a constant vector, and x, as a vector of
constant length, is zero.

So one solution is at x = a/|a|, and the maximum is |a|.

Because of the absolute value on the expression to be maximized, there
is a second, equal, maximum at x = -a/|a|.
.