/
hm.tex
6667 lines (5778 loc) · 375 KB
/
hm.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\documentclass[english,fontsize=11pt,paper=a5,oneside]{scrbook}
\usepackage{textcomp,microtype, ifluatex, ifxetex}
\ifx\ifxetex\ifluatex\else % if lua- or xelatex http://tex.stackexchange.com/a/140164/1913
\usepackage{fontspec}
\setmainfont{OpenDyslexic}
\setsansfont{OpenDyslexic}
\setmonofont{OpenDyslexicMono}
\setmainfont[Renderer=Basic, Numbers=OldStyle, Scale = 1.0]{TeX Gyre Pagella}
\setsansfont[Renderer=Basic, Scale=0.90]{TeX Gyre Heros}
\setmonofont[Renderer=Basic]{TeX Gyre Cursor}
\renewcommand{\textls}[2][5]{%
\begingroup\addfontfeatures{LetterSpace=#1}#2\endgroup
}
\fi
\usepackage{booktabs}
\usepackage{xcolor}
\usepackage{graphicx}
\graphicspath{{images/}{../images/}}
\usepackage{mathtools}
\usepackage{amsmath, amssymb, amsthm}
\usepackage{bm}
\usepackage{units}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{tikz-3dplot}
\pgfplotsset{compat=1.16}
\usepackage{wrapfig}
\usepackage{tcolorbox}
%\usepackage{todonotes}
% uncomment to tag only the referred equations (post-production)
\mathtoolsset{showonlyrefs,showmanualtags}
\usepackage[font=footnotesize]{caption}
\usepackage{xparse, picins}
\DeclareDocumentCommand \addpic{O{0.4\textwidth} m g}{\parpic[r]{%
\begin{minipage}{#1}
\includegraphics[width=\textwidth]{#2}%
\IfNoValueTF{#3}{}{\captionof{figure}{\footnotesize #3}}
\end{minipage}
}}
% comment before publication
%\usepackage{showlabels}
\usepackage[
type={CC},
modifier={by-nc-sa},
version={4.0},
]{doclicense}
\usepackage{babel}
\usepackage{hyperref}
\hypersetup{
colorlinks,
linkcolor={blue!60!black},
citecolor={blue!60!black},
urlcolor={blue!60!black},
linktoc=page}
\DeclareTextCommandDefault{\textbullet}{\ensuremath{\bullet}}
\usepackage[numbers, sort]{natbib}
\setlength{\bibsep}{3pt}
\renewcommand{\bibfont}{\small}
\usepackage{doi}
\newcommand{\cC}{\mathcal{C}}
\newcommand{\cE}{\mathcal{E}}
\newcommand{\cL}{\mathcal{L}}
\newcommand{\cO}{\mathcal{O}}
\newcommand{\cH}{\mathcal{H}}
\newcommand{\cI}{\mathcal{I}}
\newcommand{\cT}{\mathcal{T}}
%\newcommand{\C}{\mathbb{C}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\T}{\mathbb{T}}
\newcommand{\bS}{\mathbb{S}}
\newcommand{\bx}{\bm{x}}
\newcommand{\bp}{\bm{p}}
\newcommand{\bv}{\bm{v}}
\newcommand{\lag}{\langle}
\newcommand{\rag}{\rangle}
\let\d\relax
\newcommand{\d}{\mathrm{d}}
\DeclareMathOperator{\D}{D}
\DeclareMathOperator{\Id}{Id}
\DeclareMathOperator{\diag}{diag}
\let\mod\relax
\DeclareMathOperator{\mod}{mod}
\DeclareMathOperator{\curl}{curl}
\DeclareMathOperator{\Vol}{Vol}
\newcommand{\pder}[2]{\frac{\partial{#1}}{\partial{#2}}}
\newcommand{\der}[2]{\frac{\d{#1}}{\d{#2}}}
\newtheorem{theorem}{Theorem}[chapter]
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}{Definition}
\theoremstyle{definition}
\newtheorem{remarkx}{Remark}[chapter]
\newenvironment{remark}
{\pushQED{\qed}\renewcommand{\qedsymbol}{$\lozenge$}\remarkx}
{\popQED\endremarkx}
\newtheorem{examplex}{Example}[chapter]
\newenvironment{example}
{\pushQED{\qed}\renewcommand{\qedsymbol}{$\lozenge$}\examplex}
{\popQED\endexamplex}
\newtheorem{exercisex}{Exercise}[chapter]
\newenvironment{exercise}
{\pushQED{\qed}\renewcommand{\qedsymbol}{$\maltese$}\exercisex}
{\popQED\endexercisex}
\usepackage[toc,page]{appendix}
\usepackage{subfiles}
\title{Hamiltonian Mechanics}
\author{Marcello Seri\\
\small{Bernoulli Institute}\vspace{-.2cm}\\
\small{University of Groningen}\vspace{-.2cm}\\
\small\href{mailto:m.seri@rug.nl}{m.seri (at) rug.nl}
}
\date{}
% trick for bibliography in subfiles -- part 1
\def\biblio{\bibliographystyle{plainnat}\bibliography{../book}}
\usepackage{scrhack}
\begin{document}
% trick for bibliography in subfiles -- part 2
\def\biblio{}
\maketitle
\cleardoublepage
\thispagestyle{empty}
\null\vfill
\begin{center}
Version 1.11\\
\today
\end{center}
\vfill
\small{\doclicenseThis}
\cleardoublepage
\pagenumbering{roman}
\tableofcontents
\cleardoublepage
\pagenumbering{arabic}
\chapter*{Preface}
The literature on classical (or analytical, as it was called by Lagrange) mechanics is full of good material.
Different sources present the topic from different perspectives and with different points of view, and may suite different people differently.
In these lecture notes I am iterating on my perspective.
The approach I am taking has been heavily influenced by \cite{book:arnold, book:knauf, lectures:dubrovin, book:lowenstein, book:marsdenratiu, lectures:tong, landau1976mechanics}.
The book \cite{book:knauf} will be a good extra reference for the course. In addition to being a good introduction to many topics in classical mechanics that we will not have time to discuss during the lectures, it covers almost all the material that we will treat in chapters 1, 6, 8, 10, 11, 13, 15. Furthermore, the book can be freely and legally accessed via the University proxy using the \href{https://link.springer.com/book/10.1007%2F978-3-662-55774-7}{SpringerLink} service.
I had lots of fun reading \cite{schwichtenberg2019no}, if none of the references above satisfies you, consider having a look at that. And for an unusual approach to the topic, centered around the idea that everything should be explicit enough to be directly computable by a computer, you can have a look at the marvellous \cite{book:sicm}. Finally, a good and enjoyable classical reference is \cite{goldstein2013classical}.\medskip
These notes are not (yet?) exhaustive.
They will be updated throughout the course, and it will likely take a few years of course iterations before they fully stabilize.
Some topics, examples and exercises discussed in class will not be in these notes, but may appear as examples, exercises or problems in the literature presented above or on the material posted in the course webpage.
Throughout the course, we will discuss the main ideas in Newtonian, Lagrangian and Hamiltonian mechanics and the relations between them.
This will include symmetries and elementary phase space reduction, normal modes and small oscillations.
We will then move to study action--angle coordinates and integrability, and finally we will discuss elementary perturbation theory.
On the latter, we will only briefly discuss resonances and mostly focus on the meaning of the Kolmogorov-Arnold-Moser theorem and the Nekhoroshev theorem.
Topics that I intend to add over time include: contact mechanics, non-holonomic mechanics/sub-riemannian geometry, numerical methods, rigid bodies, mathematical billiards, integrability via Lax pairs... I don't know if this is just whishful thinking or if it will happen at some point, but I welcome any contribution in these directions.
A number of extra references covering some of the topics mentioned above is \href{https://www.mseri.me/links-from-hm/}{collected on my blog}. I will make sure to keep the post updated and the links working. \medskip
Please don't be afraid to send me comments to improve the course or the text and to fix the many typos that will surely be in this first draft. They will be very appreciated.
I am extremely grateful to Nithesh Balasubramanian, Senan Bird, Riccardo Bonetto, Josephine van Driel, Ramsay Duff, Mollie Jagoe-Brown, Jesse Mulder, Dijs de Neeling, Anouk Pelzer, Iisekki Rotko, Danique de Ruiter, Robbert Scholtens, Felix Semler, Albert \v{S}ilvans, Marit van Straaten and Jermain Wall\'e for their careful reading of the notes and their useful comments and corrections.
Last but not least, I owe a huge debt of gratitude to \href{https://crojasmolina.com}{Constanza Rojas-Molina}, who kindly allowed me to use some of her beautiful artworks in these notes.
\chapter{Classical mechanics, from Newton to Lagrange and back}
In this chapter we will review some basic concepts of classical mechanics.\
In particular we will briefly discuss variational calculus, Lagrangian mechanics and Newtonian mechanics, superficially presenting along the way some simple examples to motivate part of the rest of the course.
For a deeper and more detailed account, you can refer to \cite{book:arnold,book:knauf}.
\section{Newtonian mechanics}
Our main interest will be in describing equations of motion of an idealized \emph{point particle}.
This is a point--like object obtained by ignoring the dimensions of the physical object. Note that in many cases this is a reasonable approximation, for example, when describing planetary motion around the sun, we can consider the planet and the sun as two point particles without affecting much the qualitative properties of the system.
Of course this is not a universal simplification: for instance, we cannot do it when describing the motion of a planet around its axes.
For us, a point particle usually carries a \emph{mass} $m$.
Its \emph{position} in space is described by the position vector $\bx = (x, y ,z)$.
Keep in mind that
\begin{equation}
\bx : \R\to\R^3,\quad t \mapsto \bx(t),
\end{equation}
is a function of time that describes the instantaneous state of the system during its evolution.
In most cases, this will be implicitly assumed and we will omit the explicit dependence on $t$.
The \emph{velocity} of the point particle is given by the rate of change of the position vector,
i.e., its derivative with respect to time\footnote{Notation: the symbol $a := b$ means that $a$ is defined by the expression $b$, similarly $b =: a$ is the same statement but read from right to left.}
\begin{equation}
\bv = \der{\bx}{t} =: \dot{\bx} = (\dot{x}, \dot{y}, \dot{z}).
\end{equation}
We call \emph{acceleration}, the rate of change of the velocity, i.e., the second derivative
\begin{equation}
\bm{a} = \der{^2\bx}{t^2} =: \ddot{\bx} = (\ddot{x}, \ddot{y}, \ddot{z}).
\end{equation}
\begin{tcolorbox}
The mechanics of the particle is encoded by \emph{Newton's second law of motion}.
That is, there exist \emph{frames of reference} (i.e systems of coordinates) in which the motion of the particle is described by a differential equation involving the forces $\bm{F}$ acting on the point particle, its mass $m$ and its acceleration as follows\footnote{This is not completely true, Newton was already talking about momentum, which \href{https://web.archive.org/web/20211201082909/https://bigthink.com/starts-with-a-bang/most-important-equation-physics/}{makes a deep difference} but would set us off-course right now.}
\begin{equation}\label{eq:newton}
\bm F = m \ddot{\bx}.
\end{equation}
\end{tcolorbox}
Let's leave it here for now, we will come back to it later on.
\medskip
In general we will consider systems of $N$ point particles.
These will be described by a set of $N$ position vectors $\bx_k = (x_k, y_k ,z_k)$ with masses $m_k$, $k = 1, \ldots, N$.
For convenience we will denote\footnote{Here we are identifying $\R^{3\times N}$, the space of $3\times N$ matrices, and $\R^{3N}$, the space of $3N$ vectors. Namely, $\bx = (\bx_1, \ldots, \bx_N) = (x_1, y_1, z_1, x_2, y_2, z_2, \ldots, x_N, y_N, z_N)$ is used interchangeably as the vector of positions of the points in three-space or as the vector including all the positions of the $N$ bodies together.} $\bx = (\bx_1, \ldots, \bx_N)\in\R^{3N}$, and $\bm{m} = (m_1, \ldots, m_N)\in\R^N$.
We call $\bx(t)$ the \emph{configuration} of the system at time $t$ in the \emph{configuration space} $\R^{3N}$.
\begin{example}\label{example:gcoords}
For example a system of two rigid pendulums in space constrained to oscillate on a vertical plane, is described by two position vectors, so $\bx = (\bx_1, \bx_2)\in\R^{6}$.
However, to describe their configuration we only need two angular variables, one for each of the pendulums. So, for all practical purposes, the system could be completely described\footnote{Here there is an hidden statement: $\bS^1\times\bS^1 \simeq \T^2$. This should be read as: the 2-torus, the surface of a doughnut, is diffemorphic to the product of two circles. Here, diffeomorphic is a concept from the theory of smooth manifolds, and stands for the existence a smooth bijection between the two constructions. Note that $\simeq$ usually denotes some kind of equivalence, but which specific kind is context-dependent and not often well explicited.} by $q = (q^1, q^2) \in \bS^1\times\bS^1 \simeq \T^2$. See Figure~\ref{fig:twopend}.
\end{example}
\begin{figure}[ht!]
\centering
\includegraphics[width=0.9\linewidth,trim={0 1cm 0 1cm}, clip]{{images/HM-1.1}.pdf}
\caption{Left: a system of two decoupled pendulums in $\R^3$. Right: corresponding generalized coordinates.}%
\label{fig:twopend}
\end{figure}
We say that a system of $N$ particles has \emph{$n$ degrees of freedom} if we need $n$ independent parameters to uniquely specify the system configuration\footnote{As Example~\ref{example:gcoords} shows, the $n$ degrees of freedom do not have to be the cartesian coordinates of the point particles.}. We call \emph{generalized coordinates} any set of $n$ parameters $q = (q^1, \ldots, q^n)$ that uniquely determine the configuration of a system with $n$ degrees of freedom, and \emph{generalized velocities} their time derivatives $\dot q = (\dot q^1, \ldots, \dot q^n)$. The \emph{state} of the system is then characterized by the set of (generalized) coordinates and velocities $(q, \dot q) = \left(q^1, \ldots, q^n,\dot q^1, \ldots, \dot q^n\right)$.
If you recall differential geometry, you may (correctly) guess that the generalized coordinates will be points on some differentiable manifold $q\in M$, their evolution will be described by a curve $q: \R \to M$ parametrized by time and the state of the system will be a point in the tangent bundle $(q, \dot q)\in TM$, i.e., $\dot q \in T_q M$ (see also section~\ref{sec:lagrangianonmanifold}).
\medskip
We have now all the elements to translate the \emph{Newtonian principle of determinacy} in mathematical terms.
In 1814, Laplace \cite{book:laplace} wrote
\begin{quotation}
We may regard the present state of the universe as the effect of its past and the cause of its future. An intellect which at a certain moment would know all forces that set nature in motion, and all positions of all items of which nature is composed, if this intellect were also vast enough to submit these data to analysis, it would embrace in a single formula the movements of the greatest bodies of the universe and those of the tiniest atom; for such an intellect nothing would be uncertain and the future just like the past would be present before its eyes.
\end{quotation}
In other words, this principle states that the initial state $\left(q(t_0), \dot q(t_0)\right)$ uniquely determines its evolution $\left(q(t),\dot q(t)\right)$ for $t > t_0$.
The Picard-Lindel\"of theorem\footnote{Also known as ``Existence and uniqueness of solutions of initial value problems'', \cite[Theorem 3.17]{book:knauf}.} implies that the Newtonian principle of determinacy is locally satisfied by the \emph{equations of motion} of the mechanical system, i.e., second order differential equations derived from Newton's law.
\subsection{Motion in one degree of freedom}
Before taking a little detour into Lagrangian mechanics, let's anticipate some of the upcoming concepts in a few simple cases.
\begin{example}[Horizontal spring and pendulum]\label{ex:sprPen}
Consider an idealized system consisting of a point particle of mass $m$ attached to a spring with stiffness $k$, sliding on a frictionless surface.
Assume that the motion is one-dimensional along the axis of the spring and let $x$ denote the displacement of the system from its equilibrium position, i.e., the position in which the spring is completely at rest: not compressed nor extended. We consider this system to exclude gravitational forces from the picture.
\emph{Hooke's law} states that the restoring force $F$ exerted by the spring on whatever is pulling its free end scales linearly with respect to the distance it's been pulled: i.e., $F(x) = - k x$, see Figure~\ref{fig:spring-pendulum} left. According to \eqref{eq:newton}, then, the motion of the point particle is given by
\begin{equation}\label{eq:spring}
m \ddot{x} = - k x \qquad\mbox{or}\qquad \ddot{x} = - \omega^2 x \quad\mbox{where } \omega = \sqrt{k/m}.
\end{equation}
The solution, $x(t)$, is generally described by
\begin{equation}\label{eq:springsol}
x(t) = R \cos(\omega t + \phi),
\end{equation} with the unknowns $R$ and $\phi$ uniquely prescribed by the initial conditions
\begin{equation}
x(0) = R\cos(\phi) \qquad\mbox{and}\qquad \dot x(0) = -\omega R \sin(\phi).
\end{equation}
Clearly, once we know the initial conditions, the full evolution of the solution $x(t)$ is known, in agreement with Newton's principle of determinacy. \medskip
\begin{figure}[ht!]
\includegraphics[width=.9\linewidth]{{images/HM-1.2}.pdf}
\caption{Left: horizontal spring. Right: planar pendulum.}%
\label{fig:spring-pendulum}
\end{figure}
Consider, now, a point particle of mass $m$ attached to a pivot on the ceiling via a rigid rod of length $l$.
Assume the motion is frictionless and happening only in the vertical direction.
Let $x$ denote the angle of displacement of the system from its equilibrium position, i.e., the lowest point on the arc of motion. Take the angle at equilibrium to be zero, with positive sign on the right hand side of the vertical, and negative on the left.
The force acting on the pendulum is Earth's gravitational attraction. According to \eqref{eq:newton}, then, the motion of the point particle is given by
\begin{equation}
m l \ddot{x} = - m g \sin(x) \qquad\mbox{or}\qquad \ddot{x} = - \omega^2 \sin(x) \quad\mbox{where } \omega = \sqrt{g/l}.
\end{equation}
Here, $g \approx 9.8 m s^{-2}$ denotes the gravitational acceleration.
Although it is possible to solve the equation of motion of the pendulum by means of elliptic integrals, this is rather cumbersome.
Under certain conditions, when $\sin x \approx x$, we can actually avoid doing this and instead we use the equation of the spring as a model for the pendulum oscillation via the so-called called \emph{small oscillations} approximation.
We will come back to this later on.
\end{example}
\begin{example}[Idealized motion of the Earth around the Sun]\label{ex:Kepler0}
Let us approximate the Sun with a point particle of mass $M$ positioned at the origin $\bm{0}\in\R^3$ of the Euclidean space. In this solar system, with the Sun fixed at the origin, we will describe the Earth by a point particle of mass $m$ whose position (and motion) is described by a vector $\bx\in\R^3$.
Due to our choice of coordinates, the gravitational attraction of the Sun acts in direction $-\bx(t)$. \emph{Newton's law of universal gravitation} says that such a force is proportional to
\begin{equation}
\frac{GmM}{\|\bm{0}-\bx\|^2} = \frac{GmM}{\|\bx\|^2},
\end{equation}
where $G \sim 6.674 \cdot 10^{-11} \frac{m^3}{s^2\,kg}$ is called the \emph{gravitational constant}.
Once we collect all the elements into Newton's second law \eqref{eq:newton}, we obtain the equation of motion
\begin{equation}\label{eq:keplerex}
m \ddot{\bx} = - G\frac{mM}{\|\bx\|^2} \frac{\bx}{\|\bx\|}.
\end{equation}
This is an autonomous second order ordinary differential equation on the configuration space $\R^3\setminus\big\{\bm{0}\big\}$.
Providing the initial conditions $\bx(0)=\bx_0$ and $\dot{\bx}(0)=\bv_0$, we can try to explicitly solve \eqref{eq:keplerex}, however in this case we could already get a lot of insight by taking a slightly different point of view.
Behind differential equations in classical mechanics lies a surprisingly rich geometrical structure, in which conserved quantities play a special role.
These can help to obtain extensive information on the solution of classical equations of motion without the need to explicitly solve the equations (which would be, in general, impossible).
On the tangent bundle $(\R^3\setminus\big\{\bm{0}\big\})\times\R^3$, let us define the total energy
\begin{equation}\label{eq:energyKepler}
E(\bx,\bv) = \frac{1}{2}m\|\bv\|^2 - \frac{GmM}{\|\bx\|},
\end{equation}
the angular momentum
\begin{equation}
L(\bx,\bv) = m \bv \wedge \bx,
\end{equation}
and the Laplace-Runge-Lenz vector
\begin{equation}
A(\bx,\bv) = m \bv \wedge L(\bx, \bv) + \frac{G m^2 M^2}{m+M} \frac{\bx}{\|\bx\|}.
\end{equation}
Along the solutions of \eqref{eq:keplerex}, let us define $E(t):=E(\bx(t),\dot\bx(t))$ and, similarly, $L(t)$ and $A(t)$. Then, there exist solutions such that $L(t) = L(0) \neq 0$ for all times, and also $E(t) = E(0)$ and $A(t) = A(0)$. Furthermore, a solution that lives on the ``submanifold'' defined by
\begin{equation}
\begin{aligned}
\big\{
& (\bx, \bv)\in (\R^3\setminus\big\{\bm{0}\big\})\times\R^3 \;\mid \\
& \;
E(\bx,\bv) = E(\bx_0, \bv_0),\;
L(\bx,\bv) = L(\bx_0, \bv_0),\;
A(\bx,\bv) = A(\bx_0, \bv_0)
\big\},
\end{aligned}
\end{equation}
must be a conic of the following type
\begin{equation}
\begin{split}
\mbox{ellipse} \quad \mbox{if} \quad E(t) = E(0) < 0, \\
\mbox{parabola} \quad \mbox{if} \quad E(t) = E(0) = 0, \\
\mbox{hyperbola} \quad \mbox{if} \quad E(t) = E(0) > 0.
\end{split}
\end{equation}
This is an example of a central force field, and is one of the most prominent and most important examples in this course.
The impatient reader can find in \cite[Ch. 1]{book:knauf} a nice and compact derivation of Kepler's laws and the invariants above from \eqref{eq:keplerex} and its solutions.
\end{example}
\section{Hamilton's variational principle}\label{sec:varpri}
In order to leave more space to discuss Hamiltonian systems and their geometry, we will be brief\footnote{Although not as brief as a \href{https://twitter.com/j\_bertolotti/status/1397159397596581889}{twitter thread}.} in our account of Lagrangian mechanics and calculus of variations. For a more detailed account refer to \cite[Part II]{book:arnold}.
This, however, should not confuse you: Lagrangian mechanics plays a role as large as Hamiltonian mechanics in the development of classical mechanics.
In fact, one should not be surprised if there are many sources claiming that the most general formulation of the equations of motion in classical mechanics comes from the \emph{principle of least action} or \emph{Hamilton's variational principle}.
According to this principle, stated in 1834, the equations of motion of a mechanical system are characterized by a function $L \equiv L(q, \dot q, t) : \R^n \times \R^n \times \R \to \R$, called the \emph{lagrangian (function)} of the system.
\begin{example}
The lagrangian of a non-relativistic particle with mass $m > 0$ in a potential $U : \R^n \to \R$ is
\begin{equation}
L(q, \dot q, t) = \frac12 m \|\dot q\|^2 - U(q),
\end{equation}
which is the difference between the so-called kinetic energy of the particle and its so-called potential energy.
We will see where this equation comes from in Section~\ref{sec:dynamicspps}.
\end{example}
Given a curve $\gamma:[t_1, t_2] \to \R^n$, we define the \emph{action} functional
\begin{equation}\label{eq:Laction}
S[\gamma] := \int_{t_1}^{t_2} L(\gamma(s), \dot \gamma(s), s) \d s.
\end{equation}
\begin{tcolorbox}
Assume that the configuration of our system is $q_1 = (q_1^1, \ldots, q_1^n)$ at an initial time $t=t_1$ and $q_2 = (q_2^1, \ldots, q_2^n)$ at a final time $t = t_2$. The \emph{principle of least action}, or \emph{Hamilton's principle}, states that the evolution of our system in the time interval $[t_1, t_2]$ corresponds to the curve $q(t)$ which is the critical point of the action functional $S[q]$ on the space of curves $q(t)$ with $q(t_1) = q_1$ and $q(t_2) = q_2$.
\end{tcolorbox}
To make this precise, we will need to recall some preliminary concepts and make sense of differentiation in $\infty$-dimensional spaces.
Let $X$ and $Y$ be Banach spaces\footnote{Banach space: complete normed vector space.} and $G\subset X$ an open subset of $X$.
A function $f: G \to Y$ is called \emph{Fr\'echet differentiable} at $x\in G$, if there exists a bounded linear operator $A: X \to Y$, such that\footnote{Here, $g = o(\|h\|_X)$ if
\begin{equation}
\lim_{\|h\| \to 0} \frac{\|g(h)\|_Y}{\|h\|_X} = 0.
\end{equation}
}
\begin{equation}\label{eq:frechetdiff}
f(x+h) = f(x) + Ah + o(\|h\|_X)
\end{equation}
for any $h$ in a sufficiently small neighborhood of $0\in X$. Alternatively, you can say asymptotically as $\|h\|_X\to 0$.
As in the finite-dimensional case, $A$ is uniquely determined and is called the \emph{Fr\'echet derivative} of $f$ at $x$ and is denoted $D f(x)$.
\begin{remark}
\begin{enumerate}
\item In the finite dimensional setting, Fr\'echet differentiability corresponds to total differentiability. As with the finite dimensional case, Fr\'echet's differentiability implies the continuity of the mapping.
\item The analogy with the finite dimensional case goes further. Indeed, the chain rule, mean value theorem, implicit functions theorem, inverse mapping theorem and statements about local extremes with and without constraints, all hold also for differentiable functions on Banach spaces.
\item Requiring the operator $A$ to be bounded is crucial. In $\infty$-dimensional normed spaces, linearity does not imply continuity.
\item In calculus of variation, the curve $h$ from the small neighborhood of $0\in X$, is usually called a variation and denoted $\delta x$.
\end{enumerate}
\end{remark}
Let $f: X \to \R$ be a (Fr\'echet) differentiable function and $X_0 \subset X$ be a subspace of $X$. Then $\gamma_\star$ is a \emph{critical point} of $f$ with respect to $X_0$ if
\begin{equation}
Df(\gamma_\star)\Big|_{X_0} = 0, \quad\mbox{i.e.}\quad
Df(\gamma_\star)h = 0 \mbox{ for all } h\in X_0.
\end{equation}
It is possible to show that the space of curves
\begin{equation}
X := \big\{ \gamma: [t_1, t_2] \to M \mid \gamma \mbox{ is twice continuously differentiable}\big\},
\end{equation} equipped with the norm
\begin{equation}
\|\gamma\|_X :=
\|\gamma\|_\infty + \|\dot \gamma\|_\infty + \|\ddot \gamma\|_\infty,
\end{equation}
is a Banach space, and $X_0 = \big\{h\in X \mid h(t_1) = h(t_2) = 0\big\}$ with the induced norm, is a Banach subspace of $X$.
Therefore, the action defined above is a functional
\begin{equation}
S : X \to \R,\qquad \gamma \mapsto S[\gamma],
\end{equation}
and the evolution of the system is described by the critical points with respect to $X_0$ of $S$ on the space of $\gamma \in X$ with prescribed endpoints.
\begin{theorem}
Let $L = L(q, \dot q, t) : \R^{n}\times \R^{n}\times \R \to \R$ be differentiable.
The equations of motion for the mechanical system with lagrangian $L$ are given by the \emph{Euler-Lagrange equations}
\begin{equation}\label{eq:eulerlagrange}
\frac{\d}{\d t}\frac{\partial L}{\partial \dot q^i} - \frac{\partial L}{\partial q^i} = 0, \quad i=1,\ldots n.
\end{equation}
\end{theorem}
\begin{proof}
We need to show that any critical point of $S$ with respect to $X_0$ has to satisfy \eqref{eq:eulerlagrange}.
First of all observe that for small $h$, we get
\begin{equation}
\begin{split}
S(\gamma + h) &= \int_{t_1}^{t_2} L(\gamma + h, \dot \gamma + \dot h, s) \d s \\
&= \int_{t_1}^{t_2} % not clear how this step happens, specifically where the inner product comes from, maybe a comment on the procedure beforehand
L(\gamma, \dot \gamma, s) \d s \\
&\quad + \int_{t_1}^{t_2} \left[
\left\lag
\frac{\partial L}{\partial q}(\gamma, \dot \gamma, s),\;
h(s)
\right\rag
+ \left\lag
\frac{\partial L}{\partial \dot q}(\gamma, \dot \gamma, s),\;
\dot h(s)
\right\rag
\right] \d s \\
&\quad + O(\|h\|^2_X),
\end{split}
\end{equation}
where the inner product $\lag\cdot,\cdot\rag$ is the usual scalar product in $\R^n$.
Therefore,
\begin{equation}
\begin{split}
S(\gamma+h) - S(\gamma) &= \int_{t_1}^{t_2} \left[
\left\lag\frac{\partial L}{\partial q}(\gamma, \dot \gamma, s),\; h(s)\right\rag
+ \left\lag\frac{\partial L}{\partial \dot q}(\gamma, \dot \gamma, s),\; \dot h(s)\right\rag
\right] \d s\\
&\quad + O(\|h\|^2_X)\\
&= \left\lag\frac{\partial L}{\partial \dot q}(\gamma, \dot \gamma, s),\; h(s)\right\rag \Big|_{t_1}^{t_2} \\
&\quad + \int_{t_1}^{t_2} \left\lag
\frac{\partial L}{\partial q}(\gamma, \dot \gamma, s)
- \frac{\d}{\d s}\frac{\partial L}{\partial \dot q}(\gamma, \dot \gamma, s)
,\; h(s)\right\rag \d s\\
&\quad + O(\|h\|^2_X).
\end{split}
\end{equation}
The differential $DS(\gamma): X \to \R$ can now be read from the equation above and is well--defined and is a bounded linear operator for all $\gamma\in X$.
For $h\in X_0$, the first term $\left\lag\frac{\partial L}{\partial \dot q}(\gamma, \dot \gamma, s),\; h(s)\right\rag\Big|_{t_1}^{t_2}$ has to vanish. Therefore, for $\gamma$ to be a critical point for $S$ it follows that the inner product
\begin{equation}
\left\lag
\frac{\partial L}{\partial q}(\gamma, \dot \gamma, s)
- \frac{\d}{\d s}\frac{\partial L}{\partial \dot q}(\gamma, \dot \gamma, s)
,\; h(s)\right\rag = 0 \quad\mbox{for all } h\in X_0.
\end{equation}
Our choice of $h$ is arbitrary, so after a relabeling of the time, this implies\footnote{%
Why is that the case? Assume that \eqref{eq:EL-from-proof} is non vanishing, then you can choose %
$h$ with vanishing endpoints but non vanishing on the support of \eqref{eq:EL-from-proof}. %
With such an $h$ the integral above is strictly positive, contradicting the hypothesis.}
\begin{equation}\label{eq:EL-from-proof}
\frac{\partial L}{\partial q}(\gamma, \dot \gamma, t)
- \frac{\d}{\d t}\frac{\partial L}{\partial \dot q}(\gamma, \dot \gamma, t) = 0,
\end{equation}
which, expanded, means
\begin{equation}
\frac{\d}{\d t}\frac{\partial L}{\partial \dot q^i}(\gamma, \dot \gamma, t) - \frac{\partial L}{\partial q^i}(\gamma, \dot \gamma, t) = 0, \quad i=1,\ldots n.
\end{equation}
\end{proof}
\begin{remark}
The solution $q=q(t)$ of the Euler-Lagrange equations is just a critical point of the $S$ functional:
\begin{equation}
S[q + \delta q] - S[q] = O(\|\delta q\|^2).
\end{equation}
It does \textbf{not} have to be a minimum. However, under some additional conditions it can be proven to be a \emph{local} minimum.
For example, if the matrix of second derivatives
\begin{equation}\label{eq:hsd}
\Lambda := \left(
\frac{\partial^2 L}{\partial\dot q^i \partial\dot q^j}
\right)_{1\leq i,j\leq n}
\end{equation}
is positive definite.
This case is thoroughly studied in calculus of variation and in some instances of differential geometry.
\end{remark}
\begin{corollary}
If the lagrangian of the system is \emph{non--degenerate}, i.e., it satisfies the condition
\begin{equation}
\det \left(\frac{\partial^2 L}{\partial\dot q^i \partial\dot q^j}
\right)_{1\leq i,j\leq n} \neq 0
\end{equation}
then it satisfies Newton's determinacy principle.
\end{corollary}
\begin{proof}
For a non--degenerate lagrangian, a direct computation shows that the Euler-Lagrange equations can be rewritten in the form
\begin{equation}
\ddot q^i = f^i(q,\dot q, t)
:= \Lambda^{ij}\left(\frac{\partial L}{\partial q^j} - \frac{\partial^2 L}{\partial \dot q^j \partial q^k} \dot q^k - \frac{\partial^2 L}{\partial\dot q^j \partial t}\right),
\quad i=1,\ldots,n.
\end{equation}
Here $\left(\Lambda^{ij}\right) = \left(\Lambda^{ij}(q, \dot q, t)\right)$ are the coefficients of the inverse to the matrix \eqref{eq:hsd}, i.e.,
\begin{equation}
\Lambda^{ik} \frac{\partial^2 L}{\partial \dot q^k \partial \dot q^j} = \delta_{ij},
\end{equation}
and it is crucial to remember that we are always using Einstein's convention\footnote{That is, we are summing over repeated indices, for example, $y^{ji} x_i \equiv \sum_i y^{ji} x_i$.}.
\end{proof}
In other words, we can use Euler-Lagrange equations as the equations of motion of a mechanical system with non--degenerate lagrangian.
\begin{remark}\label{rmk:manylagrangians}
\emph{The lagrangian of a mechanical system is defined only up to total derivatives}.
Or, in other words, the equations of motion remain unchanged if we add a total derivative to the lagrangian function:
\begin{equation}
\widetilde L(q,\dot q, t) = L(q, \dot q, t) + \frac{\d}{\d t} f(q,t).
\end{equation}
The action $\widetilde S$ of a system with lagrangian $\widetilde L$ is
\begin{align}
\widetilde S[q] & = \int_{t_1}^{t_2} \widetilde L(q, \dot q, t) \,\d t \\
& = \int_{t_1}^{t_2} L(q, \dot q, t) \,\d t + \int_{t_1}^{t_2} \frac{\d}{\d t} f(q,t) \,\d t \\
& = S[q] + f(q_2, t_2) - f(q_1, t_1).
\end{align}
As the additional $f$-dependent part is constant,
\begin{equation}
\widetilde S[q+\delta q] - \widetilde S[q]
= S[q+\delta q] - S[q]
\end{equation}
and thus the critical points of the two actions are the same.
Similarly, \emph{the lagrangian of a mechanical system does not change if it is multiplied by a constant factor: $\widetilde L = \alpha L$}.
As an aside, quantum mechanical systems no longer remain invariant under the transformations above. Transformations of the first type lead to rather subtle and interesting effects related to topology, while the number $\alpha$ is related to Planck's constant.
\end{remark}
Coming back to our discussion: with so much freedom, how does one choose a normalization for the lagrangian then?
One way, is by using the \emph{principle of additivity}.
\begin{tcolorbox}
Assume that a mechanical system is the combination of two subsystems, say $A$ and $B$.
Let $L_A$ and $L_B$ be their respective lagrangian as if they were isolated (or \emph{closed}) systems.
The principle of additivity says that by moving the two subsystems farther apart from each other, in the limit of infinite distance, the lagrangian of the full system tends to the limit lagrangian
\begin{equation}
L_{\lim} = L_A + L_B.
\end{equation}
\end{tcolorbox}
\subsection{Dynamics of point particles: from Lagrange back to Newton}\label{sec:dynamicspps}
Mechanical laws for the same system can look very different from each other, with varying degrees of simplification or complication: think for example as the motion of planets in a geocentric system of coordinates.
There is a system of coordinates that simplifies our life the most: the \emph{inertial} coordinate system.
\begin{tcolorbox}
The \emph{galilean principle of relativity} says that there exist coordinate systems, called inertial, with the following two properties
\begin{enumerate}
\item all the laws of nature at all moments of time are the same in all inertial coordinate systems;
\item all coordinate systems in uniform rectilinear motion with respect to an inertial one are themselves inertial.
\end{enumerate}
\end{tcolorbox}
Although the discussion on the group theoretical aspects of classical mechanics, which very much relates to this discussion, is very interesting and fascinating we will not discuss it here further, we leave \cite{book:marsdenratiu} as an interesting reference.
For our concerns, an inertial system of coordinates on the galilean space-time is an isomorphism with the ``standard'' galilean structure $\R\times\R^3$.
If $(t, \bx) \in \R\times \R^3$ is an element of the ``standard'' galilean space-time, we call \emph{galilean transformations} the transformations $(t,\bx) \to (\widetilde t, \widetilde{\bx})$ listed below
\begin{enumerate}
\item translations: $\widetilde t = t + t_0$, $\widetilde{\bx} = \bx + \bx_0$, for $t_0\in\R$, $\bx_0\in\R^3$;
\item rotations and reflections: $\widetilde t = t$, $\widetilde{\bx} = G\bx$ for $G\in O(3)$;
\item uniform motions with velocity $\bm{v}\in\R^3$: $\widetilde t = t$, $\widetilde{\bx} = \bx + \bm{v} t$.
\end{enumerate}
Then, the galilean principle of relativity says that the lagrangian of a closed mechanical system is invariant, modulo the sum of total derivatives, with respect to the galilean transformations.
\begin{figure}[ht]
\centering
\includegraphics[width=.85\linewidth]{coni-mathyear-21-21.jpg}
\caption{A graphical introduction to Newton's laws of motion,
courtesy of \href{https://web.archive.org/web/20210602092955/https://twitter.com/Coni777/status/1399953219997032448}{Constanza Rojas-Molina}.
If you feel creative, consider contributing to the
\href{http://crojasmolina.com/illustration/the-mathyear-challenge/list-of-prompts-for-mathyear/}{\#mathyear} challenge.}
\end{figure}
We will now see how we can derive Newton's laws from Hamilton's principle as a consequence of the galilean principle of relativity. For an alternative discussion on this topic see \cite[Chapters 1.1 and 1.2]{book:arnold}.
\begin{theorem}
The lagrangian of an isolated point particle in an inertial system of coordinates has the form
\begin{equation}\label{eq:singleptlag}
L(\dot{\bm{x}}) = \frac{m\,\|\dot{\bm{x}}\|^2}2
\end{equation}
where $m\in\R$ is a constant called the \emph{mass} of the point particle.
\end{theorem}
\begin{proof}
The invariance from translations implies that the lagrangian must be independent from $t$ and $\bx$, while the invariance from orthogonal transformations implies that it must be dependent on the square of the velocities:
\begin{equation}
L = L(\|\dot\bx\|^2), \quad \|\dot\bx\|^2 := \lag\dot \bx, \dot \bx\rag.
\end{equation}
The invariance with respect to uniform motion now implies that the lagrangian must actually be proportional to $\|\dot\bx\|^2$.
For convenience, let's first look at the case of small velocities: applying the galilean transformation
\begin{equation}
\bx \mapsto \bx + \epsilon \bm{v}t,
\end{equation}
in the limit $\epsilon \to 0$, we can apply a Taylor expansion around $\|\dot\bx\|^2$ to get
\begin{equation}
L(\|\dot\bx\|^2) \mapsto L(\|\dot\bx\|^2) + 2\epsilon\,\lag\bm{v}, \dot\bx\rag\,L'(\|\dot\bx\|^2) + O(\epsilon^2).
\end{equation}
The invariance of the equations of motion then implies that the linear term in $\epsilon$ should be a total derivative $\frac{\d }{\d t} f(t, \bx) = 2\,\lag\bm{v}, \dot\bx\rag\,L'(\|\dot\bx\|^2)$.
This can happen iff $\dot f(t, \bx) = 0$ and $\lag \frac{\partial f}{\partial \bx}, \dot x\rag = 2\,\lag\bm{v}, \dot\bx\rag L'(\|\dot\bx\|^2)$ is linear also in $\|\dot\bx\|^2$.
In particular this means that $L'(\|\dot\bx\|^2) = \mathrm{const} =: \frac{m}2$, that is, the lagrangian is of the form \eqref{eq:singleptlag} for some constant value $m\in\R$.
Finally, the lagrangian \eqref{eq:singleptlag} is transformed by a general galilean transformation $\bx \mapsto \bx + \bm{v}t$ into
\begin{equation}
\frac{m \|\dot\bx\|^2}2 \mapsto
\frac{m \|\dot\bx\|^2}2 + m\,\lag\bm{v},\dot\bx\rag + \frac{m \bm{v}^2}2
= \frac{m \|\dot\bx\|^2}2 + \frac{\d }{\d t}\left(m\,\lag\bm{v},\bx\rag + \frac{m \bm{v}^2 t}2\right),
\end{equation}
and thus the equations of motion remain invariant under the transformation.
\end{proof}
\begin{corollary}[Newton's first law]
In an inertial frame of reference, an isolated point particle either does not move or is in uniform motion with constant velocity.
\end{corollary}
\begin{proof}
It follows immediately by computing the Euler-Lagrange equations for \eqref{eq:singleptlag}:
\begin{equation}
\frac{\d}{\d t} \frac{\partial L}{\partial \dot x^i} - \frac{\partial L}{\partial x^i} = m \ddot x^i = 0, \qquad i=1,2,3.
\end{equation}
\end{proof}
Remembering the additive property of the lagrangians, we can show that for a system of $N$ particles, which do not interact, the lagrangian is the sum
\begin{equation}\label{eq:freel}
L = \sum_{k=1}^N \frac{m_k \|\dot{\bx}_k\|^2}{2}.
\end{equation}
We call lagrangians of this form \emph{free}.
\begin{remark}
The above definition of mass becomes only meaningful, when we take the additive property into account.
A lagrangian can always be multiplied by an arbitrary constant without affecting the equations of motion;
such multiplication then amounts to a change in the unit of mass.
The ratios of the masses remain unchanged by this and it is only these ratios which are physically meaningful.
\end{remark}
To include interaction between the points in this picture, we need to add to the free lagrangian \eqref{eq:freel} a function $-U(\bx_1, \ldots, \bx_N)$ which depends on the nature of the interactions:
\begin{equation}\label{eq:mechlag}
L := T-U := \sum_{k=1}^N \frac{m_k \|\dot{\bx}_k\|^2}{2} -U(\bx_1, \ldots, \bx_N).
\end{equation}
The first sum, $T = \sum_{k=1}^N \frac{m_k \|\dot{\bx}_k\|^2}{2}$, is called \emph{kinetic energy} of the particles, while the function $U = U(\bx_1, \ldots, \bx_N)$ is called \emph{potential energy}. Lagrangians of the form $T-U$ are often called \emph{natural}.
\begin{theorem}
The equations of motion of a system of $N$ point particles with natural lagrangian \eqref{eq:mechlag} are of the form
\begin{equation}\label{eq:newton2}
m_k \ddot\bx_k = \bm{F}_k, \quad k=1,\ldots,N
\end{equation}
where $\bm{F}_k = -\frac{\partial U}{\partial \bm{x}_k}$, $\quad k=1,\ldots,N$.
\end{theorem}
The vector $\bm{F}_k$ is called the \emph{force} acting on the $k$-th point particle, and you should immediately recognize \emph{Newton's second law} in \eqref{eq:newton2}.
\begin{exercise}\label{ex:N3l1}
Prove \emph{Newton's third law}, i.e., for each of the $k$ point particles it holds
\begin{equation}
\bm{F}_k = -\sum_{j\neq k} \bm{F}_j.
\end{equation}
\textit{Hint: use the invariance with respect to spatial translations or sneak peek forward to the conservation of total momentum.}
\end{exercise}
\begin{remark}
\begin{enumerate}
\item Mechanical systems are \emph{reversible}: they are also invariant with respect to the transformation $t\mapsto -t$.
\item If you consider systems in interaction with the environment, you end up with lagrangians that are no longer invariant with respect to galilean transformations and can explicitly depend on time.
\end{enumerate}
\end{remark}
\begin{example}
Consider the vertical motion of a point particle of mass $m$ in the external field with potential $U(z) = m g z$, see also Example~\ref{ex:sprPen}. The natural lagrangian of the system is
\begin{equation}
L = \frac{m\dot z^2}2 - mgz,
\end{equation}
which corresponds to the equation of motion $\ddot z = -g$: this is the equation of motion of a point particle in free fall towards Earth. In agreement with Galileo's law, the acceleration is constant and does not depend on the mass.
\end{example}
\begin{example}\label{ex:kepler1}
The motion of $N$ point particles with masses $m_1, \ldots, m_N$ in their gravitational field, is described by the lagrangian
\begin{equation}
L = \sum\frac{m_k \|\dot{\bx}_k\|^2}{2} + \sum_{k < l} G \frac{m_k m_l}{\|\bx_k - \bx_l\|},
\end{equation}
where $G$ is the gravitational constant.
To study the \emph{approximate} description of the motion of a planet of mass $m$ around the Sun, which has mass $M \gg m$, one can assume the effects of the planet on the Sun to be negligible and ignore the interaction with the other planets.
In such a case, the motion of the planet is described by the lagrangian of a point particle with a Newtonian gravitational potential
\begin{equation}
L = \frac{m\|\dot\bx\|^2}{2} + \frac{G M m}{\|\bx\|},
\end{equation}
whose equation of motion should remind you of \eqref{eq:keplerex} from Example~\ref{ex:Kepler0}.
\end{example}
To understand better why $T$ in \eqref{eq:mechlag} is called kinetic energy, it is useful to look at its relation with Newton's second law \eqref{eq:newton2}:
\begin{equation}
\frac{\d}{\d t} T
= m \lag\dot \bx(t), \ddot \bx(t)\rag
= \left\lag\dot \bx(t), \bm{F}(\bx(t))\right\rag.
\end{equation}
This confirms the intuitive notion that the kinetic energy should increase if a force pushes the particle in the direction of the current motion and should decrease when it pulls the particle in the opposite direction.
There is more, in fact
\begin{equation}
T(t_1) - T(t_0) = \int_{t_0}^{t_1} \left\lag\dot \bx(t), \bm{F}(\bx(t))\right\rag\; \d t = \int_{\bx_0}^{\bx_1} \left\lag\bm{F}(\bx), \d \bx\right\rag,
\end{equation}
where $\bx_i := \bx(t_i)$.
This is equivalent to say that the change of kinetic energy is equal to the \emph{work} done by the force, i.e., the integral of $\bm{F}$ along the curve $\bx(t)|_{t\in[t_0, t_1]}$. The name comes from the fact that, physically, you can think of $F(\bx) \cdot \d\bx$ as the infinitesimal contribution of the vector field to the acceleration.
\begin{remark}
For $N=1$, Stokes' theorem implies that the integral above is independent from the path between $\bx_0 = \bx(t_0)$ and $\bx_1 = \bx(t_1)$ if and only if $\curl \bm{F} = 0$, which in turn is true if and only if there is a $U:\R^3\to\R$ such that $\bm{F} = -\frac{\partial U}{\partial \bm{x}}$.
%
In fact, this is true in any dimension by using the general version of Stokes' theorem: the work done by the force depends only on the endpoints of the integral if and only if there is $U:\R^n\to\R$, unique up to an additive constant, such that $\bm{F} = -\frac{\partial U}{\partial \bm{x}}$.
%
You can read more about this in \cite[Chapter 2.5]{book:arnold} and \cite[Theorem 6.3 and 8.1]{book:knauf}.
\end{remark}
Forces that can be written in the form $\bm{F} = -\frac{\partial U}{\partial \bm{x}}$, for some function $U$, are called \emph{conservative}.
We will understand better why in a couple of sections.
Not all the forces in nature are conservative, and in that case the results of this section do not directly apply.
We don't have to go very far to see an example of this, but we can also see that the lagrangian approach can be easily extended to include non-conservative forces.
\begin{example}\label{exa:magnetic}
Mechanical systems affected by an external magnetic field $\bm B$ can be described in the lagrangian formalism by adding a linear term in the velocities to a natural lagrangian \eqref{eq:mechlag}:
\begin{equation}\label{eq:magLag}
\widetilde L = L + \frac ec \sum_{k=1}^N \lag\bm A(\bx_k), \dot \bx_k\rag.
\end{equation}
Here the constant $e$ is the electric charge of the point particles and $c$ is the speed of light in vacuum.
The magnetic field is given by $\bm B = \curl \bm A$, the vector field $\bm A$ is called magnetic vector potential.
We will not see this in the course, but magnetic phenomenons have a natural description only in the relativistic approach. We see a hint of this fact here, in that \eqref{eq:magLag} is not invariant with respect to the galilean transformations.
\begin{exercise}\label{exe:magnetic}
Show that the equations of motion \eqref{eq:newton2} corresponding to a magnetic lagrangian \eqref{eq:magLag} are given by
\begin{equation}
m_k \ddot\bx_k = \bm{F}_k + \frac ec \dot\bx_k \wedge \bm B(\bx_k)
\end{equation}
where the exterior product corresponds to the usual vector product in $\R^3$ and, as mentioned above, $\bm B = \curl \bm A$ is the magnetic field.
The additional term $\frac ec \dot\bx_k\wedge \bm B(\bx_k)$ is the \emph{Lorenz force} acting on the $k$th particle of charge $e$ immersed in the magnetic field $\bm B$.
For a beautiful geometric discussion of this problem, you can refer to \cite[Chapter 8.3]{book:amr} (this has moved to Chapter 9.3 in more recent editions).
\end{exercise}
Note that the magnetic vector potential is not unique!
For any function $f$, the transformation
\begin{equation}
\bm A \mapsto \bm A + \frac{\partial f}{\partial \bx}
\end{equation}
will produce the same field.
This is known as \emph{gauge transformation}.
Under this transformation the lagrangian is transformed as
\begin{equation}
\widetilde L \mapsto \widetilde L + \frac{e}{c} \frac{\d f}{\d t}
\end{equation}
but we know that the equations of motion remain invariant under the addition of a total derivative to the Lagrangian.
The concept of gauge invariance is central in lots of modern physics.
\end{example}
\section{First steps with conserved quantities}
\subsection{Back to one degree of freedom}\label{sec:bdf}
Consider the equation
\begin{equation}\label{eq:oscillator}
\ddot x = F(x), \qquad F:\R\to\R, \quad t\in \R.
\end{equation}
It should come as no surprise, that introducing the auxiliary variable $y(t) = \dot x(t)$, \eqref{eq:oscillator} is equivalent to the system of first order equations
\begin{equation}\label{eq:oscillatorfirstorder}
\left\lbrace
\begin{aligned}
\dot x & = y \\
\dot y & = F(x)
\end{aligned}
\right..
\end{equation}
The solutions of \eqref{eq:oscillatorfirstorder} are parametric curves\footnote{Usually called \emph{integral curves} of the ordinary differential equation.} $(x(t),y(t)):\R\to\R^2$ in the $(x,y)$-space.
%
If $y\neq0$, we can apply the chain rule, $\frac{\d y}{\d t} = \frac{\d y}{\d x} \frac{\d x}{\d t}$, to get
\begin{equation}\label{eq:lef}
\frac{F(x)}y = \frac{\dot y}{\dot x} = \frac{\d y}{\d x}.
\end{equation}
Reasoning formally\footnote{For a rigorous understanding of this, you can refer to \cite[Equation (5.1) with $f=y$ and Remark 5.1.3]{lectures:aom:seri}.} for a moment, we can rephrase this as
\begin{equation}
y\,\d y - F(x)\, \d x = 0.
\end{equation}
Getting rid of time and considering equation \eqref{eq:lef} comes with a price, the solution is now an implicit curve $y(x)$, but also with a huge advantage: this new equation can be solved exactly!
How is that so? We can separate $x$ and $y$ and integrate to get
\begin{equation}
\frac12 y^2 + C_y = \int F(x) dx
\end{equation}
If $U(x)$ is such that $F(x) = -\frac{\d U}{\d x}$, we can further simplify the equation into
\begin{equation}
\frac12 y^2 = -U(x) + C,
\end{equation}
where $C = C_x - C_y \in\R$ is just a number due to the constants of integration.
We can locally invert the equation above to get
\begin{equation}
y(x) = \pm \sqrt{2(C-U(x))}.
\end{equation}
The equation above may already be familiar: $\frac12 y^2 + U(x)$ is the sum of the kinetic energy $\frac12 y^2 = \frac12 {\dot x}^2$ of the particle and its potential energy $U$. In fact, the statement above is a theorem and we can prove it without the need of the formal step with the differentials.
\begin{theorem}\label{thm:ham1}
Let $H(x, y) := \frac12 y^2 + U(x)$ where $U:\R\to\R$ is such that $F(x) = -\frac{\d U}{\d x}$.
Then, the connected components of the level curves $H(x,y) = C$ are the integral curves of \eqref{eq:oscillatorfirstorder}.
\end{theorem}
The function $H$ is called the \emph{total energy} of the mechanical system and we are already mimicking the notation that we will use when we will describe hamiltonian systems.
\begin{proof}
The proof is surprisingly simple:
\begin{align*}
\dot H & = \frac{\partial H}{\partial x}\frac{\d x}{\d t} + \frac{\partial H}{\partial y}\frac{\d y}{\d t} \\
& = \frac{\d U}{\d x} y + y F(x)
= -y F(x) + y F(x) = 0.
\end{align*}
\end{proof}
The fact that $H(x,y)$ remains constant on the trajectories is crucial: when this happens we say that the total energy of the system is a \emph{conserved quantity}.
A curve $(x(t), y(t))$ spanned by a solution of \eqref{eq:oscillatorfirstorder} is called a \emph{phase curve}.
\begin{example}
Note that Theorem~\ref{thm:ham1} applies to Example~\ref{ex:sprPen}.
\begin{itemize}
\item In the case of the spring, also called the \emph{harmonic oscillator}, $U(x) = \frac12 \omega^2 x^2$ and the integral curves are of the form $y^2 + \omega^2 x^2 = C$.
Recalling \eqref{eq:springsol}, $C = \omega^2 R^2 \geq 0$ and the curves are ellipses parametrized by $C$.
This will be a very important example throughout the course.
\item In the case of the pendulum, $U(x) = -\omega^2 \cos(x)$ and the integral curves are solutions of $\frac12 y^2 - \omega^2 \cos(x) = C$, $C \geq -\omega^2$.
Even though we cannot easily give a time parametrization of the motion itself, this formalism allows us to immediately describe the evolution of the system.
We will come back to this fact in more generality in the next section.
\end{itemize}
\end{example}
\begin{figure}[htbp]
\centering
\includegraphics[width=.7\linewidth]{images/potential-curves-pendulum.pdf}
\caption{Integral curves for the pendulum}
\label{fig:pendulum}
\end{figure}
From these examples we already see that phase curves can consist of only one point. In such cases, the points are called \emph{equilibrium} points.
\subsection{The conservation of energy}\label{sec:energy}
Let's see how general is the phenomenon described in the previous section.
\begin{tcolorbox}
Given a mechanical system, the function $I = I(q, \dot q, t)$ of the coordinates, their time derivatives and (possibly) time, is called the \emph{(first) integral}, or \emph{constant of motion} or \emph{conserved quantity}, if the total derivative of the function $I$ is zero:
\begin{equation}\label{eq:firstintegralD}
\frac{\d}{\d t}I =
\frac{\partial I}{\partial q^i} \dot q^i +
\frac{\partial I}{\partial \dot q^i} \ddot q^i +
\frac{\partial I}{\partial t}
= 0.
\end{equation}
\end{tcolorbox}
In other words, if the function $I$ remains constant along the paths followed by the system:
\begin{equation}
I(q(t),\dot q(t), t) = \mathrm{const}.
\end{equation}
\begin{theorem}\label{thm:conservationEnergy}
If the lagrangian of the mechanical system does not explicitly depend on time, $L = L(q, \dot q)$, then the \emph{energy} of the system
\begin{equation}\label{eq:energy1}
E(q,\dot q) = p_i \dot q^i - L,\qquad p_i := \frac{\partial L}{\partial \dot q^i}
\end{equation}
is conserved.
\end{theorem}
\begin{proof}
Using the Euler-Lagrange equation, we have
\begin{equation}
\frac{\d}{\d t} L
= \frac{\partial L}{\partial q^i} \dot q^i + \frac{\partial L}{\partial \dot q^i} \ddot q^i
\overset{\text{(EL)}}{=} \dot q^i \frac{\d}{\d t} \frac{\partial L}{\partial \dot q^i} + \frac{\partial L}{\partial \dot q^i} \ddot q^i
= \frac{\d}{\d t}\left(\frac{\partial L}{\partial \dot q^i} \dot q^i\right),
\end{equation}
that is,
\begin{equation}
\frac{\d}{\d t}\left(\frac{\partial L}{\partial \dot q^i} \dot q^i - L\right) = 0.
\end{equation}
\end{proof}
\begin{example}\label{ex:natlagham}
Let's consider $N$ point particles in physical space with natural lagrangian $L = T - U$ as in \eqref{eq:mechlag}.
Then,
\begin{equation}
\bp_k = \frac{\partial L}{\partial \dot\bx_k} = m_k \dot \bx_k,
\end{equation}
and therefore
\begin{equation}
\sum_{k=1}^{N} \lag\bp_k, \dot\bx_k\rag = \sum_{k=1}^{N} m_k \|\dot\bx\|^2 = 2 T
\end{equation}
which implies that the energy of the mechanical system is
\begin{equation}\label{eq:energyFromL}
E = 2T - T + U = T + U.
\end{equation}
We call $\bp_k := m_k \dot \bx_k$ the kinetic momentum, replacing it in the equation above we get that
\begin{equation}
E = H(q,p) := \frac{1}{2 m_k}\|\bp_k\|^2 + U
\end{equation}
is the sum of kinetic and potential energies, as in \eqref{eq:energyKepler} and Theorem \ref{thm:ham1}.
\end{example}
\begin{remark}
This is probably a good point to discuss the question: why does nature want to minimize the action? And why the lagrangian is of the form \eqref{eq:mechlag}?
Theorem~\ref{thm:conservationEnergy} tells us that the total energy is conserved, and \eqref{eq:energyFromL} tells us that for closed systems this implies that the energy is transferred back and forth between the kinetic and the potential components.
We saw towards the end of Section~\ref{sec:dynamicspps} that while the kinetic energy measures how much the system is moving around, the potential energy measures the capacity of the system to change: its name can be intended as `potential' in the sense of yet unexpressed possibilities.
Looking at the lagrangian itself, we see that it is minimal when the potential energy is large and maximal when the kinetic energy is large.
So, the lagrangian measures in some sense how `active' a system is: the higher the kinetic energy the more active a system is, and the higher the potential energy the less active the system.
%
The principle of least action tells us that nature is lazy: she likes to find a compromise that minimizes its activity over time, i.e., its total action.
You can read a nice historical account on how scientists came up with the principle of least action in \cite{lectures:baez}.
\end{remark}
% Exercise: H\'enon-Heiles 1964
% Prove that H is a conserved quantity
% Energy hypersurface is 3-sphere: R^3 + {\infty} and also union of two solid tori glued along the common boundary (2-torus)
% Seifert foliation of 3-sphere
% First question: in one deg of freedom everything is conservative, how about more degrees of freedom?
% Lecture: page 22, Chapter 2.5 Arnold on conservation of energy in 2 deg of freedom.
\subsection{Fun with the phase portrait}\label{sec:1deg-again}
As we observed in the previous sections, the conservation of energy has remarkable consequences for systems with one degree of freedom.
In this final section, we will investigate this into more details.
A general natural lagrangians for a system with one degree of freedom in isolation has the form
\begin{equation}
L = \frac12 g(q)\dot q^2 - U(q),
\end{equation}
we will justify this in Section~\ref{sec:lagrangianonmanifold}.
As one would hope, in cartesian coordinates $q = x$ that is just the natural lagrangian $L = \frac{m \dot x^2}{2} - U(x)$.
In this case we can easily observe that Theorem \ref{thm:ham1} and Theorem \ref{thm:conservationEnergy} coincide.
As we have seen in Section~\ref{sec:bdf}, the conservation of energy,
\begin{equation}\label{eq:cenergy1}
\frac{m \dot x^2}{2} + U(x) = E \in\R \mbox{ constant},
\end{equation}
allows us to explicitly describe phase curves, i.e., solutions of the equations of motion in the plane $(x, y := \dot x)$.
On each phase curve the value of the energy is constant, so the phase curve lies entirely in one energy level (the set of points $H(x,y)=E$). It turns out that, even though we got rid of the time, we can manipulate the system to reconstruct some interesting time-related properties.
To begin with, we can use \eqref{eq:cenergy1} to integrate the equations of motion
\begin{equation}
m \ddot x = - \frac{\d U(x)}{\d x}
\end{equation}
by quadrature, i.e., solving the equation as
\begin{equation}