quote:Original post by Beer Hunter
Which sort of systems? I've only looked at SHM and UCM in my physics class, and I don't think you can get complex results with those, except for invalid cases. Or am I looking in the wrong place?
Actually, SHM (for example) *is* part of a complex result! Or at least complex variables can be used to achieve the equations for SHM. Its just rarely presented that way until you get into the theory of vibrations or control systems. But here is how it works.
The fundamental equation of motion is Newton's second law,
F = m*a = m*(d2s/dt2)
Here, s is the displacement, and so acceleration a is the second derivative of displacement in time.
lets suppose that the force F is actually a spring force, which for a linear spring is defined as:
F = -k*s
where k is the stiffness of the spring. And the spring force acts to restore displacement to zero. (I'm considering here a mass that oscillates about an initial position of s = 0, but the equation is similar for other systems.)
Then from Newton's law and the spring equation we can write the equation of motion for our mass and spring:
-k*s = m*(d2s/dt2)
We'd like to solve for s. How do we do it, given that we have a derivative of s on one side and just s on the other side? When F was a constant m*g/2 we could just integrate twice to get an equation for s, and that's exactly how we get the quadratic equation form for s.
In this case, we can't simply integrate. We have to solve this ordinary differential equation some other way. And the way to do it is to assume a form for s. We're going to assume s is:
s = A*exp(i*omega*t)
where A is an unknown constant, i is sqrt(-1), omega is an unknown constant, and t is time.
Now, there's magic in that exp(i*omega*t). From complex number theory, it is true that:
ds/dt = A*i*omega*exp(i*omega*t)andd2s/dt2 = A*i2*omega2*exp(i*omega*t)or, since i2 = -1,d2s/dt2 = -A*omega2*exp(i*omega*t)
And we can simply plug those into our equation of motion to get:
-k*A*exp(i*omega*t) = -m*A*omega2*exp(i*omega*t)
Now if you look at this you'll see that A*exp(i*omega*t) can be divided out to get:
-k = -m*omega2oromega = sqrt(k/m)
Then we know part of our solution s:
s = A*exp(i*sqrt(k/m)*t)
Now, there's still more magic in that exp() term. In complex number theory, it is true that:
exp(iX) = cos(X) + i*sin(X)
So the exponential of a complex number is equal to a complex harmonic function! And,
s = A*cos(omega*t) + i*A*sin(omega*t)
So omega turns out to be the frequency of oscillation, in radians/unit time.
*That* is the complex equation of harmonic motion for a mass connected to a spring. Note that A is determined by plugging in initial conditions (e.g., s = 0 when t = 0) and solving for A.
For determining the *real* position of the object s, you don't need the imaginary component. Just drop the imaginary component to get the SHM solution.
When combined with A, which can be complex, the imaginary component really models a time lag, for example, if you had two masses oscillating out-of-phase.
Note that if A = i, then the real part of s will have the sin() function instead of the cos() function.
So, that's way off topic but it actually is the starting point for understanding how to simulate more interesting systems. If you were to add in a damping force you could follow this same procedure, with just a slightly different assumed form for s. This kind of analysis becomes important when you are concerned about the stability of a simulation of, say, soft bodies.
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Edited by - grhodes_at_work on October 5, 2001 4:51:04 PM
Edited by - grhodes_at_work on October 5, 2001 4:51:52 PM