PHY321: Variational calculus and Summary of Course

Morten Hjorth-Jensen [1, 2]
[1] Department of Physics and Astronomy and Facility for Rare Ion Beams (FRIB), Michigan State University, USA
[2] Department of Physics, University of Oslo, Norway

April 24-28, 2023












Aims and Overarching Motivation

Monday April 24

Reading suggestion: Taylor chapter 7 (except 7.8 and 7.9)

Wednesday April 26

Reading suggestion: Taylor chapter 7 (except 7.8 and 7.9)

Friday April 28

The final exam will be available on Wednesday the 26th at 8am. We will discuss it on Wednesday and Friday this week. The deadline is Friday May 5 at midnight (1159pm).











Activities during Finals Week

We will keep our in person and zoom sessions MWF 3pm-5pm open for discussions and more, feel free to swing by or just schedule a separate zoom session if these hours don't fit.











Examples of Lagrangian theory: Small Vibrations and Normal Modes

Two examples are provided for solving for normal modes. These are solutions with multiple generalized coordinates, where the motion is that of simple harmonic motion. However, the motion is only simple for a particular set of coordinates \( q_1 \) and \( q_2 \),

$$ \begin{eqnarray} q_1&=&A\cos(\omega_1 t),\\ \nonumber q_2&=&B\cos(\omega_2 t), \end{eqnarray} $$

while it is not necessarily simple in other coordinates. For example if \( x=q_1+q_2 \), and \( y=q_1-q_2 \), the \( x \) and \( y \) motions will contain mixtures of multiple frequencies. For many problems, or in the limit of small vibrations about a minimum, there is some coordinate system where the motion is simple. These are normal modes. Characterizing the normal modes involves finding the frequencies, \( \omega_i \), and the coordinate system where the motion is simple for each coordinate. This involves finding the direction, or the linear combination of \( x_i \) that form the coordinates \( q_i \) in which the motion is that of a single oscillator in each coordinate.











Coupled Springs

For a first example, we consider a system of springs, where we write the Lagrangian, then find the normal modes. For the second example, a double pendulum is considered. In this case, one must first make a small angle expansion before finding the modes. In principle, problems could have the same number of normal modes a degrees of freedom. For example, a system of 7 particles moving in three dimensions has 21 degrees of freedom. However, some of the degrees of freedom do not have oscillatory behavior. For example, for a rigid body in free space, the angles describing the orientation evolve, but do not oscillate. Also, the center-of-mass coordinates of a system of particles isolated from outside particles moves at constant velocity. One can also describe these as normal modes, but acknowledge that their characteristic frequency is zero, as there are no restoring forces.











Coupled Springs, Part 1

Consider two springs, whose relaxed lengths are \( \ell \), connected to three masses as depicted in the figure here. Describe the two normal modes of the motion. We can write the Lagrangian as

$$ \begin{eqnarray*} \mathcal{L}&=&\frac{m}{2}\dot{x}_1^2+m\dot{x}_2^2+\frac{m}{2}\dot{x}_3^2 -\frac{k}{2}(x_2-x_1-\ell)^2-\frac{k}{2}(x_3-x_2-\ell)^2. \end{eqnarray*} $$

There are three coordinates, thus there are three equations of motion,

$$ \begin{eqnarray*} m\ddot{x}_1&=&-k(x_1-x_2+\ell)\\ 2m\ddot{x}_2&=&-k(x_2-x_1-\ell)-k(x_2-x_3+\ell)\\ &=&-k(2x_2-x_1-x_3)\\ m\ddot{x}_3&=&-k(x_3-x_2+\ell). \end{eqnarray*} $$









Coupled Springs, Part 2

This is a bit complicated because the center-of-mass motion does not easily separate from the three equations. Instead, choose the following coordinates,

$$ \begin{eqnarray*} X&=&\frac{x_1+2x_2+x_3}{4},\\ q_1&=&x_1-x_2+\ell,\\ q_3&=&x_3-x_2-\ell. \end{eqnarray*} $$









Coupled Springs, Part 3

In these coordinates the potential energy only involves two coordinates,

$$ \begin{eqnarray*} U&=&\frac{k}{2}(q_1^2+q_3^2). \end{eqnarray*} $$

