Little help with min/max problem w/ n-variables

  • Thread starter Thread starter TheMadCapBeta
  • Start date Start date
AI Thread Summary
The discussion revolves around finding the minimum and maximum values of an n-dimensional function defined by f(x1,x2,...,xn) = a1*x1 + a2*x2 + ... + an*xn, subject to the constraint x1^2 + x2^2 + ... + xn^2 = 1. The use of Lagrange multipliers leads to the conclusion that the critical point occurs when a1 = a2 = ... = an. For the minimum value, there is confusion regarding whether it occurs at n = 0 or n = 1, with clarification that n is a constant. The maximum value is suggested to be k*(sqrt(n)), particularly as n approaches infinity, indicating the function's growth. The conversation highlights the importance of correctly interpreting the constraints and variables involved in the problem.
TheMadCapBeta
I'm given an n-dimensional function such that

f(x1,x2,...,xn) = a1*x1 + a2*x2 +...+ an*xn

where a1, a2, ...,an are all positive numbers. This is with the restraint that

x1^2 + x2^2 + ... + xn^2 = 1

Using Lagrange multipliers (I'll use 'L' for Lambda):

a1 = L(2*x1)
a2 = L(2*x2)
...
an = L(2*xn)

Solving for L,

L = a1/(2*x1) = a2/(2*x2) = ... = an(2*xn) [1]

So, generally, xn = an/(2*L). Plugging into the constraint function, I get:

(a1/2*L)^2 + (a2/2*L)^2 + ... + (an/2*L)^2 = 1
(1/4*l^2)*(a1^2 + a2^2 + ... + an^2) = 1
L = sqrt(a1^2 + a2^2 + ... + an^2)/2

So, for each x, generally,

xn = an/sqrt(a1^2 + a2^2 + ... an^2) [2]

Which implies that a1 = a2 = ... = an from [1]

a1/(2*L) = a2/(2*L) = ... = an/(2*L)

So [2] is basically my critical point.

Plugging back into f(...) I get

f(x1,x2,...,xn) = a1*(a1/sqrt(a1^2 + a2^2 + ... + an^2)) ...etc

<=> ... (a1^2 + a2^2 + ... + an^2)/sqrt(a1^2 + a2^2 + ... + an^2)

Furthermore...

<=> ... sqrt(a1^2 + a2^2 + ... + an^2)

Since a1 = a2 = ... = an, then we can say (using an arbitrary (a))

<=> ... sqrt(n*a^2) <=> a*(sqrt(n)).

So, to my question (heh), for the minimum value it's obvious that it would be when n = 0. But I'm a little confused as to what the maximum would be.
Say a constant k = a, then would it be k*(sqrt(n))?? Just a simple question I guess, as it comes down to it. Thanks.

Actually, wouldn't the min be when n = 1, since there mustb e at least one variable. So the min would be k.
 
Last edited by a moderator:
Physics news on Phys.org
I'm confused as to what your question really is!

You start out by saying "I'm given an n-dimensional function" but then you start saying that " for the minimum value it's obvious that it would be when n = 0".

No, n is a given constant. The problem is to find x1, x2,..., xn so as to minimize the function.

Also you say
"So, for each x, generally,

xn = an/sqrt(a1^2 + a2^2 + ... an^2) [2]

Which implies that a1 = a2 = ... = an from [1]"

No, a1, a2, etc. are GIVEN. You can't place any constraints on them.
[1] implies a1= a2=...= an ONLY if you assume x1= x2=...= xn which is NOT in general true.
 
As for the max, it would be when n approaches infinity, since the function would approach infinity as well. So the max would be k*(sqrt(n)).
 
Thread 'Variable mass system : water sprayed into a moving container'
Starting with the mass considerations #m(t)# is mass of water #M_{c}# mass of container and #M(t)# mass of total system $$M(t) = M_{C} + m(t)$$ $$\Rightarrow \frac{dM(t)}{dt} = \frac{dm(t)}{dt}$$ $$P_i = Mv + u \, dm$$ $$P_f = (M + dm)(v + dv)$$ $$\Delta P = M \, dv + (v - u) \, dm$$ $$F = \frac{dP}{dt} = M \frac{dv}{dt} + (v - u) \frac{dm}{dt}$$ $$F = u \frac{dm}{dt} = \rho A u^2$$ from conservation of momentum , the cannon recoils with the same force which it applies. $$\quad \frac{dm}{dt}...
Back
Top