Help with some confusions about variational calculus

In summary, the text addresses common confusions regarding variational calculus, clarifying its principles and applications. It explains the fundamental concepts such as functionals, the calculus of variations, and the derivation of Euler-Lagrange equations. Additionally, it highlights the significance of boundary conditions and the role of functional derivatives in solving variational problems, aiming to enhance understanding of this mathematical field.
  • #1
gionole
281
24
I had some several questions about variational calculus, but seems like I can't get an answer on math stackexchange. Takes huge time. Hopefully, this topic discussion can help me resolve some of the worries I have.

Assume ##y(x)## is a true path and we do perturbation as ##y(x) + \epsilon \eta(x)##. From this, it's clear that we arrive at first order variation, assuming that we don't perturb the ##x## domains, but only ##y##. So below is the general formula.

##\delta J = \int_{x_0}^{x_1} \eta(\frac{\partial F}{\partial y} - \frac{d}{dx}\frac{\partial F}{\partial y'}) dx + \frac{\partial F}{\partial y'}\Bigr|_{x_1} \eta(x_1) - \frac{\partial F}{\partial y'}\Bigr|_{x_0} \eta(x_0)##

Assume now that I just take ##\eta(x)## to be ##1##, which means I can replace it above and get:

##\delta J = \int_{x_0}^{x_1} (\frac{\partial F}{\partial y} - \frac{d}{dx}\frac{\partial F}{\partial y'}) dx + \frac{\partial F}{\partial y'}\Bigr|_{x_1} - \frac{\partial F}{\partial y'}\Bigr|_{x_0} ## (1)

Question 1: is the ##\delta J## in (1) the variation difference in first order between the functional of ##y(x)## and ##y(x) + \epsilon## ? I need to confirm this, so yes or no would be great. If no, why ?

Question 2: If the answer to question 1 is "yes", then why am I failing at deriving the same ##\delta J## by applying variational principle directly(without replacing) ? i.e assume ##y(x)## is a true path, if so, varied path ##y(x) + \epsilon##'s action still should have no difference with original action in first order(note ##\epsilon## is infinetisemal), but I end up with ##\int_{x_0}^{x_1} \frac{\partial F}{\partial y} dx## which is clearly different.

I probably have some other questions and finally approaching the final understanding of things(at least, i am trying my best and reading an actual book). Thank you for your understanding.
 
Physics news on Phys.org
  • #2