To express the kinetic energy express \( x_1, x_2 \) and \( x_3 \) in terms of \( X \), \( q_1 \) and \( q_3 \),

$$ \begin{eqnarray*} x_1&=&(3q_1-q_3-4\ell+4X)/4,\\ x_2&=&(4X-q_1-q_3)/4,\\ x_3&=&(3q_3-q_1+4\ell+4X)/4. \end{eqnarray*} $$









Coupled Springs, Part 4

The kinetic energy and Lagrangian are them

$$ \begin{eqnarray*} T&=&\frac{m}{2}\frac{1}{16}(3\dot{q}_1-\dot{q}_3+4\dot{X})^2 +m\frac{1}{16}(4\dot{X}-\dot{q}_1-\dot{q}_3)^2 +\frac{m}{2}\frac{1}{16}(3\dot{q}_3-\dot{q}_1+4\dot{X})^2\\ &=&\frac{3m}{8}(\dot{q}_1^2+\dot{q}_3^2)-\frac{m}{4}\dot{q}_1\dot{q}_3 +2m\dot{X}^2,\\ \mathcal{L}&=&\frac{3m}{8}(\dot{q}_1^2+\dot{q}_3^2)-\frac{m}{4}\dot{q}_1\dot{q}_3 +2m\dot{X}^2-\frac{k}{2}q_1^2-\frac{k}{2}q_3^2. \end{eqnarray*} $$

The three equations of motion are then,

$$ \begin{eqnarray*} \frac{3}{4}m\ddot{q}_1-\frac{1}{4}m\ddot{q}_3&=&-kq_1,\\ \frac{3}{4}m\ddot{q}_3-\frac{1}{4}m\ddot{q}_1&=&-kq_3,\\ 4M\ddot{X}&=&0. \end{eqnarray*} $$









Coupled Springs, Part 5

The last equation simply states that the center-of-mass velocity is fixed. One could obtain the same result by summing the equations of motion for \( x_1 \), \( 2x_2 \) and \( x_3 \) above. The second two equations are more complicated. To solve them, we assume a form

$$ \begin{eqnarray*} q_1&=&Ae^{i\omega t},\\ q_3&=&Be^{i\omega t}, \end{eqnarray*} $$

Because this is a linear equation, we can multiply the solution by a constant and it will still be a solution. Thus, we can set \( B=1 \), then solve for \( A \), effectively solving for \( A/B \). Putting this guess into the equations of motion,

$$ \begin{eqnarray*} -\frac{3}{4}\frac{A}{B}\omega^2+\frac{1}{4}\omega^2&=&-\omega_0^2\frac{A}{B},\\ -\frac{3}{4}\omega^2+\frac{1}{4}\frac{A}{B}\omega^2&=&-\omega_0^2. \end{eqnarray*} $$









Coupled Springs, Part 6

This is two equations and two unknowns, \( \omega^2 \) and \( A/B \). Substituting for \( A/B \) gives a quadratic equation,

$$ \begin{eqnarray*} \omega^4-3\omega_0^2\omega^2+2\omega_0^4&=&0,\\ \omega_0^2&\equiv&k/m. \end{eqnarray*} $$

The two solutions are

$$ \begin{eqnarray*} (1)~~\omega&=&\omega_0,~~~A=-B,\\ (2)~~\omega&=&\omega_0\sqrt{2},~~~A=B. \end{eqnarray*} $$









Coupled Springs, Part 7

The first solution corresponds to the two outer masses moving in opposite directions, in sync, with the middle mass fixed. The second solution has both outer masses moving in the same direction, but with the center mass moving opposite. These two solutions are referred to as normal modes, and are characterized by their frequency and by the linear combinations of coordinates that oscillate together. In general, the solution is a linear combination of normal modes, which usually results in a chaotic looking motion. However, once the solution is expressed in terms of the normal modes, each of which oscillates independently in a simple manner, one can better understand the motion. Further, the frequencies of these modes represent the natural resonant frequencies of the system. This is important in the construction of many structures, such as bridges or vehicles.











Double Pendulum, Part 1

