Theoretical Mechanics IPSP

Jürgen Vollmer, Universität Leipzig

User Tools

Site Tools


book:chap4:4.5_linear_odes

4.5 Linear ODEs — Particle suspended from a spring

There are two forces acting on a particle is suspended from a spring: the gravitational force $-m\, g$ and the spring force $-k\, z(t)$ where $z(t)$ measures the displacement of the spring from its rest position. Hence, the EOM of the particle takes the form \begin{align} m \, \ddot z(t) = -m \, g - k \, z(t) \tag{4.5.1} \end{align} This equation can neither be integrated directly, because its right hand side depends on $z(t)$, nor can it be solved by separation of variables, because its right hand side depends on $z(t)$ rather than only on$\dot z(t)$. It falls into the very important class of linear ODEs.

Definition 4.5 Linear ODEs
An ODE is called a linear ODE when $z(t)$ and its derivatives only appear as linear terms in the ODE. Hence, an $N^{\text{th}}$ order linear ODEs for $z(t)$ takes the general form \begin{align*} I(t) = z^{(N)}(t) + c_{N-1}(t) \: z^{(N-1)}(t) + \cdots + c_{0}(t) \: z(t) \end{align*} The functions $I(t)$, $c_\nu(t)$, $\nu=0 \cdots N-1$, are called the coefficients of the linear ODE. When they do not depend on time we speak of a linear ODE with constant coefficients. In particular, $I(t)$ is called inhomogeneity; when it vanishes the ODE is called homogeneous.

Example 4.8: Particle suspended from a spring
Equation 4.5.1 is an inhomogeneous second-order linear ODE with the constant coefficients $f_0 = k$, $f_1 = 0$, and inhomogeneity $I = m\,g$.

Remark 4.9. An $N^{\text{th}}$-order linear ODE where the coefficient in front of the $N^{\text{th}}$ derivative takes the value $c_N \ne 1$ can be stated in the form given in Definition 4.5 by division with $c_N$.

Example 4.9 Damped harmonic oscillator
The harmonic oscillator with damping $\gamma$ and spring constant $k$ \begin{align*} m \, \ddot x(t) = -m \, \gamma \, \dot x(t) - k \, x(t) \end{align*} is described by a homogeneous second order, linear ODE with the constant coefficients $k_1 = \gamma$ and $k_0 = k/m$.

4.5.1 Solving linear ODEs with constant coefficients

Linear ODEs with constant coefficients are solved as follows

Algorithm 4.3: Linear ODEs with constant coefficients
An $N^{\text{th}}$-order linear ODE with constant coefficients, \begin{align*} I = \sum_{\nu=0}^N c_\nu \: f^{(\nu)}(t) \end{align*} can be recast into a homogeneous ODE by considering $h(t) = f(t) - I/c_0$, which is a solution of the corresponding homogeneous, linear ODE \begin{align*} 0 = \sum_{\nu=0}^N c_\nu \: h^{(\nu)}(t) \end{align*} Its solutions can be written as \begin{align*} h(t) = \sum_{k=1}^N A_k \, \mathrm{e}^{\lambda_k \, t} \end{align*} where the numbers $\lambda_k$, $k=1 \cdots N$ are the $N$ distinct roots of the characteristic polynomial \begin{align*} 0 = \sum_{\nu=0}^N c_\nu \: \lambda^\nu \end{align*} and the amplitudes $A_k$, $k=1\dots N$ must be chosen such that $f(t) = I + c_0 \, h(t)$ obeys the initial conditions \begin{align*} f (t_0) &= \frac{I}{c_0} + \sum_{k=1}^N A_k \, \mathrm{e}^{\lambda_k \, t_0} \\ f^{(1)} (t_0) &= \qquad \sum_{k=1}^N A_k \, \lambda_k \, \mathrm{e}^{\lambda_k \, t_0} \\ \vdots \quad &= \qquad\quad \vdots \\ f^{(N-1)}(t_0) &= \qquad \sum_{k=1}^N A_k \, \lambda_k^{N-1} \, \mathrm{e}^{\lambda_k \, t_0} \end{align*}

