# 1.5: Solving Second-Order ODE models

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$

( \newcommand{\kernel}{\mathrm{null}\,}\) $$\newcommand{\range}{\mathrm{range}\,}$$

$$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\id}{\mathrm{id}}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\kernel}{\mathrm{null}\,}$$

$$\newcommand{\range}{\mathrm{range}\,}$$

$$\newcommand{\RealPart}{\mathrm{Re}}$$

$$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$

$$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\AA}{\unicode[.8,0]{x212B}}$$

$$\newcommand{\vectorA}[1]{\vec{#1}} % arrow$$

$$\newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow$$

$$\newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vectorC}[1]{\textbf{#1}}$$

$$\newcommand{\vectorD}[1]{\overrightarrow{#1}}$$

$$\newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}}$$

$$\newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}}$$

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\avec}{\mathbf a}$$ $$\newcommand{\bvec}{\mathbf b}$$ $$\newcommand{\cvec}{\mathbf c}$$ $$\newcommand{\dvec}{\mathbf d}$$ $$\newcommand{\dtil}{\widetilde{\mathbf d}}$$ $$\newcommand{\evec}{\mathbf e}$$ $$\newcommand{\fvec}{\mathbf f}$$ $$\newcommand{\nvec}{\mathbf n}$$ $$\newcommand{\pvec}{\mathbf p}$$ $$\newcommand{\qvec}{\mathbf q}$$ $$\newcommand{\svec}{\mathbf s}$$ $$\newcommand{\tvec}{\mathbf t}$$ $$\newcommand{\uvec}{\mathbf u}$$ $$\newcommand{\vvec}{\mathbf v}$$ $$\newcommand{\wvec}{\mathbf w}$$ $$\newcommand{\xvec}{\mathbf x}$$ $$\newcommand{\yvec}{\mathbf y}$$ $$\newcommand{\zvec}{\mathbf z}$$ $$\newcommand{\rvec}{\mathbf r}$$ $$\newcommand{\mvec}{\mathbf m}$$ $$\newcommand{\zerovec}{\mathbf 0}$$ $$\newcommand{\onevec}{\mathbf 1}$$ $$\newcommand{\real}{\mathbb R}$$ $$\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}$$ $$\newcommand{\laspan}[1]{\text{Span}\{#1\}}$$ $$\newcommand{\bcal}{\cal B}$$ $$\newcommand{\ccal}{\cal C}$$ $$\newcommand{\scal}{\cal S}$$ $$\newcommand{\wcal}{\cal W}$$ $$\newcommand{\ecal}{\cal E}$$ $$\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}$$ $$\newcommand{\gray}[1]{\color{gray}{#1}}$$ $$\newcommand{\lgray}[1]{\color{lightgray}{#1}}$$ $$\newcommand{\rank}{\operatorname{rank}}$$ $$\newcommand{\row}{\text{Row}}$$ $$\newcommand{\col}{\text{Col}}$$ $$\renewcommand{\row}{\text{Row}}$$ $$\newcommand{\nul}{\text{Nul}}$$ $$\newcommand{\var}{\text{Var}}$$ $$\newcommand{\corr}{\text{corr}}$$ $$\newcommand{\len}[1]{\left|#1\right|}$$ $$\newcommand{\bbar}{\overline{\bvec}}$$ $$\newcommand{\bhat}{\widehat{\bvec}}$$ $$\newcommand{\bperp}{\bvec^\perp}$$ $$\newcommand{\xhat}{\widehat{\xvec}}$$ $$\newcommand{\vhat}{\widehat{\vvec}}$$ $$\newcommand{\uhat}{\widehat{\uvec}}$$ $$\newcommand{\what}{\widehat{\wvec}}$$ $$\newcommand{\Sighat}{\widehat{\Sigma}}$$ $$\newcommand{\lt}{<}$$ $$\newcommand{\gt}{>}$$ $$\newcommand{\amp}{&}$$ $$\definecolor{fillinmathshade}{gray}{0.9}$$

A second-order ODE model can be similarly solved by applying the Laplace transform to both sides of the differential equation. We consider a general second-order ODE model, described as: $\ddot{y}(t)\; +\; a_{1} \dot{y}(t)\; +\; a_{2} y(t)=b_{1} \dot{u}(t)+b_{0} u(t)$ We assume the following initial conditions for the ODE model: $$y\left(0\right)=y_0,\ \dot{y}\left(0\right)={\dot{y}}_0,\ \dot{u}\left(0\right)=u_0.$$ The application of the Laplace transform gives an algebraic equation: $\left(s^{2} +a_{1} s+a_{2} \right)\; y(s)-\left(s+a_{1} \right)y_{0} -\dot{y}_{0} =\left(b_{1} s+b_{2} \right)u(s)-b_{1} u_{0}$ which can then be solved for $$y(s)$$ to obtain: $y\left(s\right)=\frac{1}{s^2+a_1s+a_2}\left[\left(s+a_1\right)y_0+{\dot{y}}_0+\left(b_1s+b_2\right)u\left(s\right)-b_1u_0\right]$ The denominator term in the above expression represents the characteristic polynomial of the ODE model. Further, the characteristics of the time-response, $$y\left(t\right)$$, obtained from the application of inverse Laplace transform to $$y\left(s\right)$$, are determined by the roots of the characteristic equation: $$s^{2} +a_{1} s+a_{2} =0$$, as illustrated in the following example.

Example 1.9: The mass–spring–damper system

We consider the mass-spring-damper system model (Example 1.8), in the presence of a unit-step input function, $$u\left(t\right)$$, assuming zero initial conditions; then, application of the Laplace transform produces the following algebraic equation: $\left(ms^{2} +bs+k\right)x(s)=f(s)$ Next, let $$f\left(s\right)=1/s$$, and consider two cases based on the assumed system parameter values that results in either real or complex roots of the characteristic equation: $$ms^{2} +bs+k=0$$.

Case I (Real Roots). Let the parameter values be: $$m=1,\ k=2,\ b=3$$; then, the characteristic equation is given as: $$s^2+3s+2=0$$. The equaiton has real roots at: $$s=-1,\ -2$$.

The algebraic equation describing the system output is: $$\left(s^2+3s+2\right)x\left(s\right)=f\left(s\right)$$. Assuming a unit-step input, the output variable is solved as: $$x\left(s\right)=\frac{1}{s\left(s+1\right)\left(s+2\right)}$$.

In order to apply the inverse Laplace transform, we need to carry out partial fraction expansion (PFE) of the output. We may use online SimboLab partial fraction calculator for this purpose (https://www.symbolab.com/solver/part...ns-calculator/). The result is given as: $x(s)=\frac{1}{2s}-\frac{1}{s+1}+\frac{1}{2(s+2)}$ By applying the inverse Laplace transform, the time response of the spring-mass-damper system is obtained as (Figure 10a): $x\left(t\right)=\left(\frac{1}{2}-e^{-t}+\frac{1}{2}e^{-2t}\right)u(t)$ where $$u\left(t\right)$$ represents the unit-step function.

Case II (Complex Roots). Alternatively, let the parameter values be: $$m=1,\ k=2,\ b=2$$; then, the characteristic equation is given as: $$s^2+2s+2=0$$. The equaiton has complex roots at: $$s=-1\pm j1$$.

The algebraic equation describing the system output is: $$\left(s^2+2s+2\right)x\left(s\right)=f\left(s\right)$$. Assuming a unit-step input, the output variable is solved as: $$x\left(s\right)=\frac{1}{s\left(s^2+2s+2\right)}$$. Taking help from SimboLab for partial fractions, the output is given as: $x(s)=\frac{1}{2s}-\frac{s+2}{2(s^2+2s+2)}$ The quadratic factor is alternately expressed as: $${\left(s+1\right)}^2+1^2$$, which helps when applying the inverse Laplace transform. Also, the quadratic term is split to write: $x\left(s\right)=\frac{1}{2s}-\frac{s+1}{2\left[{\left(s+1\right)}^2+1^2\right]}-\frac{1}{2\left[{\left(s+1\right)}^2+1^2\right]}$ By applying the inverse Laplace transform, the time response of the spring-mass-damper system is obtained as (Figure 10b): $x\left(t\right)=\frac{1}{2}\left(1-e^{-t}{\mathrm{cos} t\ }-e^{-t}{\mathrm{sin} t\ }\right)u\left(t\right)\$ where $$u\left(t\right)$$ represents the unit-step function.

A comparison of the time response in the two cases reveals that:

1. The steady-state response in both cases settles at $$x_{\infty }=\frac{1}{2}$$.

image12 The time response in the case of real roots resembles that of a first-order systems. Whereas, the time response in the case of complex roots has an overshoot that causes it to be oscillatory.

Figure 10: Time response of second-order system models: characteristic equation with real roots (left); with complex roots (right).

1.5: Solving Second-Order ODE models is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.