Second Order Differential Equations - Dynamics - 2020
Second Order Differential Equations - Dynamics - 2020
f(t) m = mass kg
The elements m, c and k in Figure 1 each have an equation for the force involved.
d 2x
For the mass the force is F = ma = m 2 =
dt
dx
For the damper the force is F = cv = c =
dt
For the spring the force is F = kx This is also known as Hooke’s Law.
The corresponding second order differential equations all represent the equations of
motion for the system:
d 2x c dx k 1
2
+ + x = f (t )
dt m dt m m
d 2x dx 1 k c
Also + 2 + 2
x = f (t ) where n = and Zeta =
2mn
n n
dt 2 dt m m
This lecture is covering the solving methods, and not the the above formula.
A second order differential equation (2nd ode) is an equation which contains a second
d 2x dx
order derivative e.g. 2
, and may contain a first order derivative e.g. . In general these
dt dt
are equations in the following form, where a, b and c are constants:
d2y dy
a 2 + b + cy = f ( x)
dx dx
d 2x dx
Or a 2 + b + cx = f (t )
dt dt
The General Solution of an equation in this form contains x and t, but no derivatives, and
will often contain two constants of integration, often denoted A and B. For example:
If the differential equation has a non-zero RHS then it is necessary to find a Particular
Integral (PI) and add this to the Complementary Function (CF).
The Particular Integral (PI) is found by assuming the general form of the (non-zero)
RHS and substituting this back into the original 2nd ode to find the coefficients for the
individual terms. The General Solution is then simply the Complementary Function and
Particular Integral added together.
−b b 2 − 4ac
Use the Quadratic Formula if required. m=
2a
3. Write the Complementary Function according to the roots of the auxiliary equation:
d 2x
4. Equations of the form 2
+ n2 x = 0 i.e. Simple Harmonic Motion
dt
x = A cos nt + B sin nt
d 2x 2
5. Equations of the form −n x =0
dt 2
− nt
x = A cosh nt + B sinh nt or x = Ae + Be
nt
d 2x dx
7. (i) To find C F Solve a 2 + b + cx = 0
dt dt
(ii) To find P I assume the general form of the RHS
Note: If the general form of the RHS is already included in the CF, multiply by x and proceed
as before. Determine the complete general solution before substituting to find the values
of the arbitrary constants A and B.
Displacement x
Time t (s)
Figure 2 - Deflection x (m) against time t (s) for a Mass spring damper system
5. Tables of Derivatives
dy
y = ax n = nax n−1
dx
dy
y = sin ax = a cos ax
dx
dy
y = cos ax = −a sin ax
dx
dy
y = eax = aeax
dx
dy 1 1
y = ln ax = a =
dx ax x
6. Tables of Integrals
ax n +1
ax n dx
= +c except when n = -1
n +1
1
cos axdx =
a
sin ax + c
1
sin axdx = −
a
cos ax + c
1 ax
e dx = e +c
ax
1
dx = ln x + c
x
To find the Particular Integral use the General Form of the Right Hand Side
a 8 C
ax + b (b may = 0) 3x Cx + D
For the exponential and trig functions the a x in the General Form will be the same as in
the RHS of the 2nd order differential equation.
a 8 C
at + b (b may = 0) 3t Ct + D
The graphs for sine and cosine waves are shown in Figures 3a) and 3b) below. As can
be seen these graphs are very similar the only difference being the phase. The cosine
wave is often used for displacement for vibrations as it has a non-zero deflection at t = 0.
Exponential and Log Function Graphs are shown in Figures 4a) and 4b) below.
-t t
x=e x=e
x=ln(t)
Each worked example demonstrates one type of CF and one type of PI. There
was no set reason why a specific CF type belonged with the PI type.
Example 1
d 2x dx
Solve the following 2nd order differential equation 2
+ 6 + 8x = t 2
dt dt
1) Find the Complementary Function by solving with RHS = 0
d 2x dx
2
+6 + 8x = 0
dt dt
m 2 + 6m + 8 = 0
( m + 2 )( m + 4 ) = 0 m = −2 or m = −4
−2 t −4 t
Complementary Function (CF) is type a) x = Ae + Be
2) Find the Particular Integral (PI) by assuming the general form of the (non-
zero) RHS
General Form is: x = Ct 2 + Dt + E
dx
= 2Ct + D
dt
d 2x
= 2C
dt 2
Substitute these back into the original 2nd ode to find the coefficients for the
individual terms.
2C + 6 ( 2Ct + D ) + 8 ( Ct 2 + Dt + E ) = t 2
2C + 12Ct + 6 D + 8Ct 2 + 8 Dt + 8 E = t 2
8Ct 2 + ( 8 D + 12C ) t + ( 2C + 6 D + 8 E ) = t 2
−2 t −4 t t 2 3t 7
3) General Solution = CF + PI x = Ae + Be + − +
8 16 64
Example 1 cont.
−2 t −4 t t 2 3t 7
General Solution = CF + PI x = Ae + Be + − +
8 16 64
Graphical view of this solution
Displacement x
Negative Increasing
exponential value of
behaviour powers of t
(after t=0)
Time t
n.b. The above graph was drawn in desmos.com using constants A=B=1
In the real world values only exist for t 0
Example 2
Find the General Solution and the Particular Solution for following 2nd order
differential equation of type b) with an exponential function on the RHS.
d 2x dx dx
Solve 2
+6 + 9 x = 2e −5t Given when t = 0, x = 0, =4
dt dt dt
m 2 + 6m + 9 = 0
( m + 3)( m + 3) = 0 m = −3 or m = −3
This is Case b) real and equal roots, so solution is type: x = ( A + Bt )e mt
2) Find the Particular Integral (PI) by assuming the general form of the (non-
zero) RHS.
Substitute these back into the original 2nd order differential equation to find
the coefficients for the individual terms.
25Ce−5t − 6 5Ce−5t + 9Ce−5t = 2e −5t
(25 − 30 + 9)C = 2
2 1
C= =
4 2
1 −5t
Particular Integral (PI) is x= e
2
1 −5t
General Solution = CF + PI
x = ( A + Bt )e−3t + e
2
- 10 - Differential Equations
Harper Adams University Applied Mechanical Science – Dynamics
dx 1
= ( A + Bt )(−3e−3t ) + e−3t B − 5 e−5t
dt 2
dx −1
Substituting known values: t = 0, x = 0, = 4, A =
dt 2
−1 5
4= ( −3) + B −
2 2
3 5 2 2
4= +B− = B− So B = 4+ =5
2 2 2 2
Put values of A and B into the General Solution:
−1 1
Particular Solution is
x = e −3t + 5t + e −5t
2 2
Displacement x
Time t
- 11 - Differential Equations
Harper Adams University Applied Mechanical Science – Dynamics
Example 3.
Solve the following 2nd order differential equation type c) with a trigonometric
function on the RHS.
d 2x dx
2
+6 + 10 x = 2 sin 3t
dt dt
1) Find the Complementary Function by solving with RHS = 0
d 2x dx
2
+6 + 10 x = 0
dt dt
m 2 + 6m + 10 = 0
−6 62 − 4 1 10
m=
2
m = −3 1 j
This is Case c) complex roots x = e t ( A cos t + B sin t )
2) Find the Particular Integral (PI) by assuming the general form of the (non-
zero) RHS
General Form is: x = C sin 3t + D cos 3t
dx
= 3C cos 3t − 3D sin 3t
dt
d 2x d 2x
= −9C sin 3t + −9 D cos 3t = −9 x Can use - 9 x or
dt 2 dt 2
- 12 - Differential Equations
Harper Adams University Applied Mechanical Science – Dynamics
Substituting these back into the original 2nd ode to find the coefficients for
the individual terms.
−9C sin 3t − 9 D cos 3t + 6(3C cos 3t − 3D sin 3t ) + 10(C sin 3t + D cos 3t ) = 2 sin 3t
2 −36
Particular Integral (PI) is x= sin 3t + cos 3t
325 325
This Particular Integral is also known as the steady state function (or response).
General Solution = CF + PI
2 36
x = e−3t ( A cos1t + B sin1t ) + sin 3t − cos 3t
325 325
Displacement x
Time t
n.b. The above graph was drawn in desmos.com using constants A=B=1
In the real world values only exist for t 0
- 13 - Differential Equations