Numerical Mathematics · Chapter 2
Bartz & Bartz GmbH
2026-11-09
Papula (2015) gives an introduction to the topic in Part IV, Chapter 1 (“Gewöhnliche Differentialgleichungen”, ordinary differential equations). All definitions, theorems, and examples, with proofs, are found in the lecture notes, Chapter 2.
Definition 1 (Ordinary Differential Equation) A differential equation is a relation between an unknown function \(y(x)\), its independent variable \(x\), and an arbitrary number of its derivatives. An ordinary differential equation (ODE) is a differential equation in which the independent variable, and hence the derivatives, are one-dimensional. We assume that an ODE can be written in the explicit form \[ \frac{\mathrm{d}^{n}y}{\mathrm{d}x^{n}} = f\left(x, y, \frac{\mathrm{d}y}{\mathrm{d}x}, \frac{\mathrm{d}^2y}{\mathrm{d}x^2}, \dots, \frac{\mathrm{d}^{n-1}y}{\mathrm{d}x^{n-1}}\right), \quad \text{for short} \quad y^{(n)} = f\left(x, y, y', \dots, y^{(n-1)}\right), \] where \(f\) is an arbitrary function of some or all of its arguments. The highest order of derivative \(n\) that occurs is called the order of the ODE.
| Symbol | Meaning |
|---|---|
| \(x\); \(y\) | independent variable; unknown function \(y(x)\) |
| \(f(x)\), \(g(x)\) | coefficient function and forcing function, respectively, of the linear ODE \(y' + f(x)y = g(x)\) |
| \(a, b\) | constant coefficients of the general linear second-order ODE \(y'' + ay' + by = g(x)\) |
| \(y_{\mathrm{h}}, y_{\mathrm{p}}\) | general solution of the homogeneous ODE and particular solution, respectively |
| \(y_1, y_2\) | basis solutions of a homogeneous linear second-order ODE |
| \(C\); \(C_1, C_2\) | constant of integration; constants of integration or coefficients of the general solution |
| \(K(x)\) | factor function that replaces \(C\) in the variation of constants |
| \(W\) | Wronskian \(W(y_1; y_2)\) |
| \(\lambda\); \(\lambda_{1,2}\) | root of the characteristic equation; the two roots |
| \(\alpha\), \(\omega\) | real and imaginary part, respectively, of a complex eigenvalue, \(\lambda_{1,2} = \alpha \pm \mathrm{j}\omega\) |
| \(\mathrm{j}\) | imaginary unit, \(\mathrm{j}^2 = -1\) |
| Symbol | Meaning |
|---|---|
| \(t\); \(x(t)\) | time; displacement from the rest position |
| \(\dot{x}, \ddot{x}\) | first and second derivative, respectively, with respect to time \(t\) |
| \(m\), \(b\), \(c\) | mass, damper constant, spring constant |
| \(\delta\) | damping factor or decay constant, \(\delta = b/(2m)\) |
| \(\omega_0\); \(\omega_{\mathrm{d}}\) | natural angular frequency \(\sqrt{c/m}\) (simple pendulum: \(\sqrt{g/l}\)); that of the damped oscillation, \(\sqrt{\omega_0^2 - \delta^2}\) |
| \(\omega\); \(\omega_{\mathrm{r}}\) | excitation angular frequency; resonance angular frequency, \(\sqrt{\omega_0^2 - 2\delta^2}\) |
| \(A\), \(\varphi\); \(A_{\mathrm{d}}\), \(\varphi_{\mathrm{d}}\) | amplitude and phase angle; those of the damped oscillation |
| \(F(t)\), \(F_0\); \(K_0\) | external force and its amplitude; \(K_0 = F_0/m\) |
| \(T\) | period of oscillation; \(T_0\) of the simple pendulum, \(T_{\mathrm{d}}\) of the damped oscillation |
| \(\Delta\) | discriminant of the characteristic equation, \(\Delta = \delta^2 - \omega_0^2\) |
| \(S\); \(A\) | state vector \(S(t)\); coefficient matrix in the reduction of order |
The solutions of an ODE form a family from which additional conditions select a single solution.
Definition 2 (General and Particular Solution) The general solution of an ODE of order \(n\) comprises all solutions of the equation. In general, it contains \(n\) undetermined constants of integration and describes a family of functions. A particular solution is a member of this family in which the constants have fixed values.
The constants cannot be determined from the ODE itself, but only from additional conditions such as initial or boundary conditions. A particular solution then satisfies both the ODE and these requirements.
Example 1 (General and Particular Solution) The first-order ODE \[ \frac{\mathrm{d}y}{\mathrm{d}x} = 3y \] has the general solution \(y = C\mathrm{e}^{3x}\) with an arbitrary constant \(C\). It describes a family of exponential functions whose curves depend on the value of \(C\). If \(y(0) = 4\) is additionally required, substituting into the general solution yields \(4 = C\mathrm{e}^{0} = C\). The particular solution is therefore \(y = 4\mathrm{e}^{3x}\).
Definition 3 (Initial Value Problem and Boundary Value Problem) In an initial value problem, the function value and the values of the first \(n-1\) derivatives of the solution \(y = y(x)\) of an ODE of order \(n\) are prescribed at a point \(x_0\): \[ y(x_0) = y_0, \quad y'(x_0) = y_0', \quad y''(x_0) = y_0'', \quad \dots, \quad y^{(n-1)}(x_0) = y_0^{(n-1)}. \] In a boundary value problem, the function values \(y(x_1), y(x_2), \dots, y(x_n)\) of the solution are prescribed at \(n\) different points \(x_1, x_2, \dots, x_n\).
Definition 4 (Separable ODE) A first-order ODE of the form \[ y' = \frac{\mathrm{d}y}{\mathrm{d}x} = f(x)\,g(y) \] is called separable (ODE with separable variables).
It is solved by separating the variables \(x\) and \(y\) onto the two sides of the equation, integrating both sides, and solving the result for \(y\).
Example 2 (Separation of Variables) The ODE \(y' = y\) can be solved for \(y \neq 0\) by separation of variables: \[ \frac{\mathrm{d}y}{\mathrm{d}x} = y \Rightarrow \frac{\mathrm{d}y}{y} = \mathrm{d}x \Rightarrow \int \frac{\mathrm{d}y}{y} = \int \mathrm{d}x \Rightarrow \ln\lvert y\rvert = x + C. \] The constants of integration arising on both sides have been combined into a single constant. The solution is now in implicit form. Solving for \(y\) yields \[ \lvert y\rvert = \mathrm{e}^{x+C} = \mathrm{e}^C \mathrm{e}^x \Rightarrow y = \pm \mathrm{e}^C \mathrm{e}^x = C_0 \mathrm{e}^x, \quad C_0 = \pm \mathrm{e}^C \neq 0. \] Since \(y = 0\) also solves the ODE \(y' = y\), the general solution is \[ y = C_0 \mathrm{e}^x, \quad C_0 \in \mathbb{R}. \]
Note: Logarithmic Terms
If logarithmic terms such as \(\ln\lvert y\rvert\) in the example above arise when integrating an ODE, it is convenient to write the constant of integration \(C\) in the form \(\ln\lvert C\rvert\). This is possible because, as \(C\) runs through all real numbers, so does \(\ln\lvert C\rvert\), see Figure 1.
\[ \ln\lvert y\rvert = x + \ln\lvert C\rvert \Rightarrow \ln \left\lvert\frac{y}{C}\right\rvert = x \Rightarrow y = \pm C \mathrm{e}^x \]
With \(C_0 = \pm C\) and including the solution \(y = 0\), the general solution of the ODE \(y' = y\) is therefore again \(y = C_0 \mathrm{e}^x\), \(C_0 \in \mathbb{R}\).
Example 3 (Separation of Variables with an Initial Value) We solve the initial value problem \[ x + xy' = 0, \qquad y(0) = 2. \] For \(x \neq 0\), we divide by \(x\) and obtain \(1 + y' = 0\), that is, \[ \frac{\mathrm{d}y}{\mathrm{d}x} = -1. \] The right-hand side depends neither on \(x\) nor on \(y\), so the variables are already separated. Integrating both sides of \(\mathrm{d}y = -\mathrm{d}x\) yields \[ \int \mathrm{d}y = -\int \mathrm{d}x \Rightarrow y = -x + C, \quad C \in \mathbb{R}. \] The initial condition \(y(0) = C = 2\) gives the solution of the initial value problem \[ y = 2 - x. \]
Example 4 (Separation of Variables with a Singular Solution) We determine the general solution of the ODE \[ y' + y^2 = 0. \] For \(y \neq 0\), we separate the variables and integrate: \[ \frac{\mathrm{d}y}{\mathrm{d}x} = -y^2 \Rightarrow -\frac{\mathrm{d}y}{y^2} = \mathrm{d}x \Rightarrow -\int \frac{\mathrm{d}y}{y^2} = \int \mathrm{d}x \Rightarrow \frac{1}{y} = x + C. \] Solving for \(y\) yields the general solution \[ y = \frac{1}{x + C}, \quad C \in \mathbb{R}. \] The zero function \(y = 0\) also solves the ODE, but it is not contained in the family of solutions for any value of \(C\). Such a solution is called singular. It must be stated separately.
Theorem 1 (Integration of an ODE by Substitution) A first-order ODE of the type \[ y' = f(ax+by+c) \] is transformed by the substitution \[ u = ax+by+c \tag{1}\] into the separable ODE \[ u' = a + b f(u) \] for the auxiliary function \(u = u(x)\).
Proof idea: Differentiating Equation 1 with respect to \(x\) yields \(u' = a + by' = a + bf(u)\). Proof: see the lecture notes.
Proposition 1 (Substitution \(u = y/x\)) A first-order ODE of the type \[ y' = f\left(\frac{y}{x}\right) \] is transformed by the substitution \(u = y/x\), i.e., \(y = xu\), into the separable ODE \[ u + xu' = f(u) \] for the auxiliary function \(u = u(x)\).
Both substitutions follow the same procedure: carry out the substitution, integrate the ODE for the auxiliary function \(u = u(x)\) by separation of variables, undo the substitution, and solve the equation for \(y\).
Example 5 (Substitution \(u = ax + by + c\)) We solve the ODE \[ y' = 2x - y. \] The right-hand side has the form \(f(ax+by+c)\) with \(a = 2\), \(b = -1\), \(c = 0\), and \(f(u) = u\). By Theorem 1, the substitution \[ u = 2x - y, \qquad u' = 2 - y', \] leads to the separable ODE \[ u' = 2 - u. \] Separation of variables yields \[ u = 2 - C\mathrm{e}^{-x}, \quad C \in \mathbb{R}. \] The back-substitution \(y = 2x - u\) yields the general solution \[ y = 2x - 2 + C\mathrm{e}^{-x}, \quad C \in \mathbb{R}. \]
Example 6 (Substitution \(u = y/x\)) We solve the ODE \[ y' = \frac{x+2y}{x} \qquad (x \neq 0). \] Splitting the right-hand side yields \[ y' = 1 + 2\,\frac{y}{x}, \] that is, the type \(y' = f(y/x)\) with \(f(u) = 1 + 2u\). By Proposition 1, the substitution \(u = y/x\), i.e., \(y = xu\), leads to \[ u + xu' = 1 + 2u \Rightarrow xu' = 1 + u. \] Separation of variables yields \(u = Cx - 1\), and the back-substitution \(y = xu\) yields the general solution \[ y = Cx^2 - x, \quad C \in \mathbb{R}. \]
Definition 5 (Exact ODE) A first-order ODE of the form \[ g(x;y)\, \mathrm{d}x + h(x;y)\, \mathrm{d}y = 0, \tag{2}\] in another notation \(y' = -g(x;y)/h(x;y)\), is called exact if the integrability condition \[ \frac{\partial g}{\partial y} = \frac{\partial h}{\partial x} \] is satisfied.
The continuous factor functions \(g(x;y)\) and \(h(x;y)\) of an exact ODE Equation 2 are the partial derivatives of an unknown function \(u(x;y)\): \(\;\partial u/\partial x = g(x;y)\), \(\;\partial u/\partial y = h(x;y)\). The general solution is then given in the implicit form \(u(x;y) = C\).
Example 7 (Exact Differential Equation) We solve the ODE \[ y' = \frac{\mathrm{d}y}{\mathrm{d}x} = \frac{2x+y}{y-x}. \] Multiplying by \((y - x)\,\mathrm{d}x\) yields \((y - x)\,\mathrm{d}y = (2x + y)\,\mathrm{d}x\). Bringing all terms to one side, we obtain the form Equation 2, \[ (2x + y)\,\mathrm{d}x + (x - y)\,\mathrm{d}y = 0, \] with the factor functions \(g(x;y) = 2x + y\) and \(h(x;y) = x - y\). The integrability condition is satisfied, \[ \frac{\partial g}{\partial y} = 1 = \frac{\partial h}{\partial x}, \] so the ODE is exact.
We determine \(u(x;y)\) in two steps. Integrating \(\partial u/\partial x = g(x;y)\) with respect to \(x\) yields \[ u(x;y) = \int (2x + y)\,\mathrm{d}x = x^2 + xy + K(y), \] where the constant of integration \(K(y)\) may still depend on \(y\). Differentiating with respect to \(y\) and comparing with \(h(x;y)\) gives \[ \frac{\partial u}{\partial y} = x + K'(y) = x - y \Rightarrow K'(y) = -y \Rightarrow K(y) = -\frac{y^2}{2}. \] The general solution in implicit form reads \[ x^2 + xy - \frac{y^2}{2} = C, \quad C \in \mathbb{R}. \] Solving this quadratic equation for \(y\) yields the explicit form \(y = x \pm \sqrt{3x^2 - 2C}\).
Definition 6 (Linear First-Order ODE) A first-order ODE is called linear if it can be written in the form \[ y' + f(x)\, y = g(x). \] The function \(f(x)\) is called the coefficient function, the function \(g(x)\) the forcing function. If the forcing function is absent, the ODE is called homogeneous, otherwise inhomogeneous.
The homogeneous linear first-order ODE \(y' + f(x)\, y = 0\) is separable. Separation of variables yields the general solution \[ y = C \mathrm{e}^{-\int f(x)\, \mathrm{d}x}, \quad C \in \mathbb{R}. \]
Example 8 (Homogeneous Linear First-Order ODE) We seek the general solution of \[ x^2 y' + y = 0 \quad \text{or} \quad y' + \frac{1}{x^2}\, y = 0, \qquad x \neq 0. \] For \(y \neq 0\), separation of variables and integration of both sides yield \[ \ln\lvert y\rvert = \frac{1}{x} + \ln\lvert K\rvert, \quad K \neq 0. \] With \(C = \pm K\), the general solution is \[ y = C \mathrm{e}^{1/x}, \quad C \in \mathbb{R}. \] The trivial solution \(y = 0\) is included as the special case \(C = 0\).
Example 9 (Homogeneous Linear First-Order ODE with an Initial Value) We seek the solution of the initial value problem \[ y' - 2xy = 0, \qquad y(0) = 5. \] Separation of variables yields the general solution \[ y = C \mathrm{e}^{x^2}, \quad C \in \mathbb{R}. \] The initial value gives \(y(0) = C \mathrm{e}^{0} = C = 5\). The initial value problem therefore has the solution \[ y = 5 \mathrm{e}^{x^2}. \]
The two examples follow Papula (2015, sec. IV.2.5.2).
An inhomogeneous linear first-order ODE \(y' + f(x)\, y = g(x)\) is solved by variation of constants in two steps.
Example 10 (Variation of Constants) We seek the general solution of \[ y' + \frac{y}{x} = \cos(x), \qquad x \neq 0. \] Separation of variables yields the general solution of the homogeneous ODE, \[ y_{\mathrm{h}} = \frac{C}{x}, \quad C \in \mathbb{R}. \] Variation of constants leads to the ansatz \(y = K(x)\, \frac{1}{x}\) with the derivative \[ y' = K'(x)\, \frac{1}{x} - K(x)\, \frac{1}{x^2} = \frac{K'(x)}{x} - \frac{K(x)}{x^2}. \]
Substituting into the inhomogeneous ODE yields \[ K'(x) = x \cos(x) \Rightarrow K(x) = \int x \cos(x)\, \mathrm{d}x. \] Integration by parts yields \[ K(x) = \cos(x) + x \sin(x) + C_0, \quad C_0 \in \mathbb{R}. \] The inhomogeneous ODE therefore has the general solution \[ y(x) = \frac{\cos(x) + x \sin(x) + C_0}{x}, \quad C_0 \in \mathbb{R}. \]
Example 11 (Variation of Constants with an Initial Value) We seek the general solution and the particular solution for the initial value \(y(1) = 2\) of the ODE \[ y' - 3y = x \mathrm{e}^{4x}. \]
To be calculated manually.
Theorem 2 (Solution Set of an Inhomogeneous Linear ODE) The general solution \(y = y(x)\) of an inhomogeneous linear first-order ODE \(y' + f(x)\, y = g(x)\) is the sum of the general solution \(y_{\mathrm{h}} = y_{\mathrm{h}}(x)\) of the associated homogeneous ODE \(y' + f(x)\, y = 0\) and an arbitrary particular solution \(y_{\mathrm{p}} = y_{\mathrm{p}}(x)\) of the inhomogeneous ODE: \[ y(x) = y_{\mathrm{h}}(x) + y_{\mathrm{p}}(x). \] This also holds for linear ODEs of higher order.
Proof idea: By linearity, the difference \(y - y_{\mathrm{p}}\) of two solutions solves the homogeneous ODE. Proof: see the lecture notes.
Theorem 3 (Procedure for Finding a Particular Solution) In many cases, an inhomogeneous linear first-order ODE \(y' + f(x)\,y = g(x)\) can be solved as follows:
Example 12 (Finding a Particular Solution) We seek the general solution of \[ y' - \tan(x)\, y = 2 \sin(x). \]
To be calculated manually.
Linear first-order ODEs with constant coefficients have the form \[ y' + ay = g(x), \qquad a \in \mathbb{R}. \tag{3}\] They are the special case of Definition 6 with the constant coefficient function \(f(x) = a\).
The associated homogeneous ODE \(y' + ay = 0\) is solved by separation of variables or by the exponential ansatz \(y_{\mathrm{h}} = C \mathrm{e}^{\lambda x}\). Substitution yields the characteristic equation for the parameter \(\lambda\): \[ y_{\mathrm{h}}' + a y_{\mathrm{h}} = \lambda C \mathrm{e}^{\lambda x} + a C \mathrm{e}^{\lambda x} = 0 \Rightarrow \lambda + a = 0 \Rightarrow \lambda = -a, \qquad\text{hence}\qquad y_{\mathrm{h}} = C \mathrm{e}^{-ax}. \]
Example 13 (Homogeneous Linear ODE with Constant Coefficients) The general solution \(y_{\mathrm{h}} = C \mathrm{e}^{-ax}\) with \(C \in \mathbb{R}\) can be stated directly:
The inhomogeneous ODE Equation 3 is integrated either by variation of constants or by finding a particular solution according to Theorem 3. Since the ansatz for \(y_{\mathrm{p}}\) here depends essentially on the function type of the forcing function \(g(x)\), the second method is usually more convenient.
Example 14 (Linear ODE with Constant Coefficients) We seek the general solution of \[ y' + 2y = 2x^2 - 4. \]
To be calculated manually.
Example 15 (Linear ODE with Constant Coefficients and an Initial Value) We seek the solution of the initial value problem \[ y' + 5y = -26 \sin(x), \qquad y(0) = 0. \]
To be calculated manually.
Example 16 (Radioactive Decay) Let \(n = n(t)\) be the number of atomic nuclei of a radioactive substance still present at time \(t\). The number \(\mathrm{d}n\) of nuclei decaying in a short time interval \(\mathrm{d}t\) is proportional both to \(\mathrm{d}t\) and to \(n\). With the radioactive decay constant \(\lambda > 0\), we therefore have \[ \mathrm{d}n = -\lambda n\, \mathrm{d}t \quad \text{or} \quad \frac{\mathrm{d}n}{\mathrm{d}t} + \lambda n = 0. \] Its general solution is \(n(t) = C \mathrm{e}^{-\lambda t}\), \(C \in \mathbb{R}\). If \(n(0) = n_0\) is the initial number of nuclei, then \(C = n_0\), which yields the law of radioactive decay \[ n(t) = n_0 \mathrm{e}^{-\lambda t}, \quad t \geq 0. \]
Example 17 (AC Circuit) An ohmic resistor \(R\) and an inductor \(L\) are connected in series to a voltage source with the sinusoidal alternating voltage \(u(t) = \hat{u} \sin(\omega t)\). By Kirchhoff’s voltage law, the sum of the partial voltages \(u_L(t) = L\, \mathrm{d}i/\mathrm{d}t\) (law of induction) and \(u_R(t) = R i\) (Ohm’s law) equals the applied voltage. The current \(i = i(t)\) therefore satisfies the inhomogeneous linear first-order ODE \[ L \frac{\mathrm{d}i}{\mathrm{d}t} + R i = \hat{u} \sin(\omega t). \] The homogeneous ODE \(L\, \mathrm{d}i/\mathrm{d}t + R i = 0\) has the general solution \[ i_{\mathrm{h}}(t) = C \mathrm{e}^{-\frac{R}{L} t}, \quad C \in \mathbb{R}. \] For the particular solution we choose the ansatz \[ i_{\mathrm{p}}(t) = \hat{\imath} \sin(\omega t + \varphi) \] with the peak value \(\hat{\imath}\) and the zero phase angle \(\varphi\).
Substituting into the ODE, applying the addition theorems, and comparing coefficients lead to the nonlinear system of equations \[\begin{align*} R \hat{\imath} \cos\varphi - \omega L \hat{\imath} \sin\varphi &= \hat{u}, \\ \omega L \hat{\imath} \cos\varphi + R \hat{\imath} \sin\varphi &= 0. \end{align*}\] Squaring and adding both equations eliminates \(\varphi\), since \(\sin^2\varphi + \cos^2\varphi = 1\): \[ \left( R^2 + (\omega L)^2 \right) \hat{\imath}^2 = \hat{u}^2 \Rightarrow \hat{\imath} = \frac{\hat{u}}{\sqrt{R^2 + (\omega L)^2}}. \] The second equation gives \(\tan\varphi = -\omega L/R\). The general solution is therefore \[ i(t) = C \mathrm{e}^{-\frac{R}{L} t} + \frac{\hat{u}}{\sqrt{R^2 + (\omega L)^2}} \sin\left( \omega t - \arctan\left( \frac{\omega L}{R} \right) \right), \quad t \geq 0. \] What remains is the steady-state solution \(i_{\mathrm{p}}(t)\), an alternating current with the peak value \(\hat{\imath} = \hat{u}/Z\), where \(Z = \sqrt{R^2 + (\omega L)^2}\) is the impedance of the circuit.
Definition 7 (Linear Second-Order ODE with Constant Coefficients) A linear second-order ODE with constant coefficients is an ODE of the form \[ y'' + a y' + b y = g(x), \qquad a, b \in \mathbb{R}. \] It is called homogeneous if the forcing function \(g(x)\) is absent, otherwise inhomogeneous.
Example 18 (Linear and Nonlinear Second-Order ODEs 1) The ODEs \[ y'' + y = 0, \qquad y'' + 2y' - 3y = 2x - 4 \qquad \text{and} \qquad 2y'' - 4y' + 20y = \cos(x) \] are linear with constant coefficients. The first is homogeneous, the other two are inhomogeneous. After division by \(2\), the third takes the form of Definition 7.
Example 19 (Linear and Nonlinear Second-Order ODEs 2) The ODEs \[ y'' + x y' + y = 0 \qquad \text{and} \qquad x^3 y'' + x^2 y' - x y = \mathrm{e}^{x} \] are linear but have nonconstant coefficients.
Example 20 (Linear and Nonlinear Second-Order ODEs 3) The ODEs \[ y'' + y' + y^2 = 0 \qquad \text{and} \qquad y' y'' + y = x \] are nonlinear: in the first, \(y\) appears to the second power, and the second contains the product \(y' y''\).
Example 21 (Solutions of the Oscillation Equation) The oscillation equation \[ y'' + \omega^2 y = 0, \qquad \omega > 0, \] has, among others, the solutions \(y_1 = \sin(\omega x)\) and \(y_2 = \cos(\omega x)\).
To be calculated manually.
Example 22 (Complex Solution of the Oscillation Equation) The oscillation equation \(y'' + \omega^2 y = 0\) is also solved by the complex-valued exponential function \(y = \mathrm{e}^{\mathrm{j}\omega x}\). With \(y' = \mathrm{j}\omega\, \mathrm{e}^{\mathrm{j}\omega x}\) and \(y'' = \mathrm{j}^2 \omega^2 \mathrm{e}^{\mathrm{j}\omega x} = -\omega^2 \mathrm{e}^{\mathrm{j}\omega x}\), it follows that \[ y'' + \omega^2 y = -\omega^2 \mathrm{e}^{\mathrm{j}\omega x} + \omega^2 \mathrm{e}^{\mathrm{j}\omega x} = 0. \] Since the coefficients are real, the real and imaginary parts of \(y\) are real solutions as well. Euler’s formula gives \[ y_1 = \operatorname{Re}\left( \mathrm{e}^{\mathrm{j}\omega x} \right) = \cos(\omega x) \quad \text{and} \quad y_2 = \operatorname{Im}\left( \mathrm{e}^{\mathrm{j}\omega x} \right) = \sin(\omega x), \] i.e., the solutions already known from Example 21.
Definition 8 (Wronskian and Basis Solutions) Two solutions \(y_1 = y_1(x)\) and \(y_2 = y_2(x)\) of a homogeneous linear second-order ODE with constant coefficients of the type \[ y'' + ay' + by = 0 \] are called basis solutions if their Wronskian \[ W(y_1; y_2) = \left| \begin{array}{cc} y_1 & y_2 \\ y_1' & y_2' \end{array} \right| = y_1 y_2' - y_1' y_2 \] is nonzero, \(W(y_1; y_2) \neq 0\).
Theorem 4 (General Solution of a Homogeneous Linear Second-Order ODE with Constant Coefficients) According to Papula (2015), the general solution of a homogeneous linear second-order ODE with constant coefficients of the type \[ y'' + a y' + b y = 0 \] is the linear combination of two linearly independent solutions (basis solutions) \(y_1\) and \(y_2\): \[ y(x) = C_1 y_1(x) + C_2 y_2(x), \quad C_1, C_2 \in \mathbb{R}. \]
Example 23 (Wronskian of the Oscillation Equation) The solutions \(y_1 = \sin(\omega x)\) and \(y_2 = \cos(\omega x)\) of the oscillation equation \(y'' + \omega^2 y = 0\) have the Wronskian \[ W(y_1; y_2) = \left| \begin{array}{cc} \sin(\omega x) & \cos(\omega x) \\ \omega \cos(\omega x) & -\omega \sin(\omega x) \end{array} \right| = -\omega \left[ \sin^2(\omega x) + \cos^2(\omega x) \right] = -\omega \neq 0. \] They are therefore basis solutions, and by Theorem 4 the general solution of the oscillation equation is \(y(x) = C_1 \sin(\omega x) + C_2 \cos(\omega x)\), \(C_1, C_2 \in \mathbb{R}\).
Example 24 (Wronskian of Two Exponential Functions) The homogeneous ODE \(y'' - 4y' - 5y = 0\) has, among others, the solutions \(y_1 = \mathrm{e}^{5x}\) and \(y_2 = \mathrm{e}^{-x}\), as substitution confirms. The Wronskian decides whether they are basis solutions: \[ W(y_1; y_2) = \left| \begin{array}{cc} \mathrm{e}^{5x} & \mathrm{e}^{-x} \\ 5\mathrm{e}^{5x} & -\mathrm{e}^{-x} \end{array} \right| = -\mathrm{e}^{4x} - 5\mathrm{e}^{4x} = -6\mathrm{e}^{4x} \neq 0. \] The two solutions are thus basis solutions, and the general solution is \(y(x) = C_1 \mathrm{e}^{5x} + C_2 \mathrm{e}^{-x}\), \(C_1, C_2 \in \mathbb{R}\).
A fundamental basis of the homogeneous ODE \[ y'' + a y' + b y = 0 \] can be determined with the ansatz \(y = \mathrm{e}^{\lambda x}\). Substitution into the homogeneous ODE yields the characteristic equation \[ \lambda^2 + a \lambda + b = 0. \] Its solutions are \(\lambda_{1,2} = -a/2 \pm \sqrt{a^2/4 - b}\).
Proposition 2 (Basis Solutions According to the Roots of the Characteristic Equation) The basis solutions \(y_1\) and \(y_2\) of the homogeneous ODE \(y'' + ay' + by = 0\) depend on the nature of the solutions \(\lambda_1\) and \(\lambda_2\) of the characteristic equation \(\lambda^2 + a\lambda + b = 0\):
In all three cases: \(y(x) = C_1 y_1(x) + C_2 y_2(x)\), \(C_1, C_2 \in \mathbb{R}\), by Theorem 4. Proof idea: substitution and Wronskian. Proof: see the lecture notes.
Example 25 (Two Distinct Real Solutions) The ODE \(y'' + 2y' - 8y = 0\).
To be calculated manually.
Example 26 (Double Real Solution) The ODE \(y'' - 8y' + 16y = 0\).
To be calculated manually.
Example 27 (Complex Conjugate Solutions) The ODE \(y'' + 4y' + 13y = 0\).
To be calculated manually.
Example 28 (Homogeneous Linear Second-Order ODE) \(y'' + 3y' - 4y = 0\).
To be calculated manually.
Example 29 (Further Homogeneous Linear Second-Order ODE) \(y'' + 4y' + 20y = 0\).
To be calculated manually.
Example 30 (Further Homogeneous Linear Second-Order ODE) \(y'' + 20y' + 100y = 0\).
To be calculated manually.
As for linear first-order ODEs (Theorem 2), the following holds:
Theorem 5 (Solution Set of an Inhomogeneous Linear Second-Order ODE with Constant Coefficients) The general solution of an inhomogeneous linear second-order ODE with constant coefficients of the type \(y'' + a y' + b y = g(x)\) is the sum of the general solution \(y_{\mathrm{h}}\) of the associated homogeneous ODE \(y'' + a y' + b y = 0\) and an arbitrary particular solution \(y_{\mathrm{p}}\) of the inhomogeneous ODE: \[ y(x) = y_{\mathrm{h}}(x) + y_{\mathrm{p}}(x). \]
The solution procedure thus corresponds to finding a particular solution for linear first-order ODEs (Theorem 3). The ansatz for \(y_{\mathrm{p}}\) depends essentially on the type of the forcing function \(g(x)\).
| Forcing function \(g(x)\) | Case | Ansatz \(y_{\mathrm{p}}(x)\) | Parameters |
|---|---|---|---|
| 1. Polynomial function \(P_n(x)\) | \(b \neq 0\) | \(Q_n(x)\) | Coefficients of \(Q_n\) |
| \(a \neq 0\), \(b = 0\) | \(x\, Q_n(x)\) | Coefficients of \(Q_n\) | |
| \(a = b = 0\) | \(x^2\, Q_n(x)\) | Coefficients of \(Q_n\) | |
| 2. Exponential function \(\mathrm{e}^{cx}\) | \(c\) is not a solution of the characteristic equation | \(A\, \mathrm{e}^{cx}\) | \(A\) |
| \(c\) is an \(r\)-fold solution (\(r = 1, 2\)) | \(A\, x^r\, \mathrm{e}^{cx}\) | \(A\) | |
| 3. \(P_n(x)\, \mathrm{e}^{cx}\) | \(c\) is not a solution of the characteristic equation | \(Q_n(x)\, \mathrm{e}^{cx}\) | Coefficients of \(Q_n\) |
| \(c\) is an \(r\)-fold solution (\(r = 1, 2\)) | \(x^r\, Q_n(x)\, \mathrm{e}^{cx}\) | Coefficients of \(Q_n\) |
| Forcing function \(g(x)\) | Case | Ansatz \(y_{\mathrm{p}}(x)\) | Parameters |
|---|---|---|---|
| 4. \(\sin(\beta x)\), \(\cos(\beta x)\), or a linear combination of both | \(\mathrm{j}\beta\) is not a solution of the characteristic equation | \(A \sin(\beta x) + B \cos(\beta x)\) | \(A\), \(B\) |
| \(\mathrm{j}\beta\) is a solution | \(x\, [A \sin(\beta x) + B \cos(\beta x)]\) | \(A\), \(B\) | |
| 5. \(P_n(x)\, \mathrm{e}^{cx} \sin(\beta x)\) or \(P_n(x)\, \mathrm{e}^{cx} \cos(\beta x)\) | \(c + \mathrm{j}\beta\) is not a solution of the characteristic equation | \(\mathrm{e}^{cx}\, [Q_n(x) \sin(\beta x) + R_n(x) \cos(\beta x)]\) | Coefficients of \(Q_n\), \(R_n\) |
| \(c + \mathrm{j}\beta\) is a solution | \(x\, \mathrm{e}^{cx}\, [Q_n(x) \sin(\beta x) + R_n(x) \cos(\beta x)]\) | Coefficients of \(Q_n\), \(R_n\) |
The following remarks apply to Table 1:
Example 31 (Linear Second-Order ODE with Constant Coefficients) We seek the general solution of \[ y'' + 10 y' - 24y = 12 x^2 + 14 x + 1. \]
To be calculated manually.
Example 32 (Ansatz Functions for Different Forcing Functions) We solve the inhomogeneous ODE \(y'' + y' - 2y = g(x)\) for six different forcing functions \(g(x)\). The homogeneous ODE \(y'' + y' - 2y = 0\) has the characteristic equation \(\lambda^2 + \lambda - 2 = 0\) with the solutions \(\lambda_1 = 1\) and \(\lambda_2 = -2\) and hence the general solution \[ y_{\mathrm{h}} = C_1 \mathrm{e}^{x} + C_2 \mathrm{e}^{-2x}, \quad C_1, C_2 \in \mathbb{R}. \] If the exponent \(c\) of a forcing function \(\mathrm{e}^{cx}\) is itself a solution of the characteristic equation, the ansatz is multiplied by \(x\):
| Forcing function \(g(x)\) | Ansatz \(y_{\mathrm{p}}\) | Reason |
|---|---|---|
| \(10x + 1\) | \(a_1 x + a_0\) | polynomial, \(b = -2 \neq 0\) |
| \(x^2 - 4x + 3\) | \(a_2 x^2 + a_1 x + a_0\) | polynomial, \(b = -2 \neq 0\) |
| \(3\mathrm{e}^{4x}\) | \(A \mathrm{e}^{4x}\) | \(c = 4\) is not a solution |
| \(6\mathrm{e}^{x}\) | \(A x \mathrm{e}^{x}\) | \(c = 1\) is a simple solution |
| \(x \mathrm{e}^{x}\) | \(x \mathrm{e}^{x} (a_1 x + a_0)\) | \(c = 1\) is a simple solution |
| \(3 \sin(2x)\) | \(A \sin(2x) + B \cos(2x)\) | \(2\mathrm{j}\) is not a solution |
Example 33 (Forcing Function Consisting of Several Terms) We seek the general solution of \[ y'' - 6y' + 9y = 2\mathrm{e}^{x} + 9x - 15. \] The homogeneous ODE \(y'' - 6y' + 9y = 0\) has the characteristic equation \(\lambda^2 - 6\lambda + 9 = (\lambda - 3)^2 = 0\) with the double solution \(\lambda_{1,2} = 3\) and hence the general solution \[ y_{\mathrm{h}} = (C_1 + C_2 x)\, \mathrm{e}^{3x}, \quad C_1, C_2 \in \mathbb{R}. \] The forcing function consists of the terms \(g_1(x) = 2\mathrm{e}^{x}\) and \(g_2(x) = 9x - 15\). The corresponding ansatz functions are \(y_{\mathrm{p}1} = A\mathrm{e}^{x}\) and \(y_{\mathrm{p}2} = a_1 x + a_0\). Since the ODE is linear, the sum \[ y_{\mathrm{p}} = y_{\mathrm{p}1} + y_{\mathrm{p}2} = A\mathrm{e}^{x} + a_1 x + a_0 \] is a suitable ansatz for \(g = g_1 + g_2\). Comparing coefficients gives \(A = 1/2\), \(a_1 = 1\), and \(a_0 = -1\). The general solution is \[ y = (C_1 + C_2 x)\, \mathrm{e}^{3x} + \frac{1}{2}\mathrm{e}^{x} + x - 1, \quad C_1, C_2 \in \mathbb{R}. \]
Theorem 6 (Newton’s Three Laws of Motion)
Here and in the following, dots denote derivatives with respect to time, \(\dot{x} = \mathrm{d}x/\mathrm{d}t\) and \(\ddot{x} = \mathrm{d}^2x/\mathrm{d}t^2\).
Theorem 7 (Hooke’s Law) The force exerted on an elastic body is directly proportional to its deformation: \[ F = -cx, \] where \(F\) is the force exerted on the body, \(c\) the spring constant, and \(x\) the displacement of the body from its rest position.
Definition 9 (Mass-Spring Oscillator) A mass-spring oscillator (spring pendulum) consists of a mass \(m\) that hangs from a spring with the spring constant \(c > 0\) and is slowed down by a damper with the damper constant \(b \geq 0\), see Figure 2. Its displacement \(x(t)\) is measured from the rest position \(x = 0\); \(v = \dot{x}\) is its velocity. In addition, an external force \(F(t)\) can act on the mass.
Three forces act on the mass:
By Newton’s second law, \(m\ddot{x} = F_1 + F_2 + F_3\), from which the second-order ODE \[ m \ddot{x} = -cx - b \dot{x} + F(t) \quad \text{or} \quad m \ddot{x} + b\dot{x} + cx = F(t) \] follows.
Definition 10 (Differential Equation of a Mechanical Oscillation (Oscillation Equation)) The motion of a mass-spring oscillator (Definition 9) is described by the linear second-order ODE with constant coefficients \[ m \ddot{x} + b \dot{x} + c x = F(t) \tag{7}\] It is called the oscillation equation. Here, \(m\) is the mass, \(b\) the damper constant, \(c\) the spring constant, and \(F(t)\) the time-dependent external force acting on the system.
Three special types of oscillation are distinguished:
In what follows, we need the addition theorems for sine and cosine as well as the representation of a linear combination of sine and cosine as a phase-shifted sine oscillation.
Theorem 8 (Addition Theorem for the Sine) \[ \sin(x+y) = \sin(x)\cos(y) + \cos(x)\sin(y) \]
Lemma 1 (Phase-Shifted Sine Oscillation) For \(C_1, C_2 \in \mathbb{R}\), not both zero, \[ C_1 \sin(x) + C_2 \cos(x) = A \sin(x + \varphi) \] holds with the amplitude \(A = \sqrt{C_1^2 + C_2^2}\) and the phase angle \(\varphi\), which is uniquely determined up to multiples of \(2\pi\) by \(\cos(\varphi) = C_1/A\) and \(\sin(\varphi) = C_2/A\). Depending on the quadrant, \[ \varphi = \begin{cases} \arctan(C_2/C_1) & \text{for } C_1 > 0, \\ \arctan(C_2/C_1) + \pi & \text{for } C_1 < 0, \\ \pi/2 & \text{for } C_1 = 0,\ C_2 > 0, \\ -\pi/2 & \text{for } C_1 = 0,\ C_2 < 0. \end{cases} \]
Proof idea: \((C_1/A, C_2/A)\) lies on the unit circle; then apply the addition theorem. Proof: see the lecture notes.
Remark 1 (Computing the Phase Angle in Python). In Python, numpy.arctan2(C2, C1) computes the phase angle without a case distinction.
Theorem 9 (General Solution of the Free Undamped Oscillation) In the simplest case, without damping and without external force, the ODE (equation of motion) of the spring pendulum reads \[ m \ddot{x} + cx = 0 \quad \text{or} \quad \ddot{x} + \omega_0^2 x = 0 \tag{8}\] with \(\omega_0^2 = c/m\). The characteristic equation \(\lambda^2 + \omega_0^2 = 0\) has the complex conjugate solutions \(\lambda_{1,2} = \pm \mathrm{j} \omega_0\). By Equation 5, the fundamental basis is then \(y_1 = \sin(\omega_0 t)\) and \(y_2 = \cos(\omega_0 t)\), from which the general solution follows: \[ x(t) = C_1 \sin(\omega_0 t) + C_2 \cos(\omega_0 t), \tag{9}\] with the angular frequency \(\omega_0 = \sqrt{c/m}\) and \(C_1, C_2 \in \mathbb{R}\).
Remark 2 (Alternative Representation of the Phase-Shifted Sine Oscillation). By Lemma 1, the general solution Equation 9 can also be represented as a phase-shifted sine oscillation \(x(t) = A \sin(\omega_0 t + \varphi)\), \(t \geq 0\), with the amplitude \(A\) of the oscillation.
Lemma 2 (Period of the Oscillation) The system oscillates harmonically with the angular frequency \(\omega_0 = \sqrt{c/m}\), which is called the natural angular frequency (natural frequency for short). It has the period of oscillation \[ T = \frac{2\pi}{\omega_0} = 2\pi \sqrt{m/c}, \] see Figure 3.
The natural angular frequency \(\omega_0 = \sqrt{c/m}\) depends only on the ratio of the spring constant \(c\) to the mass \(m\), not on the amplitude. Writing the equation of motion Equation 8 in the form \[ \ddot{x} = -\frac{c}{m}\, x = -\omega_0^2\, x, \] reveals the reason: for the same displacement \(x\), the acceleration of the mass toward the rest position is the larger, the larger \(c/m\) is.
If \(c\) and \(m\) change by the same factor, \(\omega_0\) remains unchanged.
Animation: Harmonic Oscillation and Mass-Spring Oscillator
The animation at https://advm1.gm.fh-koeln.de/~bartz/bart26y/ shows Figure 3 and the mass-spring oscillator from Figure 2 (without external force) side by side. The mass \(m\), the spring constant \(c\), and the initial conditions \(x(0)\) and \(v(0)\) can be adjusted; the amplitude \(A\), the phase angle \(\varphi\), and the period \(T\) adapt accordingly. For an easier visualization, the animation shows the displacement as positive upward, so that the mass and the point on the curve are at the same height; the checkbox “x positive downward” sets the direction of Figure 2. The equation of motion does not change.
Example 34 (Undamped Oscillation Starting from Rest) Let the system start from rest with the displacement \(x_0\) and the velocity \(v_0 = 0\).
To be calculated manually.
Example 35 (Free Undamped Oscillation) We investigate the motion of an oscillatory mechanical system with the mass \(m = 10\) kg and the spring constant \(c = 250\) N/m under the initial conditions \[ x(0) = 0.6\,\text{m} \quad \text{and} \quad v(0) = 0\,\text{m/s}. \] The natural angular frequency of the system is \[ \omega_0 = \sqrt{\frac{c}{m}} = \sqrt{\frac{250\,\text{N/m}}{10\,\text{kg}}} = 5\,\text{s}^{-1}. \] From \(x(0) = C_2 = 0.6\) and \(\dot{x}(0) = 5C_1 = 0\) it follows that \(C_1 = 0\) and \(C_2 = 0.6\). The system thus oscillates harmonically according to \[ x(t) = 0.6\,\text{m} \cdot \cos(5\,\text{s}^{-1} \cdot t), \quad t \geq 0. \] The period is \(T = 2\pi/\omega_0 = 0.4\pi\,\text{s} \approx 1.26\,\text{s}\), the amplitude \(A = 0.6\) m.
What does the value \(\omega_0 = 5\,\text{s}^{-1}\) mean? The system neither performs five oscillations per second, nor does one oscillation take five seconds. The natural angular frequency states how fast the phase angle \(\omega_0 t\) in the argument of the cosine grows, here by \(5\) rad per second; the unit \(\text{s}^{-1}\) is to be read as rad/s.
The number of full oscillations per second is the frequency \[ \nu_0 = \frac{\omega_0}{2\pi} = \frac{1}{T} = \frac{5}{2\pi}\,\text{s}^{-1} \approx 0.80\,\text{Hz}. \] In one second, the system thus performs about \(0.8\) full oscillations; five full oscillations take \(5T \approx 6.3\) s. Angular frequency and frequency differ by the factor \(2\pi\).
In a free damped oscillation, a damping force acts on the mass in addition to the restoring force. The ODE of the spring pendulum then reads \(m \ddot{x} + b \dot{x} + cx = 0\) or \[ \ddot{x} + 2\delta \dot{x} + \omega_0^2 x = 0 \tag{10}\] with the damping factor \(\delta = b/(2m)\) and the natural angular frequency \(\omega_0 = \sqrt{c/m}\). The associated characteristic equation \[ \lambda^2 + 2\delta \lambda + \omega_0^2 = 0 \tag{11}\] has the solutions \(\lambda_{1,2} = -\delta \pm \sqrt{\delta^2 - \omega_0^2}\), whose nature is decided by the discriminant \(\Delta = \delta^2 - \omega_0^2\):
Theorem 10 (General Solution of the Equation of Motion of a Free Damped Spring Pendulum) The solutions of Equation 10 belong to one of three types of oscillation:
Weakly damped oscillation (\(\delta < \omega_0\)): The characteristic equation has the complex conjugate solutions \(\lambda_{1,2} = -\delta \pm \mathrm{j} \sqrt{\omega_0^2 - \delta^2} = -\delta \pm \mathrm{j} \omega_{\mathrm{d}}\), where \(\omega_{\mathrm{d}} = \sqrt{\omega_0^2 - \delta^2}\) is the natural angular frequency of the damped system. The general solution is \[ x(t) = \mathrm{e}^{-\delta t} \left[ C_1 \sin(\omega_{\mathrm{d}} t) + C_2 \cos(\omega_{\mathrm{d}} t) \right] \quad\text{or equivalently}\quad x(t) = A_{\mathrm{d}} \mathrm{e}^{-\delta t} \sin(\omega_{\mathrm{d}} t + \varphi_{\mathrm{d}}) \] with \(C_1, C_2 \in \mathbb{R}\) or with the amplitude \(A_{\mathrm{d}} > 0\) and the phase angle \(0 \leq \varphi_{\mathrm{d}} \leq 2\pi\), respectively.
Aperiodic limiting case (\(\delta = \omega_0\)): The characteristic equation has the double real solution \(\lambda_{1,2} = -\delta\). The general solution is \[ x(t) = \left[ C_1 t + C_2 \right] \mathrm{e}^{-\delta t} \tag{12}\] with \(C_1, C_2 \in \mathbb{R}\).
Aperiodic motion under strong damping (overdamped case, \(\delta > \omega_0\)): The characteristic equation has two distinct real negative solutions \(\lambda_1\) and \(\lambda_2\). The general solution is \(x(t) = C_1 \mathrm{e}^{\lambda_1 t} + C_2 \mathrm{e}^{\lambda_2 t}\) with \(C_1, C_2 \in \mathbb{R}\).
Theorem 11 (General Solution of the Equation of Motion of a Free Damped Spring Pendulum under Weak Damping) Under weak damping, \(\Delta = \delta^2 - \omega_0^2 < 0\), i.e., \(\delta < \omega_0\). With the abbreviation \(\omega_{\mathrm{d}}^2 = \omega_0^2 - \delta^2 > 0\), Equation 11 has the solutions \(\lambda_{1,2} = -\delta \pm \mathrm{j} \omega_{\mathrm{d}}\). The general solution reads \[ x(t) = A_{\mathrm{d}} \mathrm{e}^{-\delta t} \sin(\omega_{\mathrm{d}} t + \varphi_{\mathrm{d}}). \tag{13}\]
This is a damped oscillation whose natural angular frequency is reduced compared with the undamped oscillation, \(\omega_{\mathrm{d}} = \sqrt{\omega_0^2 - \delta^2} < \omega_0\).
Example 36 (Weakly Damped Oscillation Starting from Rest) Consider the free damped oscillation Equation 10, \[ m \ddot{x} + b \dot{x} + cx = 0 \qquad \text{or} \qquad \ddot{x} + 2\delta \dot{x} + \omega_0^2 x = 0, \] with the damping factor \(\delta = b/(2m) > 0\) and the natural angular frequency \(\omega_0 = \sqrt{c/m}\) of the undamped system. Let the system be weakly damped (\(\delta < \omega_0\)) and start from rest at time \(t = 0\) with the displacement \(x_0 = A > 0\) and the velocity \(v_0 = 0\). We seek the amplitude \(A_{\mathrm{d}}\) and the phase angle \(\varphi_{\mathrm{d}}\) of the particular solution.
Approach. The starting point is the general solution for weak damping (case 1 in Theorem 10) \[ x(t) = A_{\mathrm{d}} \mathrm{e}^{-\delta t} \sin(\omega_{\mathrm{d}} t + \varphi_{\mathrm{d}}), \qquad \omega_{\mathrm{d}} = \sqrt{\omega_0^2 - \delta^2} > 0, \] with \(A_{\mathrm{d}} > 0\). The two parameters are determined from the initial conditions.
Step 1: Velocity. By the product rule, \[ \dot{x}(t) = A_{\mathrm{d}} \mathrm{e}^{-\delta t} \left[ \omega_{\mathrm{d}} \cos(\omega_{\mathrm{d}} t + \varphi_{\mathrm{d}}) - \delta \sin(\omega_{\mathrm{d}} t + \varphi_{\mathrm{d}}) \right]. \]
Step 2: Initial conditions. For \(t = 0\), \(\mathrm{e}^{0} = 1\), so \[ x(0) = A_{\mathrm{d}} \sin \varphi_{\mathrm{d}} = A, \qquad \dot{x}(0) = A_{\mathrm{d}} \left( \omega_{\mathrm{d}} \cos \varphi_{\mathrm{d}} - \delta \sin \varphi_{\mathrm{d}} \right) = 0. \]
Step 3: Phase angle. Since \(A_{\mathrm{d}} \neq 0\), the second equation yields \(\omega_{\mathrm{d}} \cos \varphi_{\mathrm{d}} = \delta \sin \varphi_{\mathrm{d}}\). The first equation yields \(\sin \varphi_{\mathrm{d}} = A/A_{\mathrm{d}} > 0\), so \(\delta > 0\) and \(\omega_{\mathrm{d}} > 0\) imply \(\cos \varphi_{\mathrm{d}} > 0\) as well. The angle therefore lies in the first quadrant, \(0 < \varphi_{\mathrm{d}} < \pi/2\), and division by \(\delta \cos \varphi_{\mathrm{d}}\) gives \[ \tan \varphi_{\mathrm{d}} = \frac{\omega_{\mathrm{d}}}{\delta} \qquad \Longrightarrow \qquad \varphi_{\mathrm{d}} = \arctan\left(\frac{\omega_{\mathrm{d}}}{\delta}\right). \]
Step 4: Sine of the phase angle. For \(0 < \varphi_{\mathrm{d}} < \pi/2\), \(\sin \varphi_{\mathrm{d}} = \tan \varphi_{\mathrm{d}} / \sqrt{1 + \tan^2 \varphi_{\mathrm{d}}}\). With \(\delta^2 + \omega_{\mathrm{d}}^2 = \delta^2 + \omega_0^2 - \delta^2 = \omega_0^2\), it follows that \[ \sin \varphi_{\mathrm{d}} = \frac{\omega_{\mathrm{d}}/\delta}{\sqrt{1 + \omega_{\mathrm{d}}^2/\delta^2}} = \frac{\omega_{\mathrm{d}}}{\sqrt{\delta^2 + \omega_{\mathrm{d}}^2}} = \frac{\omega_{\mathrm{d}}}{\omega_0} \qquad \text{and likewise} \qquad \cos \varphi_{\mathrm{d}} = \frac{\delta}{\omega_0}. \]
Step 5: Amplitude. Substituting into the first initial condition \(A_{\mathrm{d}} \sin \varphi_{\mathrm{d}} = A\) yields \[ A_{\mathrm{d}} = \frac{A}{\sin \varphi_{\mathrm{d}}} = \frac{\omega_0}{\omega_{\mathrm{d}}} A. \]
Result. The particular solution is \[ x(t) = A_{\mathrm{d}} \mathrm{e}^{-\delta t} \sin(\omega_{\mathrm{d}} t + \varphi_{\mathrm{d}}) \quad \text{with} \quad A_{\mathrm{d}} = \frac{\omega_0}{\omega_{\mathrm{d}}}A \quad \text{and} \quad \varphi_{\mathrm{d}} = \arctan\left(\frac{\omega_{\mathrm{d}}}{\delta}\right). \]
Example 37 (Weak Damping) Consider an oscillatory mechanical system with the mass \(m = 10\) kg, the damper constant \(b = 80\) kg/s, and the spring constant \(c = 250\) N/m. The initial conditions are \(x(0) = 0.6\,\text{m}\) and \(v(0) = 0\,\text{m/s}\).
To be calculated manually.
Theorem 12 (General Solution of the Equation of Motion of a Free Damped Spring Pendulum under Strong Damping) Under strong damping, \(\Delta = \delta^2 - \omega_0^2 > 0\), i.e., \(\delta > \omega_0\). The characteristic equation Equation 11 then has the two distinct real solutions \[ \lambda_{1,2} = -\delta \pm \sqrt{\delta^2 - \omega_0^2}, \] i.e., \(\lambda_2 < \lambda_1 < 0\). The general solution of the ODE Equation 10 is a linear combination of two monotonically decreasing exponential functions, \[ x(t) = C_1 \mathrm{e}^{\lambda_1 t} + C_2 \mathrm{e}^{\lambda_2 t}, \quad C_1, C_2 \in \mathbb{R}. \tag{14}\] The mechanical system no longer oscillates but approaches the equilibrium state asymptotically.
Example 38 (Overdamped Case: Motion Starting from Rest) If the system starts from rest, the initial conditions are \(x(0) = A\) and \(v(0) = 0\). For the coefficients of the general solution Equation 14, this yields the linear system of equations \[\begin{align*} C_1 + C_2 &= A, \\ \lambda_1 C_1 + \lambda_2 C_2 &= 0 \end{align*}\] with the solutions \(C_1 = \frac{\lambda_2}{\lambda_2 - \lambda_1} A\) and \(C_2 = \frac{\lambda_1}{\lambda_1 - \lambda_2} A\). The particular solution is therefore \[ x(t) = \frac{\lambda_2}{\lambda_2 - \lambda_1} A \mathrm{e}^{\lambda_1 t} + \frac{\lambda_1}{\lambda_1 - \lambda_2} A \mathrm{e}^{\lambda_2 t}, \] see Figure 9.
Example 39 (Overdamped Case: Motion Starting from the Equilibrium Position) If the system starts from the equilibrium position with the velocity \(v_0 > 0\), the initial conditions are \(x(0) = 0\) and \(v(0) = v_0\). From \[ x(0) = C_1 + C_2 = 0 \quad \text{and} \quad \dot{x}(0) = \lambda_1 C_1 + \lambda_2 C_2 = v_0 \] we obtain the coefficients \(C_1 = \frac{v_0}{\lambda_1 - \lambda_2}\) and \(C_2 = - \frac{v_0}{\lambda_1 - \lambda_2}\) and hence the particular solution \[ x(t) = \frac{v_0}{\lambda_1 - \lambda_2} \left( \mathrm{e}^{\lambda_1 t} - \mathrm{e}^{\lambda_2 t} \right), \] see Figure 10.
Example 40 (Strong Damping) Consider the equation of motion \[ \ddot{x} + 6 \dot{x} + 8.75\, x = 0 \] with the initial values \(x(0) = 0\) and \(v(0) = 8\).
To be calculated manually.
For \(\Delta = \delta^2 - \omega_0^2 = 0\) we have the aperiodic limiting case. It separates the oscillations from the aperiodic motions. What is separated are the values of the damping factor \(\delta = b/(2m)\): at a fixed natural angular frequency \(\omega_0\), they fall into two ranges with fundamentally different motion:
The limiting case is the smallest damping at which the system no longer oscillates. For the damper constant, \(\delta = \omega_0\) means that \[ b = 2\sqrt{c\,m}. \]
| Case | Condition | Solutions of the characteristic equation | Motion | Section |
|---|---|---|---|---|
| undamped | \(\delta = 0\) | \(\lambda_{1,2} = \pm\mathrm{j}\omega_0\) | harmonic oscillation with constant amplitude | Free undamped oscillation |
| weak damping | \(0 < \delta < \omega_0\) | \(\lambda_{1,2} = -\delta \pm \mathrm{j}\omega_{\mathrm{d}}\) | damped oscillation, infinitely many zero crossings | Weak damping |
| aperiodic limiting case | \(\delta = \omega_0\) | \(\lambda_{1,2} = -\delta\) (double) | aperiodic, at most one zero crossing | Aperiodic limiting case |
| strong damping (overdamped case) | \(\delta > \omega_0\) | \(\lambda_{1,2} = -\delta \pm \sqrt{\delta^2 - \omega_0^2}\) (real, distinct) | aperiodic, at most one zero crossing | Strong damping |
In the limiting case, the characteristic equation (Equation 11) has the double negative real solution \(\lambda_{1,2} = -\delta\). By Equation 4, the general solution of the ODE Equation 10 is the function given in Equation 12, \[ x(t) = \left[ C_1 t + C_2 \right] \mathrm{e}^{-\delta t}, \quad C_1, C_2 \in \mathbb{R}. \] The oscillatory mechanical system behaves similarly to the overdamped case. It moves aperiodically out of its initial position and approaches the equilibrium state asymptotically, see Figure 11.
Example 41 (Aperiodic Limiting Case: Motion Starting from Rest) If the system starts from rest, the initial conditions are \(x(0) = A\) and \(v(0) = 0\). For the constants of the general solution Equation 12, it follows that \[ x(0) = C_2 = A \quad \text{and} \quad \dot{x}(0) = C_1 - \delta C_2 = 0, \] i.e., \(C_1 = \delta A\) and \(C_2 = A\). The particular solution is \[ x(t) = \left[ \delta A t + A \right] \mathrm{e}^{-\delta t}, \quad t \geq 0. \] The system moves aperiodically out of rest and approaches the equilibrium state asymptotically, see Figure 12.
Example 42 (Aperiodic Limiting Case: Motion Starting from the Equilibrium Position) If the system, located in the equilibrium position, is set in motion at time \(t = 0\) with the velocity \(v_0 > 0\), the initial conditions are \(x(0) = 0\) and \(v(0) = v_0\).
To be calculated manually.
Example 43 (Aperiodic Limiting Case) Consider an oscillatory mechanical system with the spring constant \(c=200\) N/m and the damper constant \(b=60\) kg/s. How large must the oscillating mass \(m\) be for the aperiodic limiting case to occur?
To be calculated manually.
In a forced oscillation, an external periodic force \[ F(t) = F_0 \sin(\omega t) \] with the amplitude \(F_0\) and the excitation angular frequency \(\omega\) acts on the mass in addition to the restoring force and the damping force. The equation of motion of the spring pendulum then reads \[ m \ddot{x} + b \dot{x} + cx = F_0 \sin(\omega t) \] or, with the abbreviations \(\delta = b/(2m)\), \(\omega_0^2 = c/m\), and \(K_0 = F_0/m\), \[ \ddot{x} + 2\delta \dot{x} + \omega_0^2 x = K_0 \sin(\omega t). \tag{15}\]
Under weak damping (\(\delta < \omega_0\)), the associated homogeneous ODE is solved, according to the section on weak damping, by \(x(t) = A_{\mathrm{d}} \mathrm{e}^{-\delta t} \sin(\omega_{\mathrm{d}} t + \varphi_{\mathrm{d}})\), a damped oscillation with the natural angular frequency \(\omega_{\mathrm{d}} = \sqrt{\omega_0^2 - \delta^2}\).
For the particular solution of the inhomogeneous ODE Equation 15 we use, following Equation 6, the complex ansatz function \[ \underline{x}_{\mathrm{p}}(t) = A \mathrm{e}^{\mathrm{j}(\omega t - \varphi)} = A \cos(\omega t - \varphi) + \mathrm{j} A \sin(\omega t - \varphi). \tag{16}\] The external force \(F(t)\) is also converted into complex form: \[ \underline{F}(t) = F_0 \mathrm{e}^{\mathrm{j}\omega t} = F_0 \cos(\omega t) + \mathrm{j} F_0 \sin(\omega t). \tag{17}\] The complex and the real representations are therefore related by \[ x_{\mathrm{p}} = \operatorname{Im}(\underline{x}_{\mathrm{p}}) = A \sin(\omega t - \varphi), \qquad F(t) = \operatorname{Im}(\underline{F}(t)) = F_0 \sin(\omega t). \]
In complex form, the equation of motion Equation 15 reads \[ \underline{\ddot{x}} + 2\delta \underline{\dot{x}} + \omega_0^2 \underline{x} = K_0 \mathrm{e}^{\mathrm{j}\omega t}. \] Derivatives of the ansatz function: \(\underline{\dot{x}}_p = \mathrm{j} \omega A \mathrm{e}^{\mathrm{j}\omega t} \mathrm{e}^{-\mathrm{j}\varphi}\) and \(\underline{\ddot{x}}_p = -\omega^2 A \mathrm{e}^{\mathrm{j}\omega t} \mathrm{e}^{-\mathrm{j}\varphi}\). Substituting, dividing by \(A \mathrm{e}^{\mathrm{j}\omega t} \neq 0\), multiplying by \(\mathrm{e}^{\mathrm{j}\varphi}\), and sorting into real and imaginary parts yields \[ (\omega_0^2 - \omega^2) + \mathrm{j}\, 2\delta \omega = \frac{K_0}{A} \mathrm{e}^{\mathrm{j}\varphi}. \tag{18}\] The left-hand side is a complex number in algebraic form with the real part \(\omega_0^2 - \omega^2\) and the imaginary part \(2\delta \omega\). The right-hand side is the same number in polar form with the modulus \(K_0/A\) and the argument \(\varphi\).
With the Pythagorean theorem (see Figure 14) we obtain \[ \left[ \omega_0^2 - \omega^2 \right]^2 + \left[ 2\delta \omega \right]^2 = \left[ \frac{K_0}{A} \right]^2 \tag{19}\] and \[ \tan(\varphi) = \frac{2\delta \omega}{\omega_0^2 - \omega^2}. \tag{20}\]
For the amplitude we have \[ A = \frac{K_0}{\sqrt{(\omega_0^2 - \omega^2)^2 + (2\delta \omega)^2}} = \frac{F_0}{m \sqrt{(\omega_0^2 - \omega^2)^2 + (2\delta \omega)^2}}. \tag{21}\]
The particular solution of the ODE Equation 15 reads, in complex form, \(\underline{x}_{\mathrm{p}} = A \mathrm{e}^{\mathrm{j}(\omega t - \varphi)}\) with the amplitude \(A\) from Equation 21 and the phase angle \(\varphi\). The sought real solution is its imaginary part: \[ x_{\mathrm{p}} = \operatorname{Im}(\underline{x}_{\mathrm{p}}) = A \sin(\omega t - \varphi). \] Under weak damping (\(\delta < \omega_0\)), the equation of motion Equation 15 therefore has the general solution \[ x(t) = x_{\mathrm{h}} + x_{\mathrm{p}} = A_{\mathrm{d}} \mathrm{e}^{-\delta t} \sin(\omega_{\mathrm{d}} t + \varphi_{\mathrm{d}}) + A \sin(\omega t - \varphi). \] The motion of the weakly damped system is thus composed of two oscillations that superpose without disturbing each other.
\[ x_{\mathrm{h}}(t) = A_{\mathrm{d}} \mathrm{e}^{-\delta t} \sin(\omega_{\mathrm{d}} t + \varphi_{\mathrm{d}}) \tag{22}\]
\[ x_{\mathrm{p}}(t) = A \sin(\omega t - \varphi) \tag{23}\]
After the transient phase, the transient component of the solution has vanished, so that only the forced oscillation remains. The mechanical system then oscillates without damping at the angular frequency \(\omega\) of the exciter. The amplitude and the phase shift \(\varphi\) between the excitation and the steady-state solution \(x_{\mathrm{p}}(t)\) depend on the excitation angular frequency, \(A = A(\omega)\) and \(\varphi = \varphi(\omega)\).
Example 44 (Forced Oscillation) A mass-spring oscillator with \(m = 10\) kg, \(b = 40\) kg/s, and \(c = 250\) N/m is excited by the force \(F(t) = 100\,\text{N} \cdot \sin(3\,\text{s}^{-1} \cdot t)\) and starts from the rest position, \(x(0) = 0\) and \(v(0) = 0\). We omit the units in the intermediate calculations. With \[ \delta = \frac{b}{2m} = 2, \qquad \omega_0 = \sqrt{\frac{c}{m}} = 5, \qquad K_0 = \frac{F_0}{m} = 10, \qquad \omega = 3 \] the equation of motion Equation 15 reads \[ \ddot{x} + 4\dot{x} + 25x = 10 \sin(3t). \] Since \(\delta < \omega_0\), the system is weakly damped with \(\omega_{\mathrm{d}} = \sqrt{25 - 4} = \sqrt{21}\). By Equation 21 and Equation 20, the amplitude and the phase angle of the forced oscillation are \[ A = \frac{10}{\sqrt{(25 - 9)^2 + (2 \cdot 2 \cdot 3)^2}} = \frac{10}{20} = 0.5, \qquad \varphi = \arctan\left( \frac{3}{4} \right) \approx 0.6435. \]
In the form of Theorem 10, the general solution is \[ x(t) = \mathrm{e}^{-2t} \left[ C_1 \sin(\sqrt{21}\, t) + C_2 \cos(\sqrt{21}\, t) \right] + 0.5 \sin(3t - \varphi). \] From \(x(0) = 0\) it follows that \(C_2 = 0.3\), and from \(\dot{x}(0) = 0\) that \(C_1 = -0.6/\sqrt{21} \approx -0.1309\). The particular solution is therefore \[ x(t) = \mathrm{e}^{-2t} \left[ -0.1309 \sin(\sqrt{21}\, t) + 0.3 \cos(\sqrt{21}\, t) \right] + 0.5 \sin(3t - 0.6435) \] (in m, \(t \geq 0\)). Since \(\mathrm{e}^{-2t} < 0.01\) for \(t > 2.3\) s, the transient component has practically died out by then. Afterwards, the system oscillates in steady state with the amplitude \(0.5\) m and the excitation angular frequency \(3\,\text{s}^{-1}\), lagging \(\varphi/\omega \approx 0.21\) s behind the excitation.
Definition 11 (Frequency Response) The dependence of the amplitude \(A\) and the phase shift \(\varphi\) of the forced oscillation on the excitation angular frequency \(\omega\) is called the frequency response. The function \(A(\omega)\) is called the amplitude frequency response, the function \(\varphi(\omega)\) the phase frequency response.
By Equation 21, the amplitude of the forced oscillation is \[ A(\omega) = \frac{F_0}{m \sqrt{(\omega_0^2 - \omega^2)^2 + (2\delta \omega)^2}}. \tag{24}\] This function is also called the resonance curve. Its value at \(\omega = 0\) describes the static case.
Definition 12 (Static Case) The static case is the limiting case \(\omega \to 0\) of the forced oscillation. The excitation force then changes so slowly that at every instant it acts like a force that is constant in time. A constant force \(F_0\) stretches the spring by the static displacement \[ x_{\mathrm{st}} = \frac{F_0}{c}. \tag{25}\]
Remark 3 (Remark on the Static Case). Strictly speaking, the excitation force \(F_0 \sin(\omega t)\) vanishes for \(\omega = 0\). What is meant is therefore the limit \(\omega \to 0\): the period \(2\pi/\omega\) of the excitation becomes arbitrarily long, and the force passes through its values between \(-F_0\) and \(F_0\) arbitrarily slowly. In the static case, the resonance curve has the value \[ A(0) = \frac{F_0}{m \omega_0^2} = \frac{F_0}{c} = x_{\mathrm{st}}. \] For \(\omega \to 0\), the inertial force \(m\ddot{x}\) and the damping force \(b\dot{x}\) become arbitrarily small compared with the spring force \(cx\), and the equation of motion turns into Hooke’s law \(c\,x = F(t)\) (Theorem 7). This is why \(A(0)\) depends neither on the mass \(m\) nor on the damping \(\delta\).
For the behavior, we distinguish two situations:
The static displacement serves as the reference quantity for the resonance curve: the ratio \(A(\omega)/x_{\mathrm{st}}\) states by which factor the periodic excitation increases the displacement compared with the static case. In Example 44, \(x_{\mathrm{st}} = 0.4\) m; at \(\omega = 3\,\text{s}^{-1}\), the displacement is larger than in the static case by the factor \(1.25\).
The maximum of the resonance curve lies where the radicand in the denominator of Equation 24, \[ \Psi(\omega) = (\omega_0^2 - \omega^2)^2 + (2\delta \omega)^2, \] becomes minimal. From \(\Psi'(\omega) = 4 \omega (\omega^2 - \omega_0^2 + 2\delta^2) = 0\) we obtain, for \(\omega > 0\), the resonance frequency \[ \omega_{\mathrm{r}} = \sqrt{\omega_0^2 - 2\delta^2} < \omega_{\mathrm{d}} = \sqrt{\omega_0^2 - \delta^2} < \omega_0, \] which is real only for \(\omega_0^2 > 2\delta^2\). The resonance amplitude is \[ A_{\mathrm{r}} = A_{\max} = A(\omega_{\mathrm{r}}) = \frac{F_0}{2m \delta \omega_{\mathrm{d}}}. \] With increasing excitation angular frequency \(\omega\), the amplitude \(A(\omega)\) decreases and tends to zero as \(\omega \to \infty\).
Theorem 13 (Resonance Case) The resonance case occurs when the excitation angular frequency \(\omega\) equals the resonance frequency \[ \omega_{\mathrm{r}} = \sqrt{\omega_0^2 - 2\delta^2}. \] The system then oscillates with the largest possible amplitude, the resonance amplitude \(A_{\mathrm{r}}\).
By Equation 23, the forced oscillation always lags behind the excitation oscillation by the phase angle \(\varphi\), where \(\varphi\) lies between \(0\) and \(\pi\): \(\varphi(0) = 0\), \(\varphi(\omega_0) = \pi/2\), \(\varphi(\infty) = \pi\).
Example 45 (Frequency Response in the Absence of Damping and under Strong Damping) We investigate the frequency response of the amplitude \(A(\omega)\) and of the phase shift \(\varphi(\omega)\) in the absence of damping (\(\delta = 0\)) and under strong damping (\(\delta > \omega_0\)). The basis is the resonance curve Equation 24 and the phase relation \[ \tan(\varphi) = \frac{2\delta \omega}{\omega_0^2 - \omega^2}, \qquad 0 \le \varphi \le \pi. \]
No damping (\(\delta = 0\)). The resonance curve simplifies to \[ A(\omega) = \frac{F_0}{m\,\lvert \omega_0^2 - \omega^2 \rvert} \qquad (\omega \neq \omega_0). \] It starts in the static case at \(A(0) = x_{\mathrm{st}}\) and tends to infinity as \(\omega \to \omega_0\). At \(\omega = \omega_0\), the excitation is a solution of the homogeneous ODE, and one obtains the particular solution \[ x_{\mathrm{p}}(t) = -\frac{F_0}{2m\omega_0}\, t \cos(\omega_0 t). \] Its amplitude grows linearly with time beyond all bounds. This case is called a resonance catastrophe. For \(\omega < \omega_0\), \(\varphi = 0\) (in phase); for \(\omega > \omega_0\), \(\varphi = \pi\) (in antiphase).
Strong damping (\(\delta > \omega_0\)). We write the radicand in the denominator of Equation 24 as a polynomial in \(\omega^2\), \[ \Psi(\omega) = \omega^4 + 2\left(2\delta^2 - \omega_0^2\right)\omega^2 + \omega_0^4. \] Since \(\delta > \omega_0\), we have \(2\delta^2 - \omega_0^2 > \delta^2 > 0\). All coefficients are positive, so \(\Psi\) increases strictly monotonically for \(\omega > 0\) and the amplitude \(A(\omega)\) decreases strictly monotonically. The resonance curve attains its maximum in the static case, \(A(0) = x_{\mathrm{st}}\), and there is no resonance: \(\omega_{\mathrm{r}} = \sqrt{\omega_0^2 - 2\delta^2}\) is not real. At the natural angular frequency, the amplitude is \[ A(\omega_0) = \frac{F_0}{2m\delta\omega_0} = \frac{\omega_0}{2\delta}\, x_{\mathrm{st}} < \frac{x_{\mathrm{st}}}{2}. \] As in the case of weak damping, the phase response runs from \(\varphi(0) = 0\) via \(\varphi(\omega_0) = \pi/2\) to \(\varphi(\infty) = \pi\), but it rises noticeably already at small angular frequencies. Under strong damping, the transition from \(0\) to \(\pi\) is therefore spread over a wide frequency range.
Definition 13 (Simple Pendulum) A simple pendulum is a physical model consisting of a mass \(m\) at the end of a massless, inextensible thread of length \(l\). Its position is described by the angle of deflection \(\varphi(t)\) from the vertical rest position.
With the weight force \(F_{\mathrm{G}} = mg\) and the gravitational acceleration \(g\), the restoring force \(F_{\mathrm{R}}\) is \[ F_{\mathrm{R}} = F_{\mathrm{G}} \sin(\varphi) = m g \sin(\varphi). \] With the arc length \(s(t)\), the equation of motion reads \(F = m \ddot{s} = - m g \sin \varphi(t)\). Because \(\varphi(t) = s(t)/l\), it can be formulated in terms of the angle of deflection \(\varphi(t)\) alone: \[ F = m l \ddot{\varphi} = - m g \sin(\varphi). \tag{26}\]
Rearranging Equation 26 yields the ODE \[ \ddot{\varphi} + \frac{g}{l}\sin(\varphi) = 0. \tag{27}\] For small displacements \(\varphi\), \(\sin(\varphi) \approx \varphi\), so that Equation 27 approximately takes the form \[ \ddot{\varphi} + \frac{g}{l} \varphi = 0 \tag{28}\] With \(\omega_0^2 = g/l\), the ODE reads \[ \ddot{\varphi} + \omega_0^2 \varphi = 0. \tag{29}\] The simple pendulum oscillates almost harmonically for small displacements.
The characteristic equation \(\lambda^2 + \omega_0^2 = 0\) has the solutions \(\lambda_{1,2} = \pm \mathrm{j} \omega_0\). The general solution of Equation 29 is \[ \varphi(t) = C_1 \sin(\omega_0 t) + C_2 \cos(\omega_0 t), \qquad \dot{\varphi}(t) = \omega_0 \left[ C_1 \cos(\omega_0 t) - C_2 \sin(\omega_0 t) \right]. \] The simple pendulum oscillates with the angular frequency, the frequency, and the period \[ \omega_0 = \sqrt{\frac{g}{l}}, \qquad \nu_0 = \frac{\omega_0}{2\pi} = \frac{1}{2\pi} \sqrt{\frac{g}{l}}, \qquad T_0 = 2\pi \sqrt{\frac{l}{g}}. \]
Example 46 (Simple Pendulum: Motion Starting from Rest) For the initial conditions \(\varphi(0) = \varphi_0\) and \(\dot{\varphi}(0) = 0\), the pendulum starts from rest. Since \(\varphi(0) = C_2 = \varphi_0\) and \(\dot{\varphi}(0) = \omega_0 C_1 = 0\), i.e., \(C_1 = 0\), the particular solution is \[ \varphi(t) = \varphi_0 \cos(\omega_0 t), \quad t \geq 0. \]
A pendulum that oscillates only at small angles is a rather uninteresting pendulum.
For an initial value problem of the ODE of order \(n\), \(y^{(n)}(t) = f\left(t, y(t), y'(t), y''(t), \dots, y^{(n-1)}(t)\right)\), we define the state \(S(t)\); its derivative is then \[ S(t) = \left[\begin{array}{c} y(t) \\ y'(t) \\ \vdots \\ y^{(n-1)}(t) \end{array}\right], \qquad \frac{\mathrm{d}S(t)}{\mathrm{d}t} = \left[\begin{array}{c} y'(t) \\ \vdots \\ y^{(n-1)}(t) \\ y^{(n)}(t) \end{array}\right] = \left[\begin{array}{c} S_2(t) \\ \vdots \\ S_n(t) \\ f\left(t, S_1(t), S_2(t), \dots, S_n(t)\right) \end{array}\right], \] where \(S_i(t)\) is the \(i\)-th component of \(S(t)\). If \(f\) now denotes the vector-valued right-hand side, then \[ \frac{\mathrm{d}S(t)}{\mathrm{d}t} = f(t, S(t)). \] This equation is a first-order ODE in \(S\): we have converted an ODE of order \(n\) into \(n\) coupled first-order ODEs.
Example 47 (Coupled Differential Equations) A very simple model to describe the change in the populations of rabbits, \(r(t)\), and wolves, \(w(t)\), could be \[ \frac{\mathrm{d}r(t)}{\mathrm{d}t} = 4r(t) - 2w(t) \tag{30}\] and \[ \frac{\mathrm{d}w(t)}{\mathrm{d}t} = r(t) + w(t). \tag{31}\] Equation 30 states that at each time step the rabbit population quadruples, but each wolf eats two of the rabbits. Equation 31 states that at each time step the population of wolves increases by the number of rabbits and wolves in the system. We write this system of differential equations as an equivalent differential equation in \(S(t)\).
To do so, we combine the two populations in the state vector \(S(t) = \left[ r(t), \, w(t) \right]^T\). We form its derivative componentwise and substitute Equation 30 and Equation 31: \[ \frac{\mathrm{d}S(t)}{\mathrm{d}t} = \left[\begin{array}{c} \frac{\mathrm{d}r(t)}{\mathrm{d}t} \\ \frac{\mathrm{d}w(t)}{\mathrm{d}t} \end{array}\right] = \left[\begin{array}{c} 4r(t) - 2w(t) \\ r(t) + w(t) \end{array}\right]. \] The right-hand side is linear in \(r(t)\) and \(w(t)\) in both components. The first-order differential equation \[ \frac{\mathrm{d}S(t)}{\mathrm{d}t} = \left[\begin{array}{cc} 4 & -2 \\ 1 & 1 \end{array}\right]S(t) \tag{32}\] is therefore equivalent to the pair of differential equations.
Equation 32 is a coupled ODE.
Definition 14 (Coupled ODE) A system of ODEs in which one or more unknowns appear in more than one equation is called coupled. The equations then depend on each other.
Many numerical methods for initial value problems are designed for first-order ODEs. To use them for higher-order ODEs, their order is reduced to one. To this end, new variables are introduced for the derivatives of the original function up to the \((n-1)\)-th order, which converts an ODE of order \(n\) into a system of \(n\) first-order ODEs.
Theorem 14 (Reduction of Order) Consider an ODE of order \(n\) in the form \[ y^{(n)} = f\left(t, y, y', y'', \dots, y^{(n-1)}\right). \] With the \(n\) new variables \[ y_1 = y, \quad y_2 = y', \quad y_3 = y'', \quad \dots, \quad y_n = y^{(n-1)}, \] each of which corresponds to a derivative of the original function \(y\), it is equivalent to the system of \(n\) first-order ODEs consisting of the \(n-1\) equations \[ y_1' = y_2, \quad y_2' = y_3, \quad \dots, \quad y_{n-1}' = y_n \] and the equation \[ y_n' = f(t, y_1, y_2, y_3, \dots, y_n). \tag{33}\]
Proof idea: The first \(n-1\) equations follow from the definition of the \(y_i\); the last one is the original ODE; see the lecture notes. The system contains only the \(y_i\) and can be solved with the usual numerical methods for systems of first-order ODEs, e.g., with the Runge-Kutta methods.
In vector form, the variables and their derivatives with respect to time \(t\) are collected into \(S = (y_1, \dots, y_n)^T\) and \(S' = (y_1', \dots, y_n')^T\). A linear system can then be written in matrix form as \[ S' = AS + g(t), \] where \(A\) is an \(n \times n\) matrix of the coefficients and the vector function \(g(t)\) describes external influences or inhomogeneous terms. If the right-hand side in Equation 33 is linear, \(f = a_1 y_1 + a_2 y_2 + \dots + a_n y_n\), and no external influences act, then \(g(t) = 0\) is the zero vector. The matrix \(A\) then has the form \[ A = \begin{pmatrix} 0 & 1 & 0 & \cdots & 0 \\ 0 & 0 & 1 & \cdots & 0 \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & 0 & \cdots & 1 \\ a_1 & a_2 & a_3 & \cdots & a_n \end{pmatrix}. \]
Example 48 (Reduction of Order) Consider the second-order ODE \(y'' = -\omega_0^2 y\). With the new variables \(y_1 = y\) and \(y_2 = y'\), since the derivative of \(y_1\) equals \(y_2\), we obtain the system \[ y_1' = y_2, \qquad y_2' = -\omega_0^2 y_1. \] It consists of two first-order ODEs that are equivalent to the original second-order ODE and can be solved with numerical methods. With \[ S = \begin{pmatrix} y_1 \\ y_2 \end{pmatrix}, \quad S' = \begin{pmatrix} y_2 \\ -\omega_0^2 y_1 \end{pmatrix}, \quad A = \begin{pmatrix} 0 & 1 \\ -\omega_0^2 & 0 \end{pmatrix} \quad \text{and} \quad g(t) = 0 \] it reads in matrix form \[ \begin{pmatrix} y_1' \\ y_2' \end{pmatrix} = \begin{pmatrix} 0 & 1 \\ -\omega_0^2 & 0 \end{pmatrix} \begin{pmatrix} y_1 \\ y_2 \end{pmatrix}. \]
Example 49 (Reduction of Order of the Differential Equation of the Simple Pendulum) The second-order ODE of the simple pendulum Equation 28, \(\ddot{\varphi} + \frac{g}{l} \varphi = 0\), reads \(\ddot{\varphi} = -\frac{g}{l} \varphi\) after rearrangement. We set \[ y_1 = \varphi, \quad y_2 = \dot{\varphi}. \tag{34}\] By Equation 34, differentiating \(y_1\) yields \(y_1' = y_2\). We thus obtain the first-order system \[ y_1' = y_2, \qquad y_2' = -\frac{g}{l} y_1 \] or, in matrix form with \(S = (y_1, y_2)^T\), \[ \frac{\mathrm{d}S(t)}{\mathrm{d}t} = \begin{pmatrix} 0 & 1\\ -\frac{g}{l} & 0 \end{pmatrix} S(t). \tag{35}\]
Numerical Mathematics · Chapter 2: Ordinary Differential Equations