The idea underlying this algorithm is founded on three insights:

  • the solutions of a homogeneous linear ODE form a vector space,
  • $\exp(\lambda t)$ is a solution of the ODE iff it is a root of the characteristic polynomial, and
  • the functions $\{ \exp(\lambda_i t), i=1,\dots, N\}$ form a basis of the vector space.

The proof will be provided in Problem 4.15.

Remark 4.10. When the polynomial only has $M<N$ distinct roots the set of functions $\{ \exp(\lambda_i \,t) , i=1,\dots, M \}$ is missing $N-M$ elements to form a basis for the space of solutions. The set is augmented then by functions of the form $t \, \exp(\kappa \,t)$ for double roots, $t^2 \, \exp(\kappa \,t)$ for triple roots, etc. In this course we only deal with second order ODEs, where at most double roots arise. The solution strategy for that case will be discussed in Section 4.5.3

4.5.2 Solving the ODE for the mass suspended from a spring

For Equation 4.5.1 this implies that $h(t) = z(t) + mg/k$ with \begin{align} 0 = \ddot h(t) + \frac{k}{m} \, h(t) \tag{4.5.2} \end{align} such that we obtain \begin{align*} \lambda_{\pm} = \pm \sqrt{\frac{k}{m}} = \pm\omega \qquad\text{as solution of}\quad 0 = \lambda^2 + \frac{k}{m} \end{align*}

Consequently, the motion of the spring is described by

\begin{align*} z(t) = -\frac{mg}{k} + A_+ \; \mathrm{e}^{ \omega \, (t-t_0) } + A_- \; \mathrm{e}^{ -\omega \, (t-t_0) } \end{align*} This is a real-valued function if and only if $A_+$ and $A_-$ are canonically conjugated complex numbers, such that we can write $A_{\pm} = A \, \exp(\pm \mathrm{i} \, \varphi) / 2$ with $A \in \mathbb{R}$. As a consequence of $\cos x = (\mathrm{e}^{\mathrm{i} x} + \mathrm{e}^{-\mathrm{i} x})/2$ we then obtain

\begin{align} z(t) = -\frac{mg}{k} + A \; \cos\bigl( \varphi + \omega \, (t-t_0) \bigr) \tag{4.5.3a} \end{align} where $A$ and $\varphi$ must be fixed based on the initial conditions \begin{align*} z(t_0) &= -\frac{mg}{k} + A \; \cos( \varphi ) \\ \dot z(t_0) &= \qquad -\omega \: A \; \sin( \varphi ) \end{align*} or \begin{align} A^2 = \Bigl( z(t_0) + \frac{mg}{k} \Bigr)^2 + \frac{ \dot z^2 (t_0) }{\omega^2} \qquad\text{ and } \quad \varphi = \arcsin\left( \frac{ \dot z (t_0) }{ \omega \, A } \right) \tag{4.5.3b} \end{align}

4.5.3 Solution for the damped harmonic oscillator

The damped harmonic oscillator is described by the linear EOM \begin{align} 0 = \ddot x(t) + \gamma \, \dot x(t) + \frac{k}{m} \, x(t) \qquad\text{ with } \gamma, \: k, \: m \in \mathbb{R}_+ \, . \tag{4.5.4} \end{align} It characteristic polynomial \begin{align*} 0 = \lambda^2 + \gamma \, \lambda + \frac{k}{m} \end{align*} has the solutions \begin{align*} \lambda_\pm = -\frac{1}{2} \; \left( \gamma \pm \sqrt{ \gamma^2 - 4\,k/m } \right) \end{align*} Here $\lambda_+$ and $\lambda_-$ can either be both real, a pair of complex conjugated numbers, or we have to deal with the case $\gamma^2=4\,k/m$ where there only is a single root. We treat the cases one after the other.

