3 Ordinary Differential and Difference Equations

FEB 14, 2017

(3.1) Consider the motion of a damped, driven harmonic oscillator (such as a mass on a spring, a ball in a well, or a pendulum making small motions):**

$ m\frac{d^2x}{dt^2} + \gamma\frac{dx}{dt} + kx = e^{i\omega t} $

(a) Under what conditions will the governing equations for small displacements of a particle around an arbitrary 1D potential minimum be simple undamped harmonic motion?

When $ \gamma = 0 $

(b) Find the solution to the homogeneous equation, and comment on the possible cases. How does the amplitude depend on the frequency?

homogeneous equation:

$ m\frac{d^2x}{dt^2} + \gamma\frac{dx}{dt} + kx = 0 $

characteristic equation:

$ m\lambda ^2+\gamma\lambda + k = 0 $

solve for $ \lambda $:

$ \lambda_1 = \frac{-\gamma+\sqrt{\gamma^2-4mk}}{2m} $ and $ \lambda_2 = \frac{-\gamma-\sqrt{\gamma^2-4mk}}{2m} $, $\Delta=\gamma ^2-4mk$

  • if $\Delta>0$: general solution: $ x(t)=C_1e^{\lambda_1x}+C_2e^{\lambda_2x} $
  • if $\Delta=0$: general solution: $ x(t)=C_1e^{\lambda x}+C_2e^{\lambda x}x $
  • if $\Delta<0$: general solution: $ x(t)=e^{px}(C_1cos qx+C_2sin qx) $, where $ p=-\frac{\gamma}{2m}, q=\frac{i\sqrt{4mk-\gamma^2}}{2m} $. The amplitude is $ e^{px} $, which decrease as t increases. The frequency is q.

(c) Find a particular solution to the inhomogeneous problem by assuming a response at the driving frequency, and plot its magnitude and phase as a function of the driving frequency for m = k = 1, γ = 0.1.

$ x = Ae^{i\omega t}$

plugging in the homogeneous equation:

$ A(i\omega)^2+\frac{Ai\omega}{10}+A=1 $

$ A=\frac{1}{-\omega^2+\frac{i\omega}{10}+1} $

a particular solution:

$ x=\frac{1}{-\omega^2+\frac{i\omega}{10}+1}e^{i\omega t}=\frac{1}{-\omega^2+\frac{i\omega}{10}+1}(cos\omega t+isin\omega t) $

amplitude = $ abs(\frac{1}{-\omega^2+\frac{i\omega}{10}+1}) = (\sqrt{(1-w^2)^2+(\frac{\omega}{10})^2})^{-1} $

In [75]:
import numpy as np
import scipy as sp
from matplotlib import pyplot as plt

omega = np.arange(0, 3, 0.05)
amplitude = 1 / np.sqrt((1-omega**2)**2 + (omega/10)**2)
phase = np.angle(1/(-omega**2+1+(0.1j*omega)))

plt.plot(omega, amplitude)
plt.xlabel('Frequency')
plt.ylabel('Amplitude')
plt.show()

plt.plot(omega, phase)
plt.xlabel('Frequency')
plt.ylabel('Phase')
plt.show()

Note:

I found a very clear animation about the amplitude and the phaseof a driven harmonic oscillator.

Click "An animation" in the contents.

......