Why do you set all of a sudden ##\eta(x)=1##? It's crucial that ##\delta J=0## for all ##\eta(x)##! In Hamilton's principle what you must assume in addition is that all allowed trajectories have the same starting and end point, i.e., ##y(x_0)=y_0## and ##y(x_1)=y_1## are fixed, which means that ##\eta(x_0)=\eta(x_1)=0##. Then your pre-last equation says that
$$\delta J=\int_{x_0}^{x_1} \mathrm{d} x \eta(x) \left (\frac{\partial F}{\partial y}-\frac{\mathrm{d}}{\mathrm{d} x} \frac{\partial F}{\partial y'} \right)=0,$$
and this must hold for all ##\eta(x)##. Then the fundamental theorem of variational calculus says that the bracket under the integral must vanish, i.e., a necessary condition for an extremum is that the Euler-Lagrange equation is fulfilled.
 
  • #3
Yes, I understand this, btw, probably you should have said that ##\delta J = 0## instead of ##\delta J = 1##. I get that. I am just playing with it. If you hypothetically assume that ##\eta(x) = 1##, then
##\delta J = \int_{x_0}^{x_1} (\frac{\partial F}{\partial y} - \frac{d}{dx}\frac{\partial F}{\partial y'}) dx + \frac{\partial F}{\partial y'}\Bigr|_{x_1} - \frac{\partial F}{\partial y'}\Bigr|_{x_0} ## (1).

I am not mentioning yet hamilton principle or whatsover, the formula
##\delta J = \int_{x_0}^{x_1} \eta(\frac{\partial F}{\partial y} - \frac{d}{dx}\frac{\partial F}{\partial y'}) dx + \frac{\partial F}{\partial y'}\Bigr|_{x_1} \eta(x_1) - \frac{\partial F}{\partial y'}\Bigr|_{x_0} \eta(x_0)## is a general formula where ##y## changes while ##x## doesn't.

and I am curious when ##\eta(x)## is replaced by 1, do we get variational difference between ##y(x)## and ##y(x) + \epsilon## paths ?
 
  • #4
Of course, sorry. I've corrected this typo. The ##\delta J## is what you calculated. I still seem not to understand your question and what you are after.
 
  • #5
@vanhees71

Take a look at this book (page 82 at the end). Note that at the beginning of page 83, author only makes ##\delta J## to be 0 on the hypothesis that actions ##J[y(x)]## and ##J[y(x) + \epsilon]## is invariant. So author replaces ##\delta x## and ##\delta y## by the transformation.

Then, this got me thinking. if ##J[y(x)]## and ##J[y(x) + \epsilon]## are not invariant, why wouldn't we be able to still say that ##\delta J = 0## ? that's how my question was born. Author uses the transformation such as ##\delta x = \epsilon \psi## and ##\delta y = \epsilon \phi##, but for my question, let's imagine that ##\psi## and ##\phi## are both 1, so transformation occurs by ##\epsilon## only. I even simplified it and only focused on the case where only ##y(x)## gets transformed.

If you replace ##\delta y## by ##\epsilon## now, why can we say that ##\delta J=0## ONLY in the case when actions ##J[y(x)]## and ##J[y(x) + \epsilon]## are invariant ? maybe, now you can read my first original question and it will make more sense. Thank you <3
 
Last edited by a moderator:
  • #6
gionole said:
Question 1: is the ##\delta J## in (1) the variation difference in first order between the functional of ##y(x)## and ##y(x) + \epsilon## ? I need to confirm this, so yes or no would be great. If no, why ?
Yes.
gionole said:
Question 2: If the answer to question 1 is "yes", then why am I failing at deriving the same ##\delta J## by applying variational principle directly(without replacing) ? i.e assume ##y(x)## is a true path, if so, varied path ##y(x) + \epsilon##'s action still should have no difference with original action in first order(note ##\epsilon## is infinetisemal), but I end up with ##\int_{x_0}^{x_1} \frac{\partial F}{\partial y} dx## which is clearly different.
It is impossible to say why you git that result unless you actually show your computation and not just state the result. It is like saying “I obtained x=5 for this system of equations, where did I go wrong?”
 
  • #7
Orodruin said:
Yes.

It is impossible to say why you git that result unless you actually show your computation and not just state the result. It is like saying “I obtained x=5 for this system of equations, where did I go wrong?”
@Orodruin If you mean, how I ended up with ##\int_{x_0}^{x_1} \frac{\partial F}{\partial y} dx##, then it's pretty simple. Assume ##y(x)## is a true path. Since we use transformation ##y(x) + \epsilon##, even in this case, since ##y(x)## is a true path, its action must still be the same as the action of ##y(x) + \epsilon## in first order. Note that ##\epsilon## is taken as infinetisemal, so this approach is valid. This all means that we can write: ##J[y(x) + \epsilon] = J[y(x)] + \frac{d}{d\epsilon}J[y(x) + \epsilon]\Bigr|_{\epsilon = 0} + O(\epsilon^2)##

so ##\frac{d}{d\epsilon}J[y(x) + \epsilon]\Bigr|_{\epsilon = 0} = \delta J = \int_{x_0}^{x_1} \frac{\partial F}{\partial y} dx##
 
  • #8
gionole said:
@Orodruin If you mean, how I ended up with ##\int_{x_0}^{x_1} \frac{\partial F}{\partial y} dx##, then it's pretty simple. Assume ##y(x)## is a true path. Since we use transformation ##y(x) + \epsilon##, even in this case, since ##y(x)## is a true path, its action must still be the same as the action of ##y(x) + \epsilon## in first order. Note that ##\epsilon## is taken as infinetisemal, so this approach is valid. This all means that we can write: ##J[y(x) + \epsilon] = J[y(x)] + \frac{d}{d\epsilon}J[y(x) + \epsilon]\Bigr|_{\epsilon = 0} + O(\epsilon^2)##

so ##\frac{d}{d\epsilon}J[y(x) + \epsilon]\Bigr|_{\epsilon = 0} = \delta J = \int_{x_0}^{x_1} \frac{\partial F}{\partial y} dx##
I mean, its the same thing as the general formula for your chosen variation …
 
  • #9
Orodruin said:
I mean, its the same thing as the general formula for your chosen variation …
how ? with the general formula and using ##\eta(x) = 1##, I ended up with:
##\delta J = \int_{x_0}^{x_1} (\frac{\partial F}{\partial y} - \frac{d}{dx}\frac{\partial F}{\partial y'}) dx + \frac{\partial F}{\partial y'}\Bigr|_{x_1} - \frac{\partial F}{\partial y'}\Bigr|_{x_0} ## (1)

and with the variational way, I ended up with: ##\delta J = \int_{x_0}^{x_1} \frac{\partial F}{\partial y} dx##

How are those two ##\delta J## the same ?
 
  • #10
Perform the integral.
 
  • #11
Maybe that's where I'm stuck. what would be the integral out of it ? would it be ##\left[\frac{\partial F}{\partial y}x\right]_{x_0}^{x_1}## ? I don't think so.
 
  • #13
@Orodruin

I tried my best, but somehow, I don't get the same thing. Can you give a hint ? that page contains lots of things(which I took a look at) but none of them help.

Update: I figured it out. I went backwards, and integrated (1) instead of ##\frac{\partial F}{\partial y}dx##. Thank you.
 
  • #14
In the general derivation you do partial integration of
$$
\int \eta’(x) \frac{\partial F}{\partial y’} dx
$$
to obtain the boundary terms and the ##d/dx## integral term. However, in its original form this is clearly zero for your specific variation since d1/dx = 0.
 
  • Like
Likes vanhees71
  • #15
My point about the fundamental theorem of calculus is that
$$
\int_a^b f’(x) dx = f(b) - f(a)
$$
With ##f = \partial F/\partial y’## the integral part of your “extra” terms trivially cancel the boundary terms.
 
  • Care
Likes gionole
  • #16
Thanks so much @Orodruin . I think I have one last question remaining .

Assume an action ##J[y(x)]## and assume that ##y(x)## is a true path. This means first order difference between the true path's action and perturbed path's action must be 0. Note that perturbed path can be represented by ##y(x) + \epsilon \eta(x)##. What's important is that I'm considering variable endpoint scenario where boundary conditions can be anywhere on a line ##x=x_0## and ##x=x_1##. Because of that, I conclude 2 things:
##\delta J## which is a variation between ##y(x)## and ##y(x) + \epsilon \eta(x)## must be 0 in first order for the following types of perturbed path.
* C1: where ##\eta(x_0) = \eta(x_1) = 0##
* C2: where ##\eta(x_0) \neq \eta(x_1) \neq 0##

General variation formula looks like the following:
##\delta J = \int_{x_0}^{x_1} \eta(\frac{\partial F}{\partial y} - \frac{d}{dx}\frac{\partial F}{\partial y'}) dx + \frac{\partial F}{\partial y'}\Bigr|_{x_1} \eta(x_1) - \frac{\partial F}{\partial y'}\Bigr|_{x_0} \eta(x_0) = 0\tag{1}##

(1) must satisfy both, C1 and C2.

---

Now, assume an action ##J[y(x)]## where ##y(x)## is a true path and another perturbed path's action ##J[y(x) + \epsilon]## and assume that these two actions are NOT invariant. also note that ##\epsilon## is infinetisemal.

Now, I say: since ##y(x)## is a true path, C1 and C2 must be satisfied here too and C2 condition can be represented as ##\eta(x) = 1## in the whole ##[x_0, x_1]## domain. We can do that, since perturbed path is ##y(x) + \epsilon##, that automatically means ##\eta(x)## is 1. Since C1 and C2 must be satisfied, it's easy to see that by C1, we get euler lagrange equation(integral part is 0) and by C2 and C1 together, ##\frac{\partial F}{\partial y'}\Bigr|_{x_1} - \frac{\partial F}{\partial y'}\Bigr|_{x_0} = 0 ## and we ended up with the conserved quantity.

Question: I am sure that somewhere, I'm wrong, but here is my question - even if actions ##J[y(x)]## and ##J[y(x)+ \epsilon]## are NOT invariant, I still end up with conservation law, which shouldn't be happening. Would you mind following my logic step by step and saying what I fail to understand ? Thank you !
 
Last edited:
  • #17
gionole said:
@vanhees71

Take a look at this book (page 82 at the end). Note that at the beginning of page 83, author only makes ##\delta J## to be 0 on the hypothesis that actions ##J[y(x)]## and ##J[y(x) + \epsilon]## is invariant. So author replaces ##\delta x## and ##\delta y## by the transformation.

Then, this got me thinking. if ##J[y(x)]## and ##J[y(x) + \epsilon]## are not invariant, why wouldn't we be able to still say that ##\delta J = 0## ? that's how my question was born. Author uses the transformation such as ##\delta x = \epsilon \psi## and ##\delta y = \epsilon \phi##, but for my question, let's imagine that ##\psi## and ##\phi## are both 1, so transformation occurs by ##\epsilon## only. I even simplified it and only focused on the case where only ##y(x)## gets transformed.

If you replace ##\delta y## by ##\epsilon## now, why can we say that ##\delta J=0## ONLY in the case when actions ##J[y(x)]## and ##J[y(x) + \epsilon]## are invariant ? maybe, now you can read my first original question and it will make more sense. Thank you <3
But this is now about Noether's theorem and not the derivation of the Euler-Lagrange equations. That's a different form of "variations", i.e., an "infinitesimal symmetry transformation" describing a one-parameter Lie symmetry in terms of the corresponding Lie algebra.
 
  • #18
@vanhees71 Hi. Thanks so much for your time. Can you read #16 reply ? I described my question much better.
 
  • #19
I don't know, what you are after. You have to get clear, what you want to achieve. There are now two different issues in the discussion.

(a) Hamilton's principle

There you have, by definition, variations with ##\delta t=0## and with fixed boundary conditions ##y(t_0)=y_0## and ##y(t_1)=y_1##, i.e., ##\delta y(t_0)=\delta y(t_1)=0##. There the boundary terms from the integration by parts vanish by definition, and you can apply the fundamental theorem of variations to deduce the Euler-Lagrange equations, which determine the "true paths of the particle", i.e., the solutions of the equations of motion. Using ##L=T-V## leads to Newton's equations of motion for a particle in a potential, i.e., under the influence of the force ##\vec{F}=-\vec{\nabla} V##.

(b) Noether's theorem

That's about symmetries. A symmetry transformation can be of the very general form
$$t'=t+\epsilon T(y,\dot{y},t), \quad y'=y+\epsilon T(y,\dot{y},t).$$
This is by definition a symmetry transformation if the Lagrangian
$$L'=\frac{\mathrm{d} t'}{\mathrm{d} t} L(t+\epsilon T, y+\epsilon T,\dot{y}+\epsilon \dot{T},t+\epsilon T)$$
is equivalent to ##L##, to order ##\epsilon##.

Two Lagrangians are equivalent, if the 1st variations of the corresponding action functionals are the same. This implies that there must exist a function ##\Omega(y,t)## such that
$$L'=L+\frac{\mathrm{d}}{\mathrm{d} t} \Omega(y,t).$$
This then implies that for the solutions of the Euler-Lagrange equations there is a conserved quantity. That's Noether's (first) theorem for point-particle mechanics.
 
  • #20
@vanhees71

I actually understand what you're saying. I think we got a problem of misunderstanding my question. let me try to put it in another words.

There're scenarios where you can apply 2 conditions. Imagine Brachistochrone problem where one of the end of the string/slide can be put anywhere at ##x=x_1## (i.e in other words, you're not restricted with a fixed boundary condition). Such problems are called variable endpoint problems and calculus variation works the following way: you end up with a general formula where the boundary terms(that we got from integration by parts) don't vanish. What you do then is use 2 conditions:
1) if ##y(x)## is an extremum, perturbed path that vanishes at endpoints must be 0 in difference in first order and this gets you euler lagrange.
2) if ##y(x)## is an extremum, perturbed path that does NOT vanish at endpoints must also be 0 in difference in first order and this gets you extra conditions alongside euler lagrange.