Consider a double pendulum confined to the \( x-y \) plane, where \( y \) is vertical. A mass \( m \) is connected to the ceiling with a massless string of length \( \ell \). A second mass \( m \) hangs from the first mass with an identical massless string of the same length. Using \( \theta_1 \) and \( \theta_2 \) to describe the orientations of the strings relative to the vertical axis, find the Lagrangian and derive the equations of motion, both for arbitrary angles and in the small-angle approximation. Finally, express the equations of motion in the limit of small oscillations.











Double Pendulum, Part 2

The kinetic and potential energies are:

$$ \begin{eqnarray*} T&=&\frac{1}{2}m\ell^2\dot{\theta}_1^2 +\frac{1}{2}m\left\{(\ell\dot{\theta}_1\cos\theta_1+\ell\dot{\theta}_2\cos\theta_2)^2 +(\ell\dot{\theta}_1\sin\theta_1+\ell\dot{\theta}_2\sin\theta_2)^2\right\}\\ &=&\frac{1}{2}m\ell^2\left\{2\dot{\theta}_1^2+\dot{\theta}_2^2+2\dot{\theta}_1\dot{\theta}_2\cos(\theta_1-\theta_2) \right\},\\ U&=&mg\ell(1-\cos\theta_1)+mg\left[\ell(1-\cos\theta_1)+\ell(1-\cos\theta_2)\right]\\ &=&mg\ell(3-2\cos\theta_1-\cos\theta_2) \end{eqnarray*} $$









Double Pendulum, Part 3

Lagrange's equations for \( \theta_1 \) lead to

$$ \begin{eqnarray*} m\ell^2\frac{d}{dt}\left\{2\dot{\theta}_1+\dot{\theta}_2\cos(\theta_1-\theta_2)\right\}&=& -m\ell^2\dot{\theta}_1\dot{\theta}_2\sin(\theta_1-\theta_2) -2mg\ell\sin\theta_1,\\ 2\ddot{\theta}_1+\ddot{\theta}_2\cos(\theta_1-\theta_2)+\dot{\theta}_2^2\sin(\theta_1-\theta_2) &=&-2\omega_0^2\sin\theta_1,\\ \omega_0^2&\equiv& g/\ell, \end{eqnarray*} $$

and the equations for \( \theta_2 \) are

$$ \begin{eqnarray*} m\ell^2\frac{d}{dt}\left\{\dot{\theta}_2+\dot{\theta}_1\cos(\theta_1-\theta_2)\right\}&=& m\ell^2\dot{\theta}_1\dot{\theta}_2\sin(\theta_1-\theta_2)-mg\ell\sin\theta_2,\\ \ddot{\theta}_2+\ddot{\theta_1}\cos(\theta_1-\theta_2)&=& -\omega_0^2\sin\theta_2. \end{eqnarray*} $$









Double Pendulum, Part 4

For small oscillations, one can only consider terms linear in \( \theta_1 \) and \( \theta_2 \) or their derivatives,

$$ \begin{eqnarray} 2\ddot{\theta}_1+\ddot{\theta}_2&=&-2\omega_0^2\theta_1,\\ \nonumber \ddot{\theta}_1+\ddot{\theta}_2&=&-\omega_0^2\theta_2. \end{eqnarray} $$

To find the solutions, assume they are of the form \( \theta_1=Ae^{i\omega t}, \theta_2=Be^{i\omega t} \). Solve for \( \omega \) and \( A/B \), noting that \( B \) is arbitrary.











Double Pendulum, Part 5

Plug in the desired form and find

$$ \begin{eqnarray*} e^{i\omega t}(-2\omega^2A-\omega^2B)&=&e^{i\omega t}(-2\omega_0^2A),\\ e^{i\omega t}(-\omega^2A-\omega^2B)&=&e^{i\omega t}(-\omega_0^2B). \end{eqnarray*} $$

We can treat \( B \) as arbitrary and set it to unity. When we find \( A \), it is the same as \( A/B \) for arbitrary \( B \). This gives the equations

$$ \begin{eqnarray*} 2\omega^2A+\omega^2&=&2\omega_0^2A,\\ \omega^2A+\omega^2&=&\omega_0^2. \end{eqnarray*} $$









