# oscillation

## 2602 days ago by chrisphan

html("<big>This example illustrates the relationship between the solution of a differential equation modeling forced vibration and the forcing function. Here we consider the initial value problem $$y'' + 0.125 y' + y = \cos(\omega t), \; y(0) = 0, \; y'(0) = 2.$$ In blue is the solution to the IVP, while in red is the forcing function $F(t) = 3 \cos(\omega t)$. Here you can see how different values of $\omega$ affect the amplitude of the solution.</big>") x = var('x') y = function('y', x) @interact def forcingExample(omega=slider(0.3, 3, 0.01)): Y = desolve(diff(y, x, 2) + 0.125*diff(y,x) + y == 3*cos(omega*x), y, ivar=x, ics=[0, 2, 0]) Yplot = plot(Y, x, 0, 50, rgbcolor=(0, 0, 1)) F = 3 * cos(omega*x) Fplot = plot(F,x, 0, 50, rgbcolor=(1, 0, 0)) show(Fplot + Yplot)

This example illustrates the relationship between the solution of a differential equation modeling forced vibration and the forcing function. Here we consider the initial value problem
y'' + 0.125 y' + y = \cos(\omega t), \; y(0) = 0, \; y'(0) = 2.
In blue is the solution to the IVP, while in red is the forcing function F(t) = 3 \cos(\omega t). Here you can see how different values of \omega affect the amplitude of the solution.
omega

## Click to the left again to hide and once more to show the dynamic interactive window

x = var('x') html("<big>This example illustrates periodic variation of amplitude which occurs when you have a forced, undamped vibration. Suppose a vibration is modelled by $$y'' + y' = \cos(\omega t), \\; y(0) = 0, \\; y'(0) = 0.$$ Then the solution will be $$y = \\left(\\frac{2}{1 - \omega^2} \sin\left(\\frac{(1- \omega)t}{2} \\right) \\right) \sin \\left(\\frac{(1 + \omega)t}{2} \\right).$$ If $\omega$ is close to 1, then $1 - \omega$ is small, and hence the factor $$\sin \\left(\\frac{(1 + \omega)t}{2} \\right)$$ is oscillating much faster than $$\\frac{2}{1 - \omega^2} \sin\left(\\frac{(1- \omega)t}{2} \\right).$$ So, we think of $\\left|\\frac{2}{1 - \omega^2} \sin\left(\\frac{(1- \omega)t}{2} \\right) \\right|$ as periodically varying the amplitude of the sine curve. (If you click the checkbox, this will be shown in red.)</big>") @interact def forcedUndampedVibration(omega=slider(0.8, 0.97, 0.01), showamp=checkbox(false, label="Show periodically varying amplitude")): amp = 2/(1 - omega^2) * sin((1-omega) * x / 2) Y = amp * sin((1 + omega)*x /2) output = plot(Y, x, 0, 400) if showamp: output = output + plot(abs(amp), x, 0, 400, rgbcolor=(1, 0, 0)) show(output, figsize=[8, 5])

This example illustrates periodic variation of amplitude which occurs when you have a forced, undamped vibration. Suppose a vibration is modelled by
y'' + y' = \cos(\omega t), \; y(0) = 0, \; y'(0) = 0.
Then the solution will be
y = \left(\frac{2}{1 - \omega^2} \sin\left(\frac{(1- \omega)t}{2} \right) \right) \sin \left(\frac{(1 + \omega)t}{2} \right).
If \omega is close to 1, then 1 - \omega is small, and hence the factor
\sin \left(\frac{(1 + \omega)t}{2} \right)
is oscillating much faster than
\frac{2}{1 - \omega^2} \sin\left(\frac{(1- \omega)t}{2} \right).
So, we think of \left|\frac{2}{1 - \omega^2} \sin\left(\frac{(1- \omega)t}{2} \right) \right| as periodically varying the amplitude of the sine curve. (If you click the checkbox, this will be shown in red.)
omega
Show periodically varying amplitude