I am simply discussing this variable endpoint scenario. So let me try to simplify the questions.

Question : Follow that scenario above. Since ##y(x)## is an extremum and has an action ##J[y(x) + \epsilon]##. Assume now a perturbed path ##y(x) + \epsilon##(i.e look at it as a variation, just follow me on this) and has an action ##J[y(x) + \epsilon]##. I am now saying, that ##J[y(x) + \epsilon] - J[y(x)] = O(\epsilon^2)## - in other words, these actions are the same in first order. Another way to look at it is ##y(x) + \epsilon## is the same as ##y(x) + \epsilon \eta(x)## where ##\eta(x) = 1## and this is the same case as in (2) above. So, even if actions(##J[y(x) + \epsilon]##, ##J[y(x)]##) are NOT invariant, I still end up with ##J[y(x) + \epsilon] - J[y(x)] = O(\epsilon^2)## that is the same as something gets conserved..
 
  • #21
But in the brachystochrone problem you also consider trajectories with fixed end points. It's the paradigmatic example of a variational problem. Without imposing fixed boundaries you get additional boundary conditions from the boundary terms.
 
  • #22
@vanhees71

Yes, so with such variable endpoint problem, you consider paths that are with fixed endpoints and you also consider paths that are non-fixed points. It's like all of them are admissible, but ##J[y(x)]## must be 0 in first order with all of them.

