Suppose that friction is strong, that is $a$ is big. More specifically, suppose $a^2 > 4 b$. What will be true about $\sqrt{\strut a^2 - 4b}$?
```{mcq}
#| label: fr1-1
#| show_hints: true
1. It will be purely "imaginary".
2. It will be purely "real". [ correct hint: Nice. ]
3. It will be *complex*, that is with a non-zero real part and a non-zero imaginary part.
4. There is no way to tell for sure.
```
Chap 46 Exercises
\[ \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?
When $a^2 > 4b$, can either of the eigenvalues be positive?
```{mcq}
#| label: fr1-2
#| show_hints: true
1. No [ correct hint: right-o ]
2. Yes, one eigenvalue can be positive.
3. Both eigenvalues *must* be positive.
4. Depends on the specific values of $a$ and $b$.
```
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\).
Question: Suppose that friction is weak, that is $a^2 < 4|b|$. What will be true about $\sqrt{a^2 + 4b}$?
```{mcq}
#| label: fr1-3
#| show_hints: true
1. It will be purely "imaginary". [ correct hint: You're right ]
2. It will be purely "real".
3. It will be *complex*, that is with a non-zero real part and a non-zero imaginary part.
4. There is no way to tell for sure.
```
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}\).
What will $e^{-kt} e^{i \omega t}$ be?
```{mcq}
#| label: fric4
#| show_hints: true
1. An exponentially decaying sinusoid [ correct hint: Excellent! ]
2. An exponentially growing sinusoid [ hint: Remember that $a > 0$, so $k = a/2 > 0$ and $e^{-kt}$ is a decaying exponential. ]
3. An ordinary sinusoid.
```
Exercise 2 ?sec-ballistics 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 3 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 4 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 orInf
for that component.)
Exercise 5 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:
<- 3
n <- matrix(rnorm(n^2), nrow=n)
M eigen(M)$values
[1] 2.2062407 -1.0440037 0.1421164
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 6 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.
<- makeFun(exp(1i * omega * t) ~ t, omega = 2)
f slice_plot(Re(f(t)) ~ t,
bounds(t=c(0, 10)), color = "magenta") %>%
slice_plot(Im(f(t)) ~ t, color="brown")
Which part of $e^{i \omega t}$ is the cosine function?
```{mcq}
#| label: cn2
#| show_hints: true
1. The "real" part [ correct hint: Right ]
2. The "imaginary" part
3. The negative of the "imaginary" part
4. The negative of the "real" part
```
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.
<- makeFun(exp((k + 1i * omega) * t) ~ t, omega = 2, k=-1)
g slice_plot(Re(g(t)) ~ t,
bounds(t=c(0, 10)), color = "orange3", npts=500) %>%
slice_plot(Im(g(t)) ~ t, color="dodgerblue", npts=500)
At what time $t$ does the sine-like function complete one full oscillation?
```{mcq}
#| label: cn4
#| show_hints: true
1. At about $t=1.6$
2. At about $t=3.14$ [ correct hint: Nice. ]
3. At about $t=4.7$
4. At about $t=6.28$
```
Find a value for $\omega$ that will produce one full oscillation every two time units. Graph it out to make sure that you have five full oscillations over the $0 < t < 10$ domain. What is that $\omega$?
```{mcq}
#| label: cn5
#| show_hints: true
1. $\omega = 1$
2. $\omega = \pi/2$
3. $\omega = \pi$ [ correct hint: Right ]
4. $\omega = 2 \pi$
```
Keeping $\omega$ at the value that produce five complete cycles over $0 < t < 10$, find a value for $k$ such that the amplitude of the oscillation at $t=10$ will be half that of the amplitude at $t=0$. What is $k$?
```{mcq}
#| label: cn6
#| show_hints: true
1. $k \approx -0.70$
2. $k \approx -0.07$ [ correct hint: right-o ]
3. $k \approx 0.07$
4. $k \approx 0.70$
```
Set $\omega$ at the value that produces 20 complete cycles over $0 < t < 10$ and $k$ at the value such that the amplitude of the oscillation at $t=10$ will be *twice* that of the amplitude at $t=0$. What are $\omega$ and $k$?
```{mcq}
#| label: cn7
#| show_hints: true
1. $\omega = \pi,\ k \approx 0.35$
2. $\omega = 2 \pi,\ k \approx 0.35$
3. $\omega = 4 \pi,\ k \approx 0.070$ [ correct hint: right-o ]
4. $\omega = 6 \pi,\ k \approx 0.7$
```
Exercise 7 At the very beginning of this 1987 video, the climber, Catherine Destivelle, is dangling from a rope. Make an estimate of how long the rope is (specifically the length of the rope from the climber’s harness to the bolts at the top of the route), based on the eigenvalues of the linear dynamics of swinging.
The standard differential-equation model for the changing angle \(\theta\) of a pendulum is \[L \partial_{tt} \theta = - g \theta\] where \(L\) is the length of the pendulum (in meters) and \(g\) is the acceleration due to gravity (9.8 m/s^2 on the Earth’s surface).
What are the eigenvalues of the standard model for swinging?
```{mcq}
#| label: csl57-1
#| show_hints: true
1. $\lambda_1 = L$ and $\lambda_2 = g$
2. $\lambda_{1,2} = \pm \frac{L}{g}$
3. $\lambda_{1,2} = \pm \sqrt{L/g}$
4. $\lambda_{1,2} = \pm ⅈ \sqrt{L/g}$ [ correct hint: You're right ]
```
Units for $L$ and $g$ were given in the paragraph above. Using these units, what are the corresponding units of the eigenvalues?
```{mcq}
#| label: csl57-2
#| show_hints: true
1. Since ⅈ is "imaginary", it makes no sense to talk about units. [ hint: Since we multiply $\lambda$ by $t$ in the solution $e^{\lambda t}$, there had better be some units to $\lambda$! ]
2. seconds/meter
3. 1/seconds [ correct hint: You're right ]
4. meters per second
```
From the video, estimate the period of the oscillation. Which of these is closest to the duration of a full back-and-forth swing?
```{mcq}
#| label: csl57-3
#| show_hints: true
1. 2 seconds
2. 3 seconds [ hint: This is a good estimate of *half* a cycle. ]
3. 4 seconds
4. 6 seconds [ correct hint: You're right ]
```
It is conventional to give separate names to the components of $\lambda$. The "real" part is often denoted $k$, the ⅈ part is called $\omega$. The period (in seconds, say) is the quantity $P$ such that $\omega P = 2 \pi$. What are the units of $\omega$ for $P$ in seconds?
```{mcq}
#| label: csl57-4
#| show_hints: true
1. seconds
2. 1/seconds [ correct hint: Excellent! ]
3. meters per second
4. It has no units.
```
Put together these three facts to find a formula for \(L\). Remember: \(\omega = \sqrt{L/g}\) and \(6\,\text{sec}\,\omega = 2 \pi\) and \(g = 9.8\)m/s.
What's a good estimate of $L$?
```{mcq}
#| label: csl57-5
#| show_hints: true
1. 5 meters
2. 10 meters [ correct hint: Yes ]
3. 15 meters
4. 20 meters
```
PS. Glad to report that in 2022, Catherine turned 62 years old.
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:
- Saddle (unstable along one eigenvector, stable along the other)
- Sources (unstable along both eigenvectors)
- Sinks (stable along both eigenvectors)
- Stable oscillation (spirals toward the fixed point)
- Unstable oscillation (spirals away from the fixed point)
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?
- Underneath the graph are two numeric-input widgets, one to set the \(c\) parameter, the other to set \(d\). By default, these are set to display an [ab10] matrix, but you can change them.
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?
Exercise 9 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:
- capacitor, denoted
- resistor, denoted
- inductor, denoted
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\).
- For a capacitor the voltage is proportional to charge \(x/C\), where \(C\) is the “size” of the capacitor.
- For a resistor the voltage is proportional to the flow of charge, that is, current \(r \dot{x}\), where \(R\) is the amount of resistance, basically the “size” of the resistor.
- For an inductor the voltage is proportional to the change in the flow of charge, that is, \(L \ddot{x}\), where \(L\) is the inductance.
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 \]
- Consider a circuit with inductance \(L=1\), resistance \(R=3\) and capacitance \(C = 1\). What will be the eigenvalues of the dynamics? Will the fixed point at \(x=0\) be stable or not?
- What will be the frequency of the solution \(x(t)\)?