Scientific Computing Using Python - PHYS:4905 - Fall 2018

Lecture Notes #22- 11/14/2018 - Prof. Kaaret

These notes borrow from Linear Algebra by Cherney, Denton, Thomas, and Waldron.

Masses on springs

Consider two masses, each with mass m, attached by springs with spring constants as shown in the figure below.  Let x1 be the displacement of the first mass from its equilibrium position and x2 be the displacement of the second mass from its equilibrium position.
 


What are the forces acting on each mass?

If we move mass 1, both springs that it is attach to will produce a restoring force pushing it back towards it equilibrium position.  Therefore,

F=-kx1-κx1F = -kx_1 - κ x_1
If we move mass 2, the spring that connects the two masses will produce a force moving mass 1 away from its equilibrium position.  Therefore,

F=+κx2F = + κ x_2
The total force on mass 1 is thus

F1=-(k+κ)x1+κx2F_1 = -(k+κ) x_1 + κ x_2
We can do a similar analysis on mass 2 and we find that the total force on mass 2 is

F2=κx1-(k+κ)x2F_2 = κ x_1 - (k + κ) x_2

Equations of motion as linear operators

From Newton's laws, we know that F=maF = ma, or F=md2xdt2=mẍF = m \frac{d^2 x}{dt^2} = m \ddot{x}
Our force equations above have the force proportional to the displacement.  If we briefly consider the motion of mass 1 with the position of mass 2 fixed, then the equation of motion for mass 1 is

mẍ=-(k+κ)xm \ddot{x} = -(k+κ) x
Where I have been lazy and temporarily dropped the subscript 1.

The solution to this is a function of the form

x(t)=ceiωtx(t) = c \, e^{i ω t}
where c is a complex number and we take the only real part of the right hand side of the equation in order to keep things real.  Allowing complex values for c and taking the real part is same as writing the function in the form
x(t)=Acos[ω(t-t0)]x(t) = A \, \cos[ω(t-t_0)]
where A is the amplitude of the oscillation and t0 is the time of maximum displacement.  We can relate these to c as,

c=Ae-iωt0c = A e^{-i ω t_0}
The math is easier in the complex form.  In particular, the derivatives are

dxdt=iωceiωt,d2xdt2=ẍ=-ω2eiωt=-ω2x\frac{dx}{dt} = i ω c e^{i ω t}, \;\;\;\; \frac{d^2x}{dt^2} = \ddot{x} = - ω^2 e^{i ω t} = - ω^2 x
Note that the latter looks like an eigenvector-eigenvalue equation.  If we think of    L=d2dt2L = \frac{d^2}{dt^2}  as a linear operator acting on the space of smooth functions of t, then the eigenvectors of L are functions of the form eiωte^{i ω t}  since L acting on  eiωte^{i ω t}  produces a function of the same form, multiplied by a constant.  In this content, the eigenvectors are called eigenfunctions.  What is the eigenvalue?

Substituting back into  the equation of motion for mass 1 with mass 2 held fixed, we find

mẍ=-mω2x=-(k+κ)xm \ddot{x} = -m ω^2 x = -(k+κ) x
So, we have a solution if ω2=k+κω^2 = k+κ.


What about the second mass?

Going back to our problem with two masses, the equations of motion are

mẍ1=-(k+κ)x1+κx2m \ddot{x}_1 = -(k+κ) x_1 + κ x_2
mẍ2=κx1-(k+κ)x2m \ddot{x}_2 = κ x_1 -(k+κ) x_2
Again, the solutions are of the form x1=c1eiωt,x2=c2eiωtx_1 = c_1 e^{i ω t}, \;\; x_2 = c_2 e^{i ω t}

If we substitute those in, and then cancel the common time dependence, we find

-mω2c1=-(k+κ)c1+κc2- m ω^2 c_1 = -(k+κ) c_1 + κ c_2
-mω2c2=κc1-(k+κ)c2- m ω^2 c_2 = κ c_1 -(k+κ) c_2
Do these look like matrix equations to you?

We can write

c=(c1c2),M=(-(k+κ)/mκ/mκ/m-(k+κ)/m)c = \begin{pmatrix} c_1 \\ c_2 \end{pmatrix} , \;\;\;\; M = \begin{pmatrix} -(k+κ)/m & κ/m \\ κ/m & -(k+κ)/m \end{pmatrix}
Then, our equations of motion become

Mc=-ω2cM c = - ω^2 c
which is an eigenvector-eigenvalue equation.

Let's solve the equation.  (Play soothing music as students solve the eigenvector-eigenvalue equation.)

First, we find the eigenvalues by solving  det(M-λI)=0=det(M+ω2I)\det(M - λ I) = 0 = \det(M+ω^2 I)  where we have set the eigenvalue λ=-ω2λ = - ω^2.
We find

ω1=km,ω2=k+2κmω_1 = \sqrt{\frac{k}{m}} \; , \;\; ω_2 = \sqrt{\frac{k+2κ}{m}}
What are the corresponding eigenvectors?

We substitute back into our matrix equation,