Double Pendulum, Part 6

This is two equations and two unknowns. Solving them leads to a quadratic equation with solutions

$$ \begin{eqnarray*} A/B&=&\pm\frac{1}{\sqrt{2}},\\ \omega^2&=&\frac{\omega_0^2}{1\pm 1/\sqrt{2}}. \end{eqnarray*} $$

Again, these two solutions are the normal modes, and the general solution is a sum of the two solutions, with two arbitrary constants. For the angles \( \theta_1 \) and \( \theta_2 \) are:

$$ \begin{eqnarray*} \theta_1&=&\frac{A_+}{\sqrt{2}}e^{i\omega_+t}, ~\theta_2=A_+e^{i\omega_+t},\\ \theta_1&=&\frac{-A_-}{\sqrt{2}}e^{i\omega_-t}, ~\theta_2=A_-e^{i\omega_-t},\\ \omega_{\pm}&=&\omega_0\sqrt{\frac{1}{1\pm 1/\sqrt{2}}}. \end{eqnarray*} $$









Double Pendulum, Part 7

One can also express the solution in vector notation, with the vectors having arbitrary amplitudes \( A_+ \) and \( A_- \),

$$ \begin{eqnarray*} \theta_+&=&\left(\begin{array}{c} \frac{1}{\sqrt{2}}\\ 1\end{array}\right)A_+e^{i\omega_+t},\\ \theta_-&=&\left(\begin{array}{c} \frac{-1}{\sqrt{2}}\\ 1\end{array}\right)A_-e^{i\omega_-t}. \end{eqnarray*} $$

Here, the upper/lower components of the vector describe \( \theta_1/\theta_2 \) respectively.











Double Pendulum, Part 8

These problems can be treated as linear algebra exercises. Linear algebra is not used in this course, but nonetheless we describe how this works for the curious student. In the limit of small vibrations, the equations of motion can be expressed in the form,

$$ \begin{eqnarray*} M\ddot{q}&=&-Kq, \end{eqnarray*} $$

a form that looks like the spring equation. However, \( q \) is an $n-$dimensional vector and \( M \) and \( k \) are \( n\times n \) matrices. In the double pendulum example, the dimensionality is 2 and the \( q \) refers to the \( \theta_1 \) and \( \theta_2 \), and the matrices for \( M \) and \( K \) can be read off as

$$ M=\begin{bmatrix} 2&1\\ 1&1\end{bmatrix}, $$

and

$$ K=\begin{bmatrix} 2\omega_0^2&0\\ 0&\omega_0^2\end{bmatrix}. $$









Double Pendulum, Part 9

Multiplying both sides of the equation by the inverse matrix \( M^{-1} \),

$$ \begin{eqnarray*} \ddot{q}&=&-\left(M^{-1}K\right)q. \end{eqnarray*} $$

Here,

$$ \begin{eqnarray*} M^{-1}&=&\left(\begin{array}{cc} 1&-1\\ -1&2\end{array}\right),\\ M^{-1}K&=&\left(\begin{array}{cc} 2&-1\\ -2&2\end{array}\right)\omega_0^2. \end{eqnarray*} $$









Double Pendulum, Part 10

One can find a transformation, basically a rotation, that transforms to a frame where \( M^{-1}K \) is diagonal. In this coordinate system the diagonal components of \( M^{-1}K \) represent the squared frequencies of the normal modes,

$$ M^{-1}K\rightarrow -\left(\begin{array}{cc} \omega_+^2&0\\ 0&\omega_-^2\end{array}\right)~, $$

and are known as "eigen" frequencies. The corresponding unit vectors,

$$ \left(\begin{array}{c} 1\\0\end{array}\right)~{\rm and}~\left(\begin{array}{c} 0\\1\end{array}\right)~{\rm in~the~new~coordinate~system}, $$

can be rotated back into the original frame, and become the solutions for the normal modes. These are then called "eigenvectors", which are the same as the normal modes. Finding the eigenfrequencies is performed by realizing that the determinant of a matrix is unchanged by the rotation between coordinate systems. Writing the equations of motion as an eigenvalue problem,