1. Two real roots
In this case $\gamma^2 > 4\,k/m$, and $\lambda_\pm \in \mathbb{R}_-$. Hence, the motion of the oscillator is described by \begin{align*} x(t) = A_+ \; \mathrm{e}^{ \lambda_+ \, (t-t_0) } + A_- \; \mathrm{e}^{ \lambda_- \, (t-t_0) } \end{align*} which is a real-valued function for amplitudes $A_\pm \in \mathbb{R}$. Moreover, the solution for the initial conditions $x(t_0) = x_0$ and $\dot x(t_0)=v_0$ is found by solving the equations \begin{align*} \left . \begin{aligned} x_0 &= A_+ + A_- \\ v_0 &= A_+ \, \lambda_+ + A_- \, \lambda_- \end{aligned} \right\} \quad \Leftrightarrow \quad \left\{ \begin{aligned} A_+ &= m \, ( x_0 \, \lambda_- - v_0 ) / \sqrt{ \gamma^2 - 4\,k/m } \\ A_- &= -m \, ( x_0 \, \lambda_+ - v_0 ) / \sqrt{ \gamma^2 - 4\,k/m } \end{aligned} \right . \end{align*} Problem 4.13 instructs the reader to plot these solutions for different combinations of $A_+$ and $A_-$.

2. Two complex roots
This discussion is analogous to the one provided in Section 4.5.2. One obtains \begin{align} x(t) = A \; \mathrm{e}^{-\gamma\, (t-t_0) / 2} \; \cos\bigl( \varphi + \omega_\gamma \, (t-t_0) \bigr) \tag{4.5.5} \end{align} where $A$ and $\varphi$ must be fixed based on the initial conditions \begin{align*} x(t_0) &= A \; \cos( \varphi ) \\ \dot x(t_0) &= -\omega_\gamma \: A \; \sin( \varphi ) \end{align*} or \begin{align*} A^2 = z^2(t_0) + \frac{ \dot z^2 (t_0) }{\omega_\gamma^2} \qquad\text{ and } \quad \varphi = \arcsin\left( \frac{ \dot z (t_0) }{ \omega_\gamma \, A } \right) \end{align*} In Problem 4.14 the reader is advised to fill in the details of this derivation.

3. A single double root
For $\gamma^2 = 4\,k/m$ the characteristic polynomial has a single root$\lambda = -\gamma/2$ such that we only find a single solution $\exp(\lambda t)$ of the ODE. The ODE is solved then as follows:

Algorithm 4.4 Linear 2nd order ODEs: the degenerate case
A $2^{\text{nd}}$-order linear homogeneous ODE whose characteristic polynomial has a double root at $\lambda = c$ takes the form \begin{align*} 0 = \ddot h(t) - 2\, c \, \dot h(t) + c^2 \, h(t) \quad\text{with } c \in \mathbb{C} \end{align*} This ODE has two independent solutions $\exp(\lambda\, t)$ and $t\:\exp(\lambda\, t)$ such that its general solutions can be written
as \begin{align*} h(t) = ( A + B \, (t-t_0) ) \, \mathrm{e}^{c \, (t-t_0)} \end{align*} Here the amplitudes $A$ and $B$ must be chosen such that the solution obeys the initial condition \begin{align*} \left . \begin{aligned} h (t_0) &= h_0 = A \\ \dot h (t_0) &= v_0 = c\,A + B \end{aligned}\right\} \quad \Leftrightarrow \quad \left\{ \begin{aligned} A &= h_0 \\ B &= v_0 - c\, h_0 \end{aligned} \right. \end{align*}

Remark 4.11. The function $t \, \exp(ct)$ is a solution of the ODE iff the characteristic polynomial has a double root:
Proof. \begin{align*} 0 &= \frac{\mathrm{d}^2}{\mathrm{d} t^2}\bigl( t \, \mathrm{e}^{c\,t} \bigr) + a \: \frac{\mathrm{d}}{\mathrm{d} t}\bigl( t \, \mathrm{e}^{c\,t} \bigr) + b \: \bigl( t \, \mathrm{e}^{c\,t} \bigr) \\ &= \mathrm{e}^{c\,t} \;\left[ ( 2\,c + a) + \bigl( c^2 + a\, c + b \bigr) \, t \right] \\ \Rightarrow\qquad & ( 2\,c + a) = 0 \quad \land \quad \bigl( c^2 + a\, c + b \bigr) = 0 \end{align*} The first equations holds iff $a=-2\, c$ and the second condition implies then that $b = c^2$. qed

For the damped harmonic oscillator we have $c=-\gamma/2$ such that \begin{align*} x(t) = \left[ x_0 + \left( v_0 + \frac{\gamma \, x_0}{2} \right) \, (t-t_0) \right] \; \mathrm{e}^{-\gamma \, t/2} \end{align*} is the solution with $x(t_0) = x_0$ and $\dot x(t_0) = v_0$.

4.5.4 Self Test


Problem 4.12: Alternative solution for the mass suspended from a spring
In Equation 4.5.3 we provided the solution of the EOM 4.5.2 of a mass suspended from a spring. Occasionally one also finds the solution given in the form \begin{align*} z(t) = -\frac{mg}{k} + A_1 \; \cos\bigl( \omega \, (t-t_0) \bigr) + A_2 \; \cos\bigl( \omega \, (t-t_0) \bigr) \end{align*} What is the relation between these two solutions? How does one find one from the other?
Hint:


Problem 4.13: Overdamped solutions of the damped harmonic oscillator: time dependence and in phase-space portrait
In this exercise we discuss the form of the overdamped solutions of the damped harmonic oscillator.

a) Consider first ICs where $A_+$ and $A_-$ are positive. Verify that there is a time $t_c$ where the two contributions to $x(t)$ are equal. Plot $x(t) \, \exp(-\lambda_+) \, (t_c-t_0) / A_+$ as function of $t-t_0 - t_c$, choosing a log-scale for the ordinate axis. You should observe linear behavior for large negative and positive values on the mantissa $t-t_0 - t_c$. What are the slopes of these lines? What is the value where the function intersects with $t-t_0 - t_c = 0$?