all I am saying now is that ##y(x) + \epsilon## is also such a path that is admissible and ##J[y(x)]## must be 0 in first order with ##J[y(x) + \epsilon]##. That's one of the condition though and another condition is ##J[y(x)]## must also be 0 in first order with ##J[y(x) + \epsilon\eta(x)]## where ##\eta(x_0) = \eta(x_1) = 0##.

So in this scenario, I still get conserved quantity by calculating the following ##J[y(x) + \epsilon] - J[y(x)]## in first order. Note that there's NO need that actions must be invariant. even if they're not invariant, conserved quantity still exists. and that was my question. Why do we require that actions must be invariant as a first rule in order to have conserved quantity ?
 
  • #23
I give up. I seem not to be able to resolve this confusion :-(.
 

FAQ: Help with some confusions about variational calculus

What is variational calculus?

Variational calculus is a field of mathematical analysis that deals with finding extrema (maximum or minimum values) of functionals, which are mappings from a set of functions to the real numbers. It is often used to find the functions that optimize a certain quantity, such as the shortest path between two points or the shape of a curve that minimizes energy.

How is variational calculus different from regular calculus?

Regular calculus typically deals with finding the extrema of functions, which are mappings from real numbers to real numbers. In contrast, variational calculus deals with functionals, which are mappings from a set of functions to the real numbers. This often involves finding functions rather than specific values that optimize a given functional.

What is the Euler-Lagrange equation?

The Euler-Lagrange equation is a fundamental equation in variational calculus that provides a necessary condition for a function to be an extremum of a functional. It is derived by taking the first variation of the functional and setting it to zero. The equation is typically written as: \(\frac{\partial L}{\partial y} - \frac{d}{dx} \left( \frac{\partial L}{\partial y'} \right) = 0\), where \(L\) is the Lagrangian of the functional.

What are boundary conditions in variational calculus?

Boundary conditions are constraints that the solution to a variational problem must satisfy at the boundaries of the domain. These conditions can be specified in terms of the function itself (Dirichlet boundary conditions) or its derivatives (Neumann boundary conditions). They are essential for ensuring a well-posed problem and for determining a unique solution.

Can you give an example of a variational problem?

One classic example of a variational problem is the brachistochrone problem, which seeks the shape of a curve down which a particle will slide under the influence of gravity in the shortest time. The functional to be minimized in this case is the time taken for the particle to travel from one point to another, and the solution involves finding the curve (a cycloid) that minimizes this time.

Similar threads

Replies
1
Views
849
Replies
2
Views
815
Replies
4
Views
1K
Replies
1
Views
2K
Replies
9
Views
2K
Replies
12
Views
2K
Replies
5
Views
1K
Replies
3
Views
760
Back
Top