(M+ω2I)c=0(M + ω^2 I) c = 0
For the first eigenvalue, we get

1m(-κκκ-κ)(c1c2)=0c1=c2\frac{1}{m}\begin{pmatrix} -κ & κ \\ κ & -κ \end{pmatrix} \begin{pmatrix} c_1 \\ c_2 \end{pmatrix} = 0 \;\;\;\; ⇒ \;\;\;\; c_1 = c_2
so the eigenvector is
v1=(11)v_1 = \begin{pmatrix} 1 \\ 1 \end{pmatrix}
What does this mean physically?

Since we have x1=c1eiωt,x2=c2eiωtx_1 = c_1 e^{i ω t}, \;\; x_2 = c_2 e^{i ω t},  this means that x1=x2x_1 = x_2
The masses move in the same direction and with the same amplitude.  This is the slower mode of oscillations, since this is the lower frequency ωω.


For the other eigenvalue, we get the matrix equation

1m(κκκκ)(c1c2)=0c1=-c2v2=(1-1)\frac{1}{m}\begin{pmatrix} κ & κ \\ κ & κ \end{pmatrix} \begin{pmatrix} c_1 \\ c_2 \end{pmatrix} = 0 \;\;\;\; ⇒ \;\;\;\; c_1 = - c_2 \;\;\;\; ⇒ \;\;\;\; v_2 = \begin{pmatrix} 1 \\ -1 \end{pmatrix}
The solution is then c1=-c2c_1 = - c_2, which means that the masses move in opposite directions (again with the same amplitude).  This is the faster mode of oscillations as this is the higher frequency.  We call these modes of oscillation eigenmodes. Eigenvectors, eigenfunctions, and eigenmodes are the same concept represented in different ways.   

Looking at a physical system, we can excite the system into either of the two eigenmodes by either pushing the mass in the same direction (lower frequency) or towards each other (higher frequency).  See Coupled oscillators.

Any arbitrary motion can be decomposed into the sum of the two eigenmodes.


Change of basis

What is the vector space for our linear operator?

It depends on which linear operator you mean.  If we go back to our equations of motion,

mẍ1=-(k+κ)x1+κx2m \ddot{x}_1 = -(k+κ) x_1 + κ x_2
mẍ2=κx1-(k+κ)x2m \ddot{x}_2 = κ x_1 -(k+κ) x_2
We can rewrite this by introducing the linear operator

L=(k+κ+md2dt2κκk+κ+md2dt2)L = \begin{pmatrix} k + κ + m \frac{d^2}{dt^2} & κ \\ κ & k + κ + m \frac{d^2}{dt^2} \end{pmatrix}
That acts on a vector consisting of two functions in time representation the displacements of the two masses

x=(x1(t)x2(t))x = \begin{pmatrix} x_1(t) \\ x_2(t) \end{pmatrix}
The vector space for L is the space of all pairs of smooth functions x1(t)x_1(t) and x2(t)x_2(t).


Our equation of motion is then the homogeneous equation  L(x)=0L(x) = 0

Most of the elements in this space are not solutions of the equations of motion.  In writing the matrix equation in the previous section, we considered only solutions of the equations of motion.  This greatly reduces the vector space.  The new vector space, which is a subspace of the vector space of L, is

(x1(t)x2(t))=(c11eiω1t+c12eiω2tc21eiω1t+c22eiω2t)\begin{pmatrix} x_1(t) \\x_2(t) \end{pmatrix} = \begin{pmatrix} c_{11} e^{i ω_1 t}+ c_{12} e^{i ω_2 t} \\ c_{21} e^{i ω_1 t} + c_{22} e^{i ω_2 t} \end{pmatrix}
where

ω1=km,ω2=k+2κm,c11=c21,c12=-c22ω_1 = \sqrt{\frac{k}{m}} \; , \;\; ω_2 = \sqrt{\frac{k+2κ}{m}} \; , \;\; c_{11} = c_{21} \; , \;\; c_{12} = - c_{22}
This is the standard basis.

We can simplify this by transforming to the eigenvector basis.

(x1(t)+x2(t)x1(t)-x2(t))=(c11eiω1t+c12eiω2t+c21eiω1t+c22eiω2tc11eiω1t+c12eiω2t-c21eiω1t-c22eiω2t)=(2c11eiω1t2c12eiω2t)\begin{pmatrix} x_1(t) + x_2(t) \\x_1(t) - x_2(t) \end{pmatrix} = \begin{pmatrix} c_{11} e^{i ω_1 t}+ c_{12} e^{i ω_2 t} + c_{21} e^{i ω_1 t} + c_{22} e^{i ω_2 t} \\ c_{11} e^{i ω_1 t}+ c_{12} e^{i ω_2 t} - c_{21} e^{i ω_1 t} - c_{22} e^{i ω_2 t} \end{pmatrix} = \begin{pmatrix} 2 c_{11} e^{i ω_1 t} \\ 2 c_{12} e^{i ω_2 t} \end{pmatrix}

The matrix M becomes diagonal in this basis.  You should work that out by constructing the change of basis matrix and doing the change of basis.  What are the eigenvalues?