Minimum or Maximum value of a multivariate function

  • Thread starter jkim8512
  • Start date
  • #1
jkim8512
3
3
Homework Statement:
Not a hw
Relevant Equations:
Minimum or Maximum value of a multivariate function
First thank you for taking your time to take a look at this simple question. And sorry for the informal math language and equations, I hope you guys can understand it.



So, depending on the case, I have 2 or 8 simple quadratic functions f(a), f(b), f(c),… f(z).

Each a,b,c,…,z have a different range for f(a),f(b), f(c), .. ,f(z). These functions are all independent to each other, they are just simple quadratic functions.

These functions adds up to get one value f(T).

The constraint is that the sum of a,b,c,…,z should be a given value N.

And what I want is the Minimum or maximum value of f(T)





So, If I right it down in some simple math, it looks like this.



f(T) = f(a) + f(b) + f(c) + f(d)+….+f(z)

constraint: N = a+b+c+d+….+z

goal: Find minimum or maximum value of f(T) when N is given.



where,

f(a) = simple quadratic function such as 3a^2+ 4a+ 5, range: a_start < a < a_end

f(b) = simple quadratic function such as 3b^2+ 4b+ 5, range: b_start < b < b_end

f(c) = simple quadratic function such as 3c^2+ 4c+ 5, , range: c_start < c < c_end

………… same up to f(z)



I googled some stuff and found I could probably use “Max/min for functions of multi variables” things like that.

The main problem I can’t figure out is how to deal with the constraints I need to have regarding N=a+b+c,..+z

Thanks again!
 

Answers and Replies

  • #2
Office_Shredder
Staff Emeritus
Science Advisor
Gold Member
5,517
1,468
Your notation is pretty bad, it would be a lot clearer if your wrote ##f(x_1,...,x_n) = f_1(x_1)+...+f_n(x_n)##.

The thing you need to use to incorporate the constraint is lagrange multipliers.

https://en.m.wikipedia.org/wiki/Lagrange_multiplier

Basically the idea is that gradient of the function you are minimizing has to be parallel to the gradient of the constraint.
 
  • Like
Likes Delta2 and jkim8512
  • #3
jkim8512
3
3
Your notation is pretty bad, it would be a lot clearer if your wrote ##f(x_1,...,x_n) = f_1(x_1)+...+f_n(x_n)##.

The thing you need to use to incorporate the constraint is lagrange multipliers.

https://en.m.wikipedia.org/wiki/Lagrange_multiplier

Basically the idea is that gradient of the function you are minimizing has to be parallel to the gradient of the constraint.

Thank you so much. It seems like the right thing to look at.
 
  • #4
berkeman
Mentor
64,453
15,820
You can have a look at the LaTeX Guide link in the lower left of the Edit window to see how to best post math equations online... :smile:
 
  • #5
jkim8512
3
3
Your notation is pretty bad, it would be a lot clearer if your wrote ##f(x_1,...,x_n) = f_1(x_1)+...+f_n(x_n)##.

The thing you need to use to incorporate the constraint is lagrange multipliers.

https://en.m.wikipedia.org/wiki/Lagrange_multiplier

Basically the idea is that gradient of the function you are minimizing has to be parallel to the gradient of the constraint.
First thank you all for the kind reply.

I took a look into Lagrange multipliers. It seems like what I need to use.

However I still have one question. I am not sure about how to limit the range for x1,x2, x3, … ,xN



I want to find

Max/min of: f(x1,x2,…,xn) = f1(x1) + f2(x2) +... +fn(xn)

Constraint: x1+x2 +...+xn =N

X1 range: x1_start < x1 <x1_end

X2 range: x2_start < x1 <x2_end

......

X3 range: xn_start < xn <xn_end



I googled how to use the contraint by using the Lagrange multipliers. And I think i can do it.

But, I still don’t know what to do with the ranges for x1, x2, ... ,xn. Can you guys give me any hint for it or tell me what i have to look into?



Thanks!

Have a wonderful weekend!
 
  • #6
pasmith
Homework Helper
2022 Award
2,587
1,185
You are trying to extremize [tex]
f(x_1, \dots, x_n) = \sum_{i=1}^n f_i(x_i)[/tex] subject to [itex]x_1 + \dots + x_n = N[/itex] and [itex]m_i \leq x_i \leq M_i[/itex] for [itex]i = 1, \dots, n[/itex]. The equality constraint can be enforced by using a lagrange multiplier and extremizing instead the function [tex]
F(x_1, \dots, x_n, \lambda) = f(x_1, \dots, x_n) + \lambda\left(\sum_{i=1}^N x_i - N\right).[/tex] It looks like an Interior point method might work to maximize [itex]F[/itex], since that will also enforce contraints of the form [tex]c_{2i-1}(x_1, \dots, x_n,\lambda) = x_i - m_i \geq 0[/tex] and [tex]c_{2i}(x_1, \dots, x_n, \lambda) = M_i - x_i \geq 0,[/tex] ensuring that the extrema are in the acceptable range of [itex]x_i[/itex].
 

Suggested for: Minimum or Maximum value of a multivariate function

  • Last Post
Replies
25
Views
660
  • Last Post
Replies
12
Views
1K
Replies
2
Views
319
Replies
2
Views
495
Replies
19
Views
968
Replies
11
Views
603
Replies
5
Views
683
Replies
13
Views
819
Replies
8
Views
834
Top