## Empty one year ago Time to derive the Euler-Lagrange equation! @Astrophysics

1. Astrophysics

woot woot

2. Empty

Alright so first off, I'll throw this up here: $\int_a^b \sqrt{1+(y')^2}dx$ What's his integral? What function y minimizes this integral, any ideas?

3. IrishBoy123

.

4. Empty

c'mon gogogooogogoogoogoogoogogoggo none of my questions should take longer than 5 minutes, if you don't know you don't know, just say something and let's move forward I don't want this to drag on cause this is quite long.

5. Empty

Ahhh no I have to have participation for this one every step of the way, otherwise once you're lost it's hopeless since this is quite difficult. If you gotta do your homework though we can do this some other time if you like.

6. Astrophysics

Naw it's cool, lets do it!

7. Astrophysics

straight line

8. Empty

Ok! Also anyone else who wants to chime in and try to answer my questions feel free! Ok so back to what's up: That integral is arc length, what function y(x) minimizes the value of that integral given an interval [a,b]? A straight line, y=mx+b as they say! (At least in Euclidean space, let's not worry about nonEuclidean space for now hehe ;P ) So we can rewrite this integral as: $J[y] = \int_a^b \sqrt{1+(y')^2}dx$ The [ ] square brackets mean that the input is a function and the output is a number. This is a functional! So in our case we know that when y=mx+b this will make $$J[y]$$ to be a minimum, as in some sense the derivative will be equal to zero here in some sense! We'll get into this soon!

9. Empty

Now we can look at a more general case, $J[y] = \int_a^b F(x,y,y')dx$ Where now F(x,y,y') could be a bunch of other stuff you'd like to integrate such as some stuff about a curve that will let you travel under the force of gravity in the shortest amount of time or it might represent a hanging chain. We'll get more into the details of this later, the key thing is that our goal here is to find in general: What function y minimizes the integral J[y]? Any ideas or questions before I get into it?

10. Astrophysics

So far so good!

11. Astrophysics

The idea is to get a function that minimizes/ maximizes the integral, so in a nutshell we're looking for the equation of a line correct?

12. Mimi_x3

you guys don't have a life.

13. Empty

Only when the integral has $F(x,y,y')=\sqrt{1+(y')^2}$ For instance F=T-V could be minimizing the action along a path.

14. Astrophysics

Right right, so this is the principle of least action, so if we have a path, |dw:1443264864345:dw| quick sketch, it could be any path

15. Empty

So if I give you say $F(x,y,y') = \frac{1}{2}m(y')^2 - \frac{1}{2}ky^2$ then what y minimizes this? the path of a pendulum or a spring.

16. Empty

You have to be sharp on this one because we're looking at x as being the independent variable an y as the dependent variable. You would probably feel much more comfortable if I had written the exact same thing as this: $F(t,x,v)=\frac{1}{2}mv^2 - \frac{1}{2}kx^2$ So don't let the dummy names fool you, it's the relationships that matter don't focus on names, they're meaningless symbols.

17. Astrophysics

Haha, no I thought it was spring as soon as I saw it

18. Jhannybean

The dummy names are fooling me -_-, it wasnt until i saw the other form i recognized it.

19. Empty

Ok cool, well let's jump in then. First we need to set the value of y at the boundaries, $y(a)=A$$y(b)=B$ and we want to somehow minimize this J[y] so in order to do that what the hell do we do? Let's pretend we already have the min, and call it y bar: $$\bar y$$ Now on top of $$\bar y$$ I'll throw another almost entirely arbitrary function eta multiplied by some scaling value and add it to it. |dw:1443265381728:dw| So here I've drawn eta $$\eta(x)$$ as a continuous differentiable function that obeys these boundary conditions which will become important and more clear later: $\eta(a)=\eta(b)=0$ So now we have this function: $y(x)=\bar y(x)+k \eta(x)$ So when k=0 we have $y=\bar y$ which means we're at our minimum possible value. Remember eta is a completely arbitrary function as long as it obeys those rules. So give this a couple read overs, and try to anticipate what we will try to do next and tell me. I'm making some coffee so I'll be back shortly! :D

20. Astrophysics

I think that's the best explanation I've seen of eta yet

21. Empty

I want both of you to give me one possible function eta can be before we move forward.

22. Astrophysics

I don't know, it's an arbitrary function right xD

23. Astrophysics

I believe k is the constant multiply of eta, so you can pretty much use any function f(x)=kx^2

24. Astrophysics

long as it's between the two points

25. Astrophysics

multiple*

26. Empty

Ok so two things, the multiple of k won't affect it, but it's not exactly part of eta even though it could have been, this isn't very important. And you're right it needs to connect up, so now this is kind of a tricky and a side tangent but I think it's worth trying to do once. Make sure that your function obeys this: $\eta(a)=\eta(b)=0$

27. Astrophysics

I should have set up an actual function for y(x) though

28. Astrophysics

Ok so we can use equation of a straight line then put parabolas

29. Astrophysics

long as it's between the intervals

30. Jhannybean

It took me a freaking minute to understand the relation between k and $$\eta$$ and $$\bar y$$

31. Jhannybean

and why $$y=\bar y$$. dammit lol

32. Astrophysics

I don't I sort of related it to the equation of a line haha

33. Astrophysics

Unless i'm wrong

34. Jhannybean

Yeah same. i related to coordinate points along both functions..

35. Empty

So here's are a couple of ways we could have done it: $\eta(x)=(x-a)(x-b)$ $\eta(x)=\sin[(x-a)(x-b)]$ But of course these are just completely general functions and it's not important that we have these, just as long as you understand what they would look like. So here I have used f(x) to play the role of y bar, and g(x) is playing the role of eta. Look at how when k=0 we get the graph we want. https://www.desmos.com/calculator/dnhlnprvs6

36. Astrophysics

Smart idea to use desmos, ok yeah I think I understand it

37. Empty

Take note, that the animation is pivoting around the points x=0 and x=4 since at these points eta is zero, so it doesn't change the function we have there.

38. Empty

After seeing this are there any more questions about this? This is really the conceptual bulk of the problem, the next piece is not so much conceptual as it is just going through some highly-adult-level calculus (well like as tough as calculus 3 derivatives can get).

39. Empty

There is one last major thing I should lay out before we start pluggin' and chuggin' so the picture isn't quite complete yet but almost and I've laid the groundwork hopefully.

40. Astrophysics

We always assumed the f(x) value is the min right? I was never too sure how to know it was ACTUALLY the min, like even with that drawing I made earlier (principle of least action) I assumed that was the min haha.

41. Empty

Yes we have assumed f(x) is the min. Right now we don't actually know what it is, the picture I've made that one is just some arbitrary one, so f(x)=mx+b would be the minimizing function for $F(x,y,y')=\sqrt{1+(y')^2}$ however what I've chosen here $f(x)=\cosh(x-2)$ will be some minimizing function for some other choice of $F(x,y,y')$ Continuing on a little bit with my explanation to try to make this more clear and give us an analytical expression to evaluate: |dw:1443267473954:dw| So imagine perhaps that J[y] is the arc length integral which gives a minimum value when y=mx+b. and so if we had thrown some eta function multiplied by a constant we'd have like: $y=mx+b+k\sin x$ if say $$a=0$$ and $$b=2 \pi$$