b) Consider first ICs where $A_+>0>A_-$ and plot $x(t)$ as function of $t-t_0$. Add the functions that describe the asymptotics of $x(t)$ for very small and for large times. You will find that this function has a root and a maximum. Find the time where this happens, and the function value at the maximum.

c) Sketch the motion in phase space! Make use to this end of the special points that you evaluated in b).


Problem 4.14: Damped oscillations of the damped harmonic oscillator: derivation and phase-space portrait
For $\gamma^2 > 4\,k/m$ the damped harmonic oscillator shows damped oscillations as given in Equation 4.5.5.

  1. Why should the amplitudes $A_\pm$ of the two solutions be complex conjugate?
  2. Choose the ansatz $A_\pm = A \, \exp(\pm \mathrm{i} \varphi)/2$ and derive the result provided in Equation 4.5.5.
  3. Note that there is no explicit $\gamma$ dependence of IC. Why does it drop out?
  4. How does this motion look like in phase space?

Problem 4.15: The solutions of a homogeneous linear ODE form a vector space
The set of solutions $\mathsf{S}_N$ of a homogeneous $N^{\text{th}}$-order homogeneous linear ODE, \begin{align} 0 = \sum_{\nu=0}^N c_\nu(t) \: f^{(\nu)}(t) \, , \tag{4.5.6} \end{align} forms a vector space (cf Defintion 2.9). Proof to this this end that

a) $(\mathsf{S}, +)$ is a commutative group. The non-trivial statement that must be checked to this end is that \begin{align*} \forall s_1(t), s_2(t) \in \mathsf{S} \: : \quad s_1(t) + s_2(t) \in \mathsf{S} \end{align*}

b) Verify that \begin{align*} \forall \alpha \in \mathbb{C} \, , \;\; s(t) \in \mathsf{S} \: : \quad \alpha \, s(t) \in \mathsf{S} \end{align*} and show that the other properties of a vector space follow trivially from the properties of real functions.

c) Show that the vector space $\mathsf{S}_N$ has dimension $N$.

d) Show that the functions $\exp(\lambda t)$ are a solution of Equation 4.5.6 iff $\lambda$ is a root of the characteristic polynomial.

e) In Algorithm 4.3 we wrote the solutions as $h(t) = \sum_k A_k \, \exp(\lambda_k \,t)$. Show that this can be interpreted as a representation of the vector $h(t)$ as a linear combination with coordinates $A_k$ with respect to a basis $\{ \exp(\lambda_k \,t), k=1, \dots, N \}$.
Why is it important to this end that the characteristic polynomial has distinct roots?

f) What about inhomogeneous, linear ODEs? Do their solutions form a vector space, too? If yes: proof it! If no: provide counterexamples for all properties that are violated.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
book/chap4/4.5_linear_odes.txt · Last modified: 2024/02/01 00:50 by jv