40
2 Single Degree of Freedom (SDOF) Systems
2.6.1.1 FD Approximations of Derivatives
Consider a real-valued function g which is differentiable as many times as needed
and use Taylor’s formula (see Appendix A) to construct finite difference approximations of this function. For h > 0 small and t arbitrary, we have
g(t + h) = g(t) +
h
1!
g
(t) +
h 2
2!
g
(t) +
h 3
3!
g
(t) + O(h
4 )
g(t − h) = g(t) −
h
1!
g
(t) +
h 2
2!
g
(t) −
h 3
3!
g
(t) + O(h
4 ),
(2.64)
where O(h 4 ) includes term of order h 4 and higher. The addition and the subtraction
of the above equations give g(t + h) + g(t − h) = 2 g(t) + h 2 g (t) + O(h 4 ) and
g(t + h) − g(t − h) = 2 h g (t) + O(h 3 ) so that
g
(t) =
g(t + h) − 2 g(t) + g(t − h)
h 2
+ O(h
2 ) and
g
(t) =
g(t + h) − g(t − h)
2 h
+ O(h
2 ).
(2.65)
The approximations of the first and second-order derivatives of g(t) in Eq. 2.65,
referred to as finite difference approximations, are obtained from the values of the
function at t and of left and right of t, i.e., the values g(t), g(t − h) and g(t + h).
Moreover, the FD approximations of g (t) and g (t) have the same accuracy in the
sense that their errors are of order h 2 . Similar formulas can be developed for higher
order derivatives.
Note also that simpler FD approximations are less accurate, e.g., the forward FD
approximation. This approximation can be obtained from, e.g., the first equality of
Eq. 2.64 which gives g(t + h) = g(t) +
h
1! g (t) + O(h 2 ), so that the error of the
resulting FD approximation
g
(t) =
g(t + h) − g(t)
h
+ O(h)
(2.66)
is of order h rather than h 2 as in Eq. 2.65
2.6.1.2 FD Version of the Equation of Motion
Suppose our objective is to find the FD solution of Eq. 2.8 over a finite time interval
for the ICs (x 0 , ˙
x 0 ). The solution involves the following three steps.
– Step 1: Select a relatively small time step t > 0 and denote by x k = x(k kt)
and f k = f (k kt), k = 0, 1, . . ., the oscillator displacement and the forcing
function at the discrete times t k = k kt.
Précédent

- 47/155

Suivant