42. Empty

https://www.desmos.com/calculator/kgjhjslvf7 Imagine integrating arc length. for the curve on the interval $$[0,2 \pi]$$ here. When is this integral going to give you the smallest value? When k=0. I think this should make this completely clear now.

43. Empty

I'll let you think about this, ask me any questions, cause this is really the crucial part, once you've connected this picture to the concept I think you'll have it. And like I said earlier, anyone can ask a question any time, it lets me know you're thinking about it and I have purposefully left out things for the sake of trying to make this as easy as possible but if something bugs you, say it!!! :D

44. Astrophysics

Looks good so far!

45. Empty

Alright then! Calculus time. We have just by creation made this true: $\frac{d J[y]}{dk} |_{k=0} = 0$ All this says is the derivative of our integral with respect to k is 0 when k=0. Remember, $y=\bar y + k \eta$ has to be plugged in to evaluate in a second, I'll go ahead and start it out, then you will have to struggle through what I think is the most difficult part, and after you give up I'll give you the answer ;P $\frac{d J[y]}{dk} = \frac{d}{dk} \int_a^b F(x,y,y')dx = \int_a^b \frac{\partial}{ \partial k} F(x,y,y')dx =?$ So you'll have to use the chain rule, because remember F depends on y and y depends on k. Good luck! I'll be back in 5. :D

46. Jhannybean

I'll come back to look at this later today, I've got to be up in 2 hours and heading to take a nap atleast before leaving. I'll look at all this then :)

47. Astrophysics

I think we should finish this off tomorrow, it's 6 am here, I'll work on this tomorrow when I'm not so tired XD, this is fun

48. Astrophysics

$\int\limits_{a}^{b} [\frac{ \partial F }{ \partial y } \frac{ \partial y }{ \partial k }+\frac{ \partial F }{ \partial x }\frac{ \partial x }{ \partial k }]dx$

49. Astrophysics

That's my set up, now I'm going to sleep xD

50. Empty

Close, but wrong in a weird way. I think you're cheating :)

51. Astrophysics

I used chain rule

52. Astrophysics

Oooooh

53. Astrophysics

that should y'

54. Empty

Yes but we also have a third term in F(x,y,y') there's no $\frac{\partial F}{\partial y'} \frac{\partial y'}{\partial k}$ Also, this term is weird and not correct! $\frac{ \partial F }{ \partial k} \frac{ \partial k }{ \partial y } = \frac{\partial F}{\partial y}$

55. Empty

So now you've got two steps left to do, plug in y and then evaluate at k=0.

56. Astrophysics

There should be a partial k in the second term not x

57. Astrophysics

and I didn't cheat!

58. Empty

Awesome! This was pretty much the hardest part so from here it's all mostly down hill.

59. Empty

Right now evaluate $\frac{\partial y}{\partial k}$ using $y=\bar y + k \eta$

60. Astrophysics

we just get eta

61. Astrophysics

$\frac{ \partial y }{ \partial k } = \eta$

62. Astrophysics

Now we can use by parts

63. Empty

Wait, only one of those three derivatives is eta. The other two are different. And you're anticipating we will be using by parts but there's actually no need to if this was the real answer!

64. Astrophysics

Yeah I see, but w/e I'll do this later tomorrow, going to bed, thanks