It will be purely “imaginary”.
It will be purely “real”.
It will be complex, that is with a non-zero real part and a non-zero imaginary part.
There is no way to tell for sure.
question id: pine-bring-window-1
\[ \newcommand{\dnorm}{\text{dnorm}} \newcommand{\pnorm}{\text{pnorm}} \newcommand{\recip}{\text{recip}} \]
Exercise 1 Friction is an inevitable feature of real-world spring-mass systems. Without friction the spring-mass force-balance differential equation is \(m\partial_{tt} x = -k\, x\). How does friction fit in?
For a mass moving at velocity \(\partial_t{x}\), the friction force will be in the direction opposed to the velocity and, when velocity is zero, friction goes away. Following our general calculus idea of approximating with a simple straight-line function, we get a force \(\text{friction} = -r \partial_t{x}\). Adding in the friction force gives a new force-balance equation which has a famous name in physics: the “damped harmonic oscillator.”
\[m \partial_{tt}{x} = -r \partial_t{x} - k x\] Note that all of the coefficients \(m, r\), and \(k\) are positive
Since we’ve gotten in the habit of using \(a\) and \(b\) on the right side of the equation, we will re-write the force-balance equation as \[\partial_{tt}{x} = a \partial_t{x} + b x\] where \(a = -r/m\) and \(b = -k/m\).
As the name “damped harmonic oscillator” suggests, we expect that the solution to the force-balance equation will be a “damped” oscillation, that is an oscillation that decreases in amplitude over time as friction draws energy out of the system (and dissipates it as heat). But how fast and in what form will the amplitude decrease?
It will be purely “imaginary”.
It will be purely “real”.
It will be complex, that is with a non-zero real part and a non-zero imaginary part.
There is no way to tell for sure.
question id: pine-bring-window-1
No
Yes, one eigenvalue can be positive.
Both eigenvalues must be positive.
Depends on the specific values of \(a\) and \(b\).
question id: pine-bring-window-2
When friction dominates (that is, large \(|a|\)) the eigenvalues are both real and negative. This means there is no oscillation and the motion decays to \(x = 0\).
It will be purely “imaginary”.
It will be purely “real”.
It will be complex, that is with a non-zero real part and a non-zero imaginary part.
There is no way to tell for sure.
question id: pine-bring-window-3
Suppose that we define \(\omega \equiv \sqrt{\strut 4b - a^2}/2\) and \(k = a/2\). (Recall, that for \(a\) to describe friction, we must have \(a < 0\).) The eigenvalues will be of the form \({k + i\omega}\) and a solution to the differential equation will be \(e^{(k + i\omega)t} = e^{kt} e^{ i \omega t}\).
An exponentially decaying sinusoid
An exponentially growing sinusoid
An ordinary sinusoid.
question id: pine-bring-window-4
Exercise 2 Let’s plot \(e^{i\omega t}\) over the domain \(0 < t < 10\) using \(\omega = 2\). We need to be a little careful, since our plotting functions are not arranged to display complex numbers. But there is an easy workaround: plot the “real” and “imaginary” parts separately.
The “real” part
The “imaginary” part
The negative of the “imaginary” part
The negative of the “real” part
question id: tiger-sharpen-fork-1
Now let’s consider \(e^{(k + i\omega) t}\), where the input to the exponential function has a real part \(k\) and an imaginary part \(\omega\). As before, the output of the exponential will be a complex number, so we will plot the real and imaginary parts separately.
question id: tiger-sharpen-fork-2
question id: tiger-sharpen-fork-3
question id: tiger-sharpen-fork-4
question id: tiger-sharpen-fork-5
Exercise 3 Passive electrical circuits
Second-order differential equations are used to model simple electrical circuits. In a step outside of calculus (meaning: you won’t be examined on it) it is worth pointing out the correspondence between concepts of motion (acceleration, velocity, position) and electrical circuits (voltage, current, charge). There are three classical idealized passive components of circuits:
In every case, we will be interested in the voltage across the two ends of the component. And we will think about the dynamics of the circuit in terms of electrical charge which we will denote \(x\).
Only a capacitor is capable of holding a voltage on its own. The other circuit elements can carry a voltage when they are part of a circuit. we will explore a simple circuit.
To prime the circuit, we will connect the two dots at the bottom of the circuit with a battery. This will charge up the capacitor in much the same way as we “charge up” a spring by pulling on it. Next remove the battery and get ready to observe the motion. Complete the circuit by closing the switch between the two dots. Doing so establishes the circuit, analogous to setting up the dynamics of the system. The initial condition is the amount of charge \(x\) on the capacitor and, at the instant the switch is closed, no flow of current, giving \(\dot{x} = 0\).
The “force-balance” is the requirement that the sum of the voltages across the circuit elements be zero. This amounts to
\[L \partial_{tt} {x} = -R\, \partial_t{x} - \frac{1}{C} x \]
\(\lambda_{1,2} = \frac{1}{2}\left[-3 \pm \sqrt{\strut 9 - 4 }\right] = (-3 \pm \sqrt{5})/2\) so \(\lambda_1 \approx -0.382\) and \(\lambda_2 \approx -2.618\). Since both eigenvalues are negative, the fixed point is stable.
\(\lambda_1 = -1 + 1i\) and \(\lambda_2 = -1 - 1i\)
\(\lambda_1 = -1 + 1i\) and \(\lambda_2 = 1 - 1i\)
\(\lambda_1 = 1 + 1i\) and \(\lambda_2 = 1 - 1i\)
question id: falcon-shut-hamper-2
Exercise 4 XREF not implemented yet gives the equations for the motion of a cannonball with a simple model of air resistance and shows how to integrate them numerically with integrateODE()
.
You task is to set the initial conditions for velocity so that the ball is being fired 250 feet per second at an angle \(\theta\) from the horizontal. These initial conditions will be \(v_0 = 250 \sin\left(\strut \pi \theta/180\right)\) and \(u_0 = 250 \cos\left(\strut \pi \theta/180\right)\), where \(\theta\) has units of degrees.
Once you have the numerical integration working, find an argmin for \(\theta\) that maximizes the horizontal distance travelled by the cannonball.
Exercise 5 Most any mathematics textbook devotes a considerable amount of space to deriving formulas. This is well and good. But in practical work, there is considerable room for error even if you already know the formula.
It is a good professional practice to try to have at least two ways to perform a calculation so that you can confirm that you are doing the calculation properly. In this exercise, we give you a formulas for the eigenvalues and eigenvectors of an abcd matrix. And, of course, there is the eigen()
function that should give the same results as the formula.
Your task is to use both eigen()
and the formulas directly to confirm that the two calculations are the same. The formulas have symbols; replace these with numbers of your choice to do the calculations.
You might start with numbers that are simple integers, then switch to numbers that are more or less random.
The formula for the eigenvalues of an abcd matrix \[\left[\begin{array}{cc}a & b\\c & d\end{array}\right]\] is \[\lambda_{1,2} = \frac{1}{2}\left[{\large\strut}(a-d)^2 \pm \sqrt{\strut(a+d)^2 - 4bc}\right]\ .\]
Once you know the eigenvalues, the eigenvectors can be calculated this way: \[\vec{\Lambda_1} = \left[\begin{array}{c}\lambda_1 - d\\c\end{array}\right]\ \ \text{and}\ \ \vec{\Lambda_2} = \left[\begin{array}{c}\lambda_2 - d\\c\end{array}\right]\]
Calculate the eigenvalues and eigenvectors of \[\left[\begin{array}{rr}1 & 0 \\-2 & 6\end{array}\right]\]
Calculate the eigenvalues and eigenvectors of \[\left[\begin{array}{rr}8 & 6 \\4 & -1\end{array}\right]\]
Calculate the eigenvalues and eigenvectors of \[\left[\begin{array}{rr}-9 & 2\\8 & -6\end{array}\right]\]
Exercise 6 An eigenvector \(\vec{\Lambda}\) of a matrix \(\mathit{M}\) always has this property:
\[\mathit{M} \vec{\Lambda} = \lambda \vec{\Lambda}\] This merely says that if you multiply a matrix by one of its eigenvectors, the result is a vector that points in the same direction as the eigenvector but may have a different length or reversed orientation.
Your task:
Construct a numerical abcd matrix with whatever values you like and, using eigen()
, calculate its eigenvalues and eigenvectors.
Multiply the matrix by one of the eigenvectors to create a new vector.
Confirm that the vector in (2) is proportional to the eigenvector. When two vectors are proportional, dividing component-wise one vector by the other will create a vector with every element the same. (Note: if both of the vectors in the division have any zero component, the result of the division will be NaN
. In contrast, if one of the vectors has a zero component, but the other does not, you will get a result of 0 or Inf
for that component.)
Exercise 7 You’ve seen that sometimes the two eigenvalues of an abcd matrix are complex numbers, that is, have a nonzero imaginary part. You may also have noticed that the eigenvalues are closely related to one another: the imaginary part of one will be the negative of the imaginary part of the other. Such vectors are called complex conjugates.
Whenever a matrix has a complex eigenvalue, it will also have the complex conjugate of that eigenvalue; complex eigenvalues always come in pairs.
For a 2x2 matrix, there will be two eigenvalues. If one is complex, the other will be the complex conjugate.
For a 3x3 matrix, either one or all three of the eigenvalues will not be complex.
Here’s a way to generate a random nxn matrix:
Your task: for \(n=3\), run the previous commands over and over, 20 times altogether. Report what fraction of the time the random matrix generated has 3 real eigenvalues. (Note: Something like 1.548950+0.00000i
is a real eigenvalue, because the imaginary part is zero.)
Exercise 8 Consider the second-order linear differential equation
\[\partial_{tt}\ x = - b\ \partial_t\ x - a\ x\] where \(a\) and \(b\) are scalars.
The only state variable listed explicitly in the second-order equation is \(x\).
Define a new state variable \(v \equiv \partial_t x\) and use it to re-write the second-order equation as two first-order differential equations: \[\begin{eqnarray} \partial_t v & = ????\\ \partial_t x & = ????\\ \end{eqnarray}\]
Confirm that the matrix equivalent to the pair of first order equations is \[\left[\begin{array}{cc}a & b\\1 & 0\end{array}\right]\ .\]
The ab-matrix in (2) has only two parameters, \(a\) and \(b\). Consider the following four-parameter abcd matrix:
\[\left[\begin{array}{cc}a & b\\c & d\end{array}\right]\ ?\] Can the ab-matrix create the full range of dynamical behaviors seen in the abcd-matrix?
To answer this question, we will return to the app that displays flows:
You can see in the ab-selector graph on the left annotations for several types of generic behaviour:
In the ab-selector graph, these are encoded by color and shading. The blue parabola marks the ab-region of oscillation; stability is indicated using dark shading. Saddles are at the top of the ab-graph. Sources and sinks are the gray arches rising up from the edges of the graph.
The shading is set by calculating the eigenvalues for each (a, b)-pair
What sorts of trajectories, if any, are not produced by ab10 compared to the possibilities provided by the abcd matrix?
Play with the \(c\)- and \(d\)-inputs to see how that changes the flow field (right graph) and the shaded regions. Make small changes to \(c\) and \(d\) at first to get a feeling for what the controls do to the display. Then you can explore large changes.
Does any new type of behavior appear when \(c\) and \(d\) are moved from their [ab10] settings?