Applying a constraint in the calculus of variations

Click For Summary

Discussion Overview

The discussion revolves around applying constraints in the calculus of variations, specifically in the context of maximizing a function F under certain constraints involving discrete natural numbers. Participants explore the implications of using Lagrange multipliers and the nature of solutions derived from different formulations of the problem.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant questions whether to vary N when varying ni or to treat N as a constant from the start, given that N is not a function of F.
  • Another participant suggests that using Lagrange multipliers is appropriate for the problem but notes that minimizing F with natural number constraints complicates the solution process.
  • There is a query about the correctness of two proposed solutions involving Lagrange multipliers, with one participant stating that both lead to the same result for ni once λ is eliminated.
  • A participant introduces a more complex problem involving maximizing F under two constraints, asking whether two different formulations yield correct solutions.
  • Some participants assert that both formulations lead to the same values for ni, despite differing values for the Lagrange multiplier α.
  • There is a discussion about whether α should be defined solely by F and how its value can differ between formulations, with references to the derivation of Boltzmann statistics.

Areas of Agreement / Disagreement

Participants express differing views on the treatment of N and the implications for α, with some agreeing that the solutions for ni are equivalent while others question the consistency of α across formulations. The discussion remains unresolved regarding the treatment of α and its dependence on the formulations used.

Contextual Notes

Participants highlight the complexity of the problem due to the constraints involving natural numbers and the potential differences in the values of the Lagrange multiplier α, which may not be fully defined by F alone.

Philip Koeck
Gold Member
Messages
801
Reaction score
229
I have an analytical function F of the discrete variables ni, which are natural numbers. I also know that the sum of all ni is constant and equal to N.
N also appears explicitly in F, but F is not a function of N. F exists in a coordinate system given by the ni only.
Should I carry out the variation as if N would vary when I vary any of the ni and then apply the constant N as a constraint with a Lagrange multiplier or is it correct to leave out the variation of N with ni from the beginning.
As an example you can look at: F = N + ∑gi ln ni
The gi are just weights, which can be different for every i.
 
Last edited:
Physics news on Phys.org
Lagrange multipliers are explicitly for the sort of problem you're talking about. However, if the constraint is that ##\sum_j n_j = N##, then it leads to a boring result: ##\frac{\partial F}{\partial n_i} = \lambda## (where ##\lambda## is the lagrange multiplier, some constant).

However, if the ##n_j## are supposed to all be natural numbers, then taking partial derivatives isn't going to minimize ##F##, because the values of ##n_j## that minimize ##F## might not be natural numbers. I suppose you could use that answer as a starting place, and then search nearby for integer values that minimize ##F##?
 
  • Like
Likes   Reactions: BvU
Which of the following two solutions is correct?
1 + gi/ni - λ = 0
or gi/ni - λ = 0
 
Philip Koeck said:
Which of the following two solutions is correct?
1 + gi/ni - λ = 0
or gi/ni - λ = 0

Since ##\lambda## isn't a fixed number, there is no difference which of those you use. They lead to the same answer for ##n_i##, once you eliminate ##\lambda##.
 
I'm still mystified.
Can we look at the actual problem instead? A bit more complicated, I'm afraid.
I want to maximize F given below under the constraints ∑ ni = N and ∑ ni ui = U, with constant N and U. I'll use α and β for the multipliers. The gi and ui are given parameters.

F = N ln N - N + ∑ ( ni ln gi - ni ln ni + ni )

Are both the following solutions correct, would you say?

ln N + ln gi - ln ni - α - β ui = 0

ln gi - ln ni - α - β ui = 0​
 
Looks like you are trying to derive the Boltzmann distribution. Google is your friend.
 
Philip Koeck said:
I'm still mystified.
Can we look at the actual problem instead? A bit more complicated, I'm afraid.
I want to maximize F given below under the constraints ∑ ni = N and ∑ ni ui = U, with constant N and U. I'll use α and β for the multipliers. The gi and ui are given parameters.

F = N ln N - N + ∑ ( ni ln gi - ni ln ni + ni )

Are both the following solutions correct, would you say?

ln N + ln gi - ln ni - α - β ui = 0

ln gi - ln ni - α - β ui = 0​

Those lead to the exact same answers for ##n_i##. They lead to different values for ##\alpha##, but you don't care about the value of ##\alpha##.
 
stevendaryl said:
Those lead to the exact same answers for ##n_i##. They lead to different values for ##\alpha##, but you don't care about the value of ##\alpha##.
Isn't α given by ∂F/∂N ? How can it be different for the two solutions?
Shouldn't it be completely defined by F?
Yes I am looking at the derivation of Boltzmann statistics, but without the correction for indistinguishability.
That's why F contains two terms that depend only on N.
 
Last edited:
Philip Koeck said:
Isn't α given by ∂F/∂N ? How can it be different for the two solutions?
Shouldn't it be completely defined by F?

Do you agree that the two solutions lead to the same values for ##n_i##?

In both cases, the solution is: ##n_i = N g_i e^{-\beta u_i}/\sum_i (g_i e^{-\beta u_i})##

The two different values for ##\alpha## differ by ##\ln N##.

What's important is ##n_i##, not ##\alpha##.
 
  • #10
stevendaryl said:
Do you agree that the two solutions lead to the same values for ##n_i##?

In both cases, the solution is: ##n_i = N g_i e^{-\beta u_i}/\sum_i (g_i e^{-\beta u_i})##

The two different values for ##\alpha## differ by ##\ln N##.

What's important is ##n_i##, not ##\alpha##.
I would write the solutions as follows:
ni = N gi exp(- α - β ui)
and
ni = gi exp(- α - β ui)
I see that you remove the α from the solutions by introducing the normalization sum.

I agree that if the α differ by ln N the two results are the same, but how do you argue that the α should be different?
 
Last edited:

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K