$$ \begin{eqnarray} \left[A-\lambda_i\mathbb{1}\right]u_i&=&0,~~~A\equiv M^{-1}K,~\lambda_i\equiv \omega^2_i. \end{eqnarray} $$









Double Pendulum, Part 11

In the coordinate system where \( M^{-1}K \) is diagonal, and the forms for \( u_i \) are simple this requires that in that system, the diagonal elements of \( M^{-1}K \) are the eigenvalues, \( \omega_i^2 \). For each \( \omega^2_i \), the determinant \( |A-\lambda_i\mathbb{1}| \) must vanish. This is then true in any coordinate system,

$$ \begin{eqnarray} {\rm det}\left[A-\lambda\mathbb{1}\right]&=&0, \end{eqnarray} $$

which for a \( 2\times 2 \) matrix becomes

$$ \begin{eqnarray} \left| \begin{array}{cc} A_{11}-\lambda&A_{12}\\ A_{21}&A_{22}-\lambda \end{array} \right|&=&0,\\ A_{11}A_{22}-\lambda A_{11}-\lambda A_{22}+\lambda^2-A_{21}A_{12}&=&0. \end{eqnarray} $$









Double Pendulum, Part 12

One can solve a quadratic equation for \( \lambda \), which gives two eigenvalues corresponding to \( \omega_+^2 \) and \( \omega_-^2 \) found above. Choosing one of the eigenvalues, one can insert one of the eigenvalues \( \lambda_i \) into the eigenvalue problem and solve for \( u_i \), then choose the other eigenvalue and solve for the other corresponding vector.

If this were a 3-dimensional set of equations, the determinant would include terms like \( \lambda^3 \) and would become a cubic equation with three eigenvalues. One would then solve for three eigenvectors. If one has a system with dimensionality \( n>2 \), one usually resorts to solving the problem numerically due to the messiness of the algebra. The main programming languages all have packages which readily diagonalize matrices and find eigenvectors and eigenvalues.











Conservation Laws

Energy is conserved only when the Lagrangian has no explicit dependence on time, i.e. \( L(q,\dot{q}) \), not \( L(q,\dot{q},t) \). To show this, we first define the Hamiltonian,

$$ \begin{eqnarray} H&=&\sum_i\left(\dot{q}_i\frac{\partial L}{\partial\dot{q}_i}\right)-L. \end{eqnarray} $$

After showing that \( H \) is conserved, i.e. \( (d/dt)H=0 \), we then show that \( H \) can be identified with the total energy, \( H=T+V \).

One can see that \( H \) is conserved by applying first using the chain rule for \( (d/dt)H \), then applying Lagrange's equations,

$$ \begin{eqnarray} \frac{d}{dt}H&=&\sum_i\left\{\ddot{q}_i\frac{\partial L}{\partial\dot{q}_i}+\dot{q}_i\frac{d}{dt}\left(\frac{\partial L}{\partial\dot{q}_i}\right)-\frac{\partial L}{\partial\dot{q}_i}\ddot{q}_i-\frac{\partial L}{\partial q_i}\dot{q}_i\right\}\\ \nonumber &=&\sum_i\left\{\ddot{q}_i\frac{\partial L}{\partial\dot{q}_i}+\dot{q}_i\frac{\partial L}{\partial q_i}-\frac{\partial L}{\partial\dot{q}_i}\ddot{q}_i-\frac{\partial L}{\partial q_i}\dot{q}_i\right\}\\ \nonumber &=&0. \end{eqnarray} $$









Convervation Laws, part 2

These steps assumed that \( L \) had no explicit time dependence, i.e. \( L \) is a function of \( q \) and \( \dot{q} \), but not of \( t \).

Next, we show that \( L \) can be identified with the energy. Because \( V \) does not depend on \( \dot{q} \),

$$ \begin{equation} H=\sum_i\frac{\partial T}{\partial\dot{q}_i}\dot{q}_i-T+V. \label{_auto1} \end{equation} $$

If the kinetic energy has a purely quadratic form in terms of \( \dot{q} \),

$$ \begin{equation} T=\sum_{ij}A_{ij}(q)\dot{q}_i\dot{q}_j, \label{_auto2} \end{equation} $$

