46 Force-balance equations
Up to now, we have been studying dynamics in the format of one or more first-order differential equations. For instance,
LAW II: The alteration of motion is ever proportional to the motive force impressed; and is made in the direction of the right line in which that force is impressed. — Source
In contemporary language, we would say things differently. Instead of “alteration of motion” we would write
that is, change in motion is proportional to force. Newton stipulated that the constant of proportionality,
the form in which beginning physics students first hear it.
Newton, of course, was very interested in gravity. From previous experiments dropping weights and rolling balls down ramps, as was done by Galileo Galilee (1564-1642), Newton knew that the force of gravity on an object (near the surface of Earth) is proportional to the object’s mass, that is
The simple model of an object moving under the force of gravity is
where
It is worth noticing how much mathematics needs to be understood before this method of solution makes sense. The fundamental theorem of calculus is what tells us that
There is also physical context to be considered. By setting
Anti-differentiating both sides of
-g, t + v_0) dt x(t) = - g,t^2 + v_0,t + x_0 , $
where
Still one more way to write the dynamics of falling under the influence of gravity …. Recognizing that
This is an example of a second-order differential equation, so called because of the appearance of a second derivative,
In this chapter, we will study second-order differential equations in a variety of contexts. But, as for Newton, movement under the influence of gravity will be a focus. Since the second-order differentiation can be interpreted as representing the balance between force and acceleration, we will call these force-balance equations.
In general, a force-balance equation has the form
Second-order differential equations can always be written as a pair of first-order differential equations. To see this, let one of the first-order equations be
Since we know how to solve sets of first-order differential equations by Euler’s method, we can always find the solution
46.1 Ballistics
A lot of the theory of second-order differential equations was developed in the setting of a ball being set off with an initial velocity from an initial position. Such a focus on the flight of balls might seem trivial. Fortunately, language allows us to construct a scientific-sounding word by adding the suffix “istic” to the root “ball.” This suffixing produces the word ballistics.
The importance of ballistics to Newton can be seen by a famous diagram he drew, shown in Figure 46.1. In the diagram, Newton traces the path of a ball shot horizontally from a cannon placed at the top of a mountain.
Since the motion in Newton’s diagram has both vertical and horizontal components, we will need two second-order differential equations:
We found a solution for the vertical equation in the previous section,
The solution for the horizontal component of motion can be found by anti-differentiating both sides of the equation of hortizontal motion:
Regrettably, symbolic anti-differentiation works only in simple cases. To support more realistic models of ballistics, let’s see how to translate the two second-order differential equations into sets of first-order equations. The state variables will be
To illustrate, we will solve this set of four first-order equations numerically. We need to specify the initial values for
Here’s the trajectory:
<- integrateODE(
traj ~ u, dy ~ v, du ~ 0, dv ~ -9.8, #dynamics
dx x=0, y=100, u = 250, v=0, #initial conditions
bounds(t=0:5)
) # traj_plot(y(t) ~ x(t), traj)
# traj_plot(v(t) ~ u(t), traj)
The left panel in Figure 46.2 shows that the trajectory is a parabola. At about
The right panel might seem somewhat strange. You can see that the vertical component of velocity,
46.2 The harmonic oscillator
Consider the motion of a weight attached to a spring, as in ?fig-spring-mass. We will denote the vertical position of the mass by
::: {.cell .column-margin layout-align=“center” fig.cap = “A spring-mass system in motion. Source=’Svjo CC BY-SA via Wikimedia Commons”’ fig.showtext=‘false’} ::: {.cell-output-display} ::: :::
According to Hooke’s Law, a stretched or compressed spring exerts a force that is proportional to the amount of extension or compression. With our measuring
You can see that the motion is oscillatory, which suggests that the solution to the differential equation will be of the form
To find
Differentiating
Differentiating again gives
Simplifying this by cancelling out the
Instead of using
46.3 Exponential or sinusoid?
In Chapter Chapter 45, we established that solutions to second-order linear differential equations have the form
How is it possible for the solution to be both in the form of a linear combination of exponentials and a linear combination of sine and cosine? Sinusoids oscillate up and down and up and down, whereas exponentials are monotonic.
To find out what might be the relationship between an exponential and a sinusoid, let’s plug an exponential ansatz
As before, we will cancel out the common term
Generally, the symbol
In other words,
46.4 Exponentials with “imaginary” inputs
The “imaginary” in the section title is used in its mathematical sense. In interpreting the word “imaginary,” you should keep in mind a long history in mathematics of assigning insulting names to mathematical objects that, at the time they were first introduced. That is why some numbers are vilified as “negative,” and some as “irrational.” The insult is even more dire for numbers like
You will only get comfortable with “imaginary” numbers when you start to work with them extensively, as happens in physics and engineering courses. Our goal here is merely to increase your awareness of imaginary numbers and some of the ways they are used in the sciences. To that end, we offer three different approaches to understanding the function
- Basic, pragmatic understanding. This is the level of understanding that you must have to make sense of the rest of this chapter and Chapter ?sec-forcing. Here it is:
So whenever you see
- Algebraic understanding via Taylor Polynomials. (optional) This level of understanding can give you confidence that the basic, pragmatic understanding in (1) has honest roots. It also shows the way that (1) is not 100% on target (although good enough for a large fraction of mathematical work). But for many people, algebra is a rocky road to understanding.
The starting point for the algebraic understanding is the Taylor polynomial approximation for
You may also recall the Taylor polynomial expansion of sine and cosine:
You can see some association between
Now consider the Taylor polynomial for
Since
Substitute these facts about
which exactly matches the Taylor polynomial for
- The arithmetic of complex numbers. (optional) A complex number is a number like
which consists of two parts: the real-part and the imaginary part . When you multiply one complex number by another you get a complex number (although either the real or imaginary parts might happen to be zero.) For example:
R knows the rules for arithmetic on complex numbers. Here’s a demonstration of the oscillations that result from raising a complex number to successive powers.
<- 0.65 + 0.76i
lambda ^2
lambda## [1] -0.1551+0.988i
^3
lambda## [1] -0.851695+0.524324i
^4
lambda## [1] -0.952088-0.3064776i
^5
lambda## [1] -0.3859342-0.9227973i
^6
lambda## [1] 0.4504687-0.8931283i
^7
lambda## [1] 0.9715821-0.2381771i
^8
lambda## [1] 0.812543+0.5835873i
^9
lambda## [1] 0.0846266+0.9968644i
^10
lambda## [1] -0.7026097+0.7122781i
Notice that the real part of the result oscillates between negative and positive. The imaginary part also oscillates, but delayed a bit from the real part. Just like sine and cosine.
We can get a clearer picture by plotting Re()
and Im()
do this work.
<- makeFun(exp(1i * omega * t) ~ t, omega = 2)
f slice_plot(Re(f(t)) ~ t,
bounds(t=0:10), color = "magenta") %>%
slice_plot(Im(f(t)) ~ t, color="brown")
46.5 Damping
It is common for there to be friction, called damping, in a spring mass system. To keep things very simple, we will consider that the friction is proportional to the velocity and, as in the cannonball example, in the direction opposite to velocity. That is:
As always, this second-order differential equation can be written as a pair of first-order differential equations. One of the first-order differential equations will be
In the previous chapter, we wrote such a pair of linear first-order differential equations in terms of a vector
In terms of the vector
This form suggests, at least to the avid reader of the previous chapter, that we look for a solution
We used the R function eigen()
to compute the eigenvalues and eigenvectors of the matrix, given numerical values for
As an ansatz for the for the original second-order differential equation
We can cancel out the common term
This is a quadratic polynomial in
Recall that the parameter
Suppose the stiffness of the spring is much larger than the friction. Then
To graph this function, we need to choose appropriate numerical values for
<- integrateODE(dv~ -r*v - b*y, dy ~ v,
traj v=10, y=0, r=1, b=6,
bounds(t=0:20))
## Solution containing functions v(t), y(t).
traj_plot(y(t) ~ t, traj)
This is the situation with a swinging door. You shove it to swing open, after which it oscillates with a decreasing amplitude.
In contrast, suppose the spring is weak compared to the damping such that
<- integrateODE(dv~ -r*v - b*y, dy ~ v,
traj2 v=10, y=0, r=1, b=0.1,
bounds(t=0:20))
## Solution containing functions v(t), y(t).
traj_plot(y(t) ~ t, traj2) %>%
gf_lims(y = c(0, NA))
The situation in Figure 46.5 is the sort of behavior one expects when giving a shove to an exit door in theater or stadium. The shove causes the door to swing open, after which it slowly returns to the closed position. That gives plenty of time for the people following you to get to the door before it closes.
Finally, consider the case where
<- integrateODE(dv~ -r*v - b*y, dy ~ v, v=10, y=0, r=1, b=0.25, bounds(t=0:20))
traj3 ## Solution containing functions v(t), y(t).
traj_plot(y(t) ~ t, traj3) %>%
gf_lims(y = c(0, NA))
This is a situation called critically damped. The door swings open, then closes as fast as it can without any oscillation.
For this system,
In other words,
To confirm our work, let’s use eigen()
to find the eigenvalues of the matrix
<- cbind(rbind(-2,1), rbind(3,0))
M eigen(M)
## eigen() decomposition
## $values
## [1] -3 1
##
## $vectors
## [,1] [,2]
## [1,] -0.9486833 -0.7071068
## [2,] 0.3162278 -0.7071068
Although R is doing all the calculations for us, it is possible to write the directions of the eigenvectors only in terms of the eigenvectors:
For the system with eigen()
.
Let’s return to the car-following control system introduced in Chapter Chapter 45. Recall that
We should set the parameters
46.6 Exercises
Exercise 46.01
Friction is an inevitable feature of real-world spring-mass systems. Without friction the spring-mass force-balance differential equation is
For a mass moving at velocity
Note that all of the coefficients
Since we’ve gotten in the habit of using
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?
Part A Suppose that friction is strong, that is
- 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.
Part B When
- No
- Yes, one eigenvalue can be positive.
- Both eigenvalues must be positive.
- Depends on the specific values of
and .
When friction dominates (that is, large
Part C Question: Suppose that friction is weak, that is
- 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.
Suppose that we define
Part D What will
- An exponentially decaying sinusoid
- An exponentially growing sinusoid
- An ordinary sinusoid.
Exercise 46.02
Section 46.1 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
Once you have the numerical integration working, find an argmin for
Exercise 46.03
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
Once you know the eigenvalues, the eigenvectors can be calculated this way:
- Calculate the eigenvalues and eigenvectors of
- Calculate the eigenvalues and eigenvectors of
- Calculate the eigenvalues and eigenvectors of
Exercise 46.04
An eigenvector
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 46.05
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: ::: {.cell layout-align=“center” fig.showtext=‘false’}
<- 3
n <- matrix(rnorm(n^2), nrow=n)
M eigen(M)$values
## [1] -1.2701434 1.2291019 -0.6767853
:::
Your task: for 1.548950+0.00000i
is a real eigenvalue, because the imaginary part is zero.)
Exercise 46.06
Let’s plot
<- 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")
Part A Which part of
- The “real” part
- The “imaginary” part
- The negative of the “imaginary” part
- The negative of the “real” part
Now let’s consider
<- 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)
:::
Part B At what time
At about
Part C Find a value for
Part D Keeping
Part E Set
Exercise 46.07
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
Part A What are the eigenvalues of the standard model for swinging?
and
Part B Units for
- Since ⅈ is “imaginary”, it makes no sense to talk about units.
- seconds/meter
- 1/seconds
- meters per second
Part C From the video, estimate the period of the oscillation. Which of these is closest to the duration of a full back-and-forth swing?
2 seconds 3 seconds 4 seconds 6 seconds
Part D It is conventional to give separate names to the components of
seconds 1/seconds meters per second It has no units.
Put together these three facts to find a formula for
Part E What’s a good estimate of
5 meters 10 meters 15 meters 20 meters
PS. Glad to report that in 2022, Catherine turned 62 years old.
Exercise 46.08
Consider the second-order linear differential equation
The only state variable listed explicitly in the second-order equation is
Define a new state variable
and use it to re-write the second-order equation as two first-order differential equations:Confirm that the matrix equivalent to the pair of first order equations is
With only 2 parameters,
and , can the matrix in (2) create the full range of behaviors seen in the 4-parameter 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
parameter, the other to set . By default, these are set to display an [ab10] matrix, but you can change them.
Play with the
Does any new type of behavior appear when
Exercise 46.09
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
- For a capacitor the voltage is proportional to charge
, where is the “size” of the capacitor. - For a resistor the voltage is proportional to the flow of charge, that is, current
, where 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,
, where 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
The “force-balance” is the requirement that the sum of the voltages across the circuit elements be zero. This amounts to
- Consider a circuit with inductance
, resistance and capacitance . What will be the eigenvalues of the dynamics? Will the fixed point at be stable or not?
- What will be the frequency of the solution
?
it is remarkable that the same
appears both in Newton’s Second Law and in the description of the force of gravity. There was no mathematical theory for this until Albert Einstein (1879-1955)↩︎Another bit of physics which is still not included in the differential equation is that it will only hold until the object hits the ground, at which point the force of gravity will be counter-acted by the force of the ground on the object.↩︎