MHB Lagrange multipliers with a summation function and constraint

Click For Summary
The discussion centers on maximizing the function \( \sum_{i=1}^{n}a_ix_i \) under the constraint \( \sum_{i=1}^{n}x_i^2=1 \) using Lagrange multipliers. The solution involves setting up a system of equations derived from the Lagrange multipliers, leading to the relationship \( x_k = \frac{a_k}{a_1} x_1 \) for \( k = 2, 3, \ldots, n \). By substituting this into the constraint, the values of \( x_1 \) and subsequently \( x_k \) are determined, resulting in \( x_k = \frac{a_k}{\sqrt{\sum_{k=1}^{n}(a_k^2)}} \). The maximum value of the objective function is found to be \( \sqrt{\sum_{k=1}^{n}(a_k^2)} \). The thread concludes with appreciation for the solution provided.
skate_nerd
Messages
174
Reaction score
0
Problem stated: Let \(a_1, a_2, ... , a_n\) be \(n\) positive numbers. Find the maximum of
$$\sum_{i=1}^{n}a_ix_i$$ subject to the constraint $$\sum_{i=1}^{n}x_i^2=1$$.
I honestly have not much of an idea of how to go about solving this. If I use lagrange multipliers which I think I am supposed to since this problem is from that section of the book, how would I even begin to take partial derivatives of these summations, let alone solve a system of equations with them? Any hint on how to begin this would be appreciated. Thanks
 
Physics news on Phys.org
Re: lagrange multipliers with a summation function and constraint

skatenerd said:
Problem stated: Let \(a_1, a_2, ... , a_n\) be \(n\) positive numbers. Find the maximum of
$$\sum_{i=1}^{n}a_ix_i$$ subject to the constraint $$\sum_{i=1}^{n}x_i^2=1$$.
I honestly have not much of an idea of how to go about solving this. If I use lagrange multipliers which I think I am supposed to since this problem is from that section of the book, how would I even begin to take partial derivatives of these summations, let alone solve a system of equations with them? Any hint on how to begin this would be appreciated. Thanks

Hi skatenerd! :)

Suppose you had to maximize $ax+by$ subject to the constraint $x^2+y^2=1$.
Would you know how to do that?

If so, how about $ax+by+cz$?

The time to generalize is after that.
 
I noticed several guests viewing this topic, and thought I might go ahead and solve it, since time has gone by and it is interesting. :D

We have the objective function:

$$f\left(x_1,x_2,x_3,\cdots,x_n \right)=\sum_{k=1}^n\left(a_kx_k \right)$$

Subject to the constraint:

$$g\left(x_1,x_2,x_3,\cdots,x_n \right)=\sum_{k=1}^n\left(x_k^2 \right)-1=0$$

Using Lagrange multipliers, we obtain the system:

$$a_1=2\lambda x_1$$

$$a_2=2\lambda x_2$$

$$a_3=2\lambda x_3$$

$$\vdots$$

$$a_n=2\lambda x_n$$

This implies:

$$x_k=\frac{a_k}{a_1}x_1$$ where $$k\in\{2,3,4,\cdots,n\}$$

And so the constraint yields (taking the positive root since we are asked to maximize the objective function):

$$\sum_{k=1}^n\left(x_k^2 \right)=1$$

$$\sum_{k=1}^n\left(\left(\frac{a_k}{a_1}x_1 \right)^2 \right)=1$$

$$\left(\frac{x_1}{a_1} \right)^2\sum_{k=1}^n\left(a_k^2 \right)=1$$

$$x_1^2=\frac{a_1^2}{\sum\limits_{k=1}^n\left(a_k^2 \right)}$$

Taking the positive root, we then have:

$$x_1=\frac{a_1}{\sqrt{\sum\limits_{k=1}^n\left(a_k^2 \right)}}$$

Hence:

$$x_k=\frac{a_k}{\sqrt{ \sum\limits_{k=1}^n\left(a_k^2 \right)}}$$

And so we find:

$$f_{\max}=\sum_{k=1}^n\left(a_k\frac{a_k}{\sqrt{ \sum\limits_{k=1}^n\left(a_k^2 \right)}} \right)=\frac{\sum\limits_{k=1}^n\left(a_k^2 \right)}{\sqrt{ \sum\limits_{k=1}^n\left(a_k^2 \right)}}=\sqrt{ \sum\limits_{k=1}^n\left(a_k^2 \right)}$$
 
Wow, I think I completely forgot that I asked this question! This was in regard to my 3rd semester of calculus last year...Thanks for the responses and the solution MarkFL! Very cool indeed.
 
Thread 'Problem with calculating projections of curl using rotation of contour'
Hello! I tried to calculate projections of curl using rotation of coordinate system but I encountered with following problem. Given: ##rot_xA=\frac{\partial A_z}{\partial y}-\frac{\partial A_y}{\partial z}=0## ##rot_yA=\frac{\partial A_x}{\partial z}-\frac{\partial A_z}{\partial x}=1## ##rot_zA=\frac{\partial A_y}{\partial x}-\frac{\partial A_x}{\partial y}=0## I rotated ##yz##-plane of this coordinate system by an angle ##45## degrees about ##x##-axis and used rotation matrix to...

Similar threads

Replies
3
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K