the expression for the energy becomes

$$ \begin{eqnarray} H&=&\sum_{ij}2A_{ij}(q)\dot{q}_i\dot{q}_j-\sum_{ij}A_{ij}(q)\dot{q}_i\dot{q}_j+V\\ \nonumber &=&T+V. \end{eqnarray} $$









Convervation Laws, part 3

The proof that \( H \) equals the energy hinged on the fact that the kinetic energy was quadratic in \( \dot{q} \). This can be attributed to time-reversal symmetry. Because the Cartesian coordinates \( x_i \) do not depend on \( \dot{q}_i \) or on time, \( \dot{x}_i=(\partial x_i/\partial q_j)\dot{q}_j \). Thus, the kinetic energy, \( T=m\dot{x}_i^2/2 \), should be proportional to two powers of \( \dot{q} \), which validates the assumption above.











Convervation Laws, part 4

Here, energy conservation is predicated on the Lagrangian not having an explicit time dependence. Without an explicit time dependence the equations of motion are unchanged if one translates a fixed amount in time because the physics does not depend on when the clock starts. In contrast, the absolute time becomes relevant if there is an explicit time dependence. In fact, conservation laws can usually be associated with symmetries. In this case the translation symmetry in time leads to energy conservation.

For another example of how symmetry leads to conservation laws, consider a Lagrangian for a particle of mass \( m \) moving in a two-dimensional plane where the generalized coordinates are the radius \( r \) and the angle \( \theta \). The kinetic energy would be

$$ \begin{equation} T=\frac{1}{2}m\left\{\dot{r}^2+r^2\dot{\theta}^2\right\}, \label{_auto3} \end{equation} $$

and if the potential energy \( V(r) \) depends only on the radius \( r \) and not on the angle, Lagrange's equations become

$$ \begin{eqnarray} \frac{d}{dt}(m\dot{r})&=&-\frac{\partial V}{\partial r}+m\dot{\theta}^2r,\\ \nonumber \frac{d}{dt}(mr^2\dot{\theta})&=&0. \end{eqnarray} $$









Convervation Laws, part 4

The second equation implies that \( mr^2\dot{\theta} \) is a constant. Indeed, it is the angular momentum which is conserved for a radial force. Here, the conservation of angular momentum is associated with the independence of the physics to changes in \( \theta \), or in other words, rotational invariance. Once one knows the fact that \( L=mr^2\dot{\theta} \) is conserved, it can be inserted into the equations of motion for \( \dot{r} \),

$$ \begin{equation} m\ddot{r}=-\frac{\partial V}{\partial r}+\frac{L^2}{mr^3}. \label{_auto4} \end{equation} $$

This is related to Emmy Noether's theorem

Simply stated, if the Lagrangian \( L \) is independent of \( q_i \), one can see that the quantity \( \partial L/\partial\dot{q}_i \) is conserved,

$$ \begin{equation} \frac{d}{dt}\frac{\partial L}{\partial\dot{q}_i}=0. \label{_auto5} \end{equation} $$









Convervation Laws, Another Example

Another easy example is in Cartesian coordinates where the potential depends only on \( x \) and \( y \) but not on \( z \). In that case, there is a translational symmetry. From the last equation, this translates into conservation of the momentum in the \( z \) direction.

Consider a pair of particles of mass \( m_1 \) and \( m_2 \) where the potential is of the form

$$ U(\boldsymbol{r}_1,\boldsymbol{r}_2)=V_a(|m_1\boldsymbol{r}_1+m_2\boldsymbol{r}_2|/(m_1+m_2))+V_b(|\boldsymbol{r}_1-\boldsymbol{r}_2|). $$

Using symmetry arguments alone, are there any conserved components of the momentum? or the angular momentum??

There is no translational invariance, hence there are no conserved components of the momentum. However, there is rotational invariance about any axis that goes through the origin. Hence, there is angular momentum conservation in all three directions. Symmetry arguments are great ways to recognize the existence of conserved quantities, but actually expressing them in terms of coordinates can be tricky. For instance, you may need to write the Lagrangian in terms of angles.











Final exam from spring semester 2022

