+ Background Information -- Derivation of Difference Equations

Your task is to investigate the behavior of a simple dynamic system. It consists of three components: a mass (M), a linear spring with constant (k), and an element which supplies a velocity dependent force. That force is equal to b times the velocity of the mass. Here is a sketch of the system.

Let's apply Newton's Second law to the system. Let "a" represent acceleration. The variables x (position) and v (velocity) describe what is known as the state of the system. It is true, of course, that there is a relationship between x and v, so we include it in our system description.
dx/dt = v (defn of velocity)
dv/dt = a = -x + .2 v (Newton's second law -- with parameters plugged in)
There are many ways to use this differential system as a mathematical description of the physical device.

One possible way to proceed is to focus our interest on the state of the system at a sequence of times, beginning with 0. Let h be the time difference or step. Then, use the following notation:
tn = n * h -----------------> time n
xn -----------------> position at time n
vn -----------------> velocity at time n
Now let's take an approximation for the derivatives:
vn+1 = (xn+1 - xn) / h
an+1 = (vn+1 - vn) / h
VERY IMPORTANT: someone tells us where the system starts. That is to say, we know x0 and v0. For this problem, assume that h = 0.1. By substituting these differences for the derivatives , and then solving the resulting equations for xn+1 and vn+1, we get the following difference model for our system. Here's the algebra.

Input := 

MapAll[ Expand, Solve[ { (xn1 - xn0) / .1 == vn1,
         (vn1 - vn0) / .1 == -xn1 + .2 vn1 }, 
         {xn1,vn1}]]
Output =

{{xn1 -> 0.10101 vn0 + 0.989899 xn0, 
 
   vn1 -> 1.0101 vn0 - 0.10101 xn0}}

The difference model is

x(n+1) = 0.989899 xn + 0.10101 vn
v(n+1) = -0.10101 xn + 1.0101 vn

You can see how it is possible to find the solution at the nth time step, tn, by taking the linear function above an applying it n times, beginning with the given initial data.

One more piece of background information. We need to have a single number which says something about the size of the solution. What is the "magnitude" of the state {x,v}. One way of doing this is to set up a function

m( {x,v} ) = ( x2 + v2 )1/2.

This magnitude has an actual physical interpretation in this case. Since the elastic energy stored in the device is 1/2 k x2, and the kinetic energy is 1/2 m v2, this magnitude is a measure of the energy possessed by the system.