Exercise 1, Two-body Problems and Conservative Forces (total 35pt)

The relevant material can be found in Taylor chapters 4 and 8. Homework sets 5, 6-9 and the chapters on forces and two-body problems from the lecture notes may also be of use.

This exercise and the next are follow-ups of homework 6. There we studied the so-called Lennard-Jones potential which is widely used in molecular dynamics calculations and in the simulations of quantum liquids. This potential is based on parametrizations from experiments. In molecular dynamics calculations the assumption is that atoms move according to the laws of Newton, given the correct model for interactions. We can say then that quantum-mechanical degrees of freedom stemming from complicated interactions between electrons and protons in an atom, are parametrized in terms of an effective potential.

We will limit ourselves to a two-body problem.

The goal of this exercise is to model a gas of argon atoms (here two atoms only interacting), where the atoms interact according to the famous Lennard-Jones potential,

$$ \begin{equation} V(r) = 4\varepsilon\left((\frac{\sigma}{r})^{12} - (\frac{\sigma}{r})^6\right), \label{eq:lj} \end{equation} $$

where \( r \) is the distance between two atoms, \( r=\vert\boldsymbol{r}_i-\boldsymbol{r}_j\vert \), that is the norm of the relative distance vector \( \boldsymbol{r} \). The quantities \( \sigma \) and \( \varepsilon \) are parameters which determine which chemical compound is modelled. This potential is a good approximation for noble gases like helium, neon, argon and other.

We start first with a basic study of the potential

Then we switch our attention to the equations of motion.

$$ \frac{d^2\boldsymbol{r}_i}{dt^2} = \frac{24\varepsilon}{m} \sum_{j \neq i} \left(2(\frac{\sigma}{\vert\boldsymbol{r}_i-\boldsymbol{r}_j}\vert)^{12}-(\frac{\sigma}{\vert\boldsymbol{r}_i-\boldsymbol{r}_j}\vert)^6\right)\frac{\boldsymbol{r}_i-\boldsymbol{r}_j}{\vert\boldsymbol{r}_i-\boldsymbol{r}_j\vert^2}. $$

Exercise 2, Two-body Problems and Conservative Forces, Numerical Studies (50pt)

In this exercise we will solve the previous equations of motion numerically and study the solutions. Here you can use the same codes you developed in homework sets 5-9 and the second midterm.

Numerical accuracy is reduced when computing with values which are many orders of magnitude apart. This is often an issue in physics, and molecular dynamics is no exception. For example, the mass of argon is smaller than 10E-25kg, while typical length scales are on the order of nanometers, 10E-9m.

The remedy is to change units so that most quantities are close to \( 1 \). From \eqref{eq:lj} it is clear that \( \sigma \) and \( \varepsilon \) are the typical scales for length and energy.

$$ \begin{equation} \frac{d^2\boldsymbol{r}_i\,'}{{dt'^2}} = 24 \sum_{j \neq i} \left(2\vert\boldsymbol{r}_i\,'-\boldsymbol{r}_j\,'\vert^{-12}-\vert\boldsymbol{r}_i\,'-\boldsymbol{r}_j\,'\vert^{-6}\right)\frac{\boldsymbol{r}_i\,'-\boldsymbol{r}_j\,'}{\vert\boldsymbol{r}_i\,'-\boldsymbol{r}_j\,'\vert^2}, \label{eq:undim} \end{equation} $$

We switch now to a numerical procedure and study the simulation of two interacting atoms.

Exercise 3, Lagrangian formalism and the Lennard-Jones potential (35pt)

The relevant chapters from Taylor are chapters 6-7 and 8. In addition he lectures notes on the Lagrangian Formalism and Calculus of Variations can be of use. You need also results from the two-body problem of chapter 8 of Taylor and the lecture notes two-body problems.

We will stay with a two-body problem only with particles \( 1 \) and \( 2 \), as in the two previous exercises. We introduce the relative mass \( \mu=m_1m_2/M \) where the total mass \( M=m_1+m_2 \), the sum of the masses \( m_1 \) and \( m_2 \).











What? Me worry? No final traditional exam in this course!















What did I learn in school this year?

Does this figure that match the experiences you have made this semester?















Topics we have covered this year











And how to solve these problems

We have studied many systems numerically, from falling objects with and without friction/air resistance, small oscillations (harmonic oscillator), gravitational problems and other central force problems, rotations and the classical pendulum.











One program to rule them all?

DeltaT = 0.001
#set up arrays 
tfinal = 10 # in years
n = ceil(tfinal/DeltaT)
# set up arrays for t, a, v, and x
t = np.zeros(n)
v = np.zeros((n,3))
r = np.zeros((n,3))
# Initial conditions as compact 3-dimensional arrays
r0 = np.array([1.0,0.0,0.0])
v0 = np.array([0.0,2*pi,0.0])
r[0] = r0
v[0] = v0
# Start integrating using Euler's method
for i in range(n-1):
    # Set up the acceleration for force that depends only on position
    a =  Force(r)/mass
    # update velocity, time and position using the Euler-Cromer forward
    v[i+1] = v[i] + DeltaT*a
    r[i+1] = r[i] + DeltaT*v[i]
    t[i+1] = t[i] + DeltaT

The overarching idea is that as soon as we have analyzed the forces at play, we can reuse our programs (algorithms) with new forces, without having to recur to the few analytical cases we can solve.











Learning outcomes

After the course you should:

  1. be able to analyze forces that act on objects, apply Newton’s laws to determine the equations of motion, and solve these analytically and numerically,
  2. Know about inertial frames and their relation to accelerating and rotating frames (non-inertial frames)
  3. Know about forces, work, energy, angular momentum, linear momentum and conservation laws
  4. Know about various types of motions, falling objects, objects moving in various fields
  5. Know how to analyze energy diagrams and defining effective potential
  6. Have knowledge about small oscillations, Harmonic oscillator potential and equations of motion
  7. Have knowledge about transformation of variables that allow for analytical solutions, example two-body problems
  8. Have knowledge about central forces and two-body problems, center-of-mass and relative coordinates as reference frame
  9. Have knowledge about two-body scattering problems, classical scattering cross section
  10. Have knowledge about Variational calculus and Lagrangian formalism
  11. Know how to derive the equations of motion from the Lagrangian formalism with and without constraints (Lagrangian multipliers)










Competences and Skills

To solve many of these problems, we have through different midterms and weekly exercises studied many systems numerically, from falling objects with and without friction/air resistance, small oscillations (harmonic oscillator), gravitational problems and other central force problems, rotations and the classical pendulum. To solve these systems, we have applied different algorithms for solving differential equations. These are

  1. Euler-Cromer and Velocity-Verlet as energy conserving algorithms (time-independent forces)
  2. Runge-Kutta family of algorithms for time-dependent forces

We have also, in connection with for example the work-energy theorem studied methods for evaluating integrals. These are (although we never wrote codes in exercises/midterms)

  1. Numerical integration using the Trapezoidal, midpoint and Simpson's rule.










Computations? Why?

You should also have acquired skills in structuring a numerical project, as well as having developed a critical understanding of the pros and cons of the methods and an understanding of their limits and what can go wrong. Computing means solving scientific problems using computers. It covers numerical as well as symbolic computing. Computing is also about developing an understanding of the scientific process by enhancing algorithmic thinking when solving problems. Computing competence has always been a central part of the science and engineering education. In particular, some of the competences that are important in the development of your own understanding of computations, we would like to emphasize

  1. derivation, verification, and implementation of algorithms
  2. understanding what can go wrong with algorithms
  3. overview of important, known algorithms for solving mechanics problems (To a extent large differential equations and integration)
  4. understanding how algorithms are used to solve mathematical problems
  5. Making science (your results) reproducible
  6. algorithmic thinking for gaining deeper insights about scientific problems










Procrastination... the curse of all?





Enjoy this video And research shows that procrastinating enhances creativity!!









However ...

Since grades are due on May 9, we need to have a hard deadline for the final exam, May 5 at midnight.











Best wishes to you all and thanks so much for your heroic efforts this semester





© 1999-2023, "Morten Hjorth-Jensen":"http://mhjgit.github.io/info/doc/web/". Released under CC Attribution-NonCommercial 4.0 license