Solving a Differential Equation

Here is a straightforward way to solve the equation for a forced oscillator


The equation describing the behaviour of a harmonic oscillator of natural angular frequency ω under the action of a forcing function g(t) is d2f(t)/dt2 + ω2f(t) = g(t), where f(t) is the displacement of the oscillator. Let us write D = d/dt for convenience, so the equation is (D2 + ω2)f(t) = g(t). The solution can be obtained using the Fourier transform, but let us proceed from first principles here. First, we factor the operator: (D + iω)(D - iω)f = g, and multiply both sides by eiωt. We observe that eiωt(D + iω) = D eiωt, which we can verify by letting both sides act on an arbitrary function, and then explicitly doing the differentiation on the right by the product rule.

Now we have D{eiωt(D - iω)f} = eiωtg, which can immediately be integrated once with respect to t from 0 to t, and an arbitrary constant -B can be added. Let us use the symbol D-1 to represent the integral. After multiplying through by e-iωt, we have (D - iω)f = e-iωtD-1{eiωtg} - Be-iωt. Now we do exactly the same thing, but invert the order of the two factors, so that we obtain (D + iω)f = eiωtD-1{e-iωtg} + Aeiωt, where we have a different constant A, of course.

By subtracting the two results, D disappears, and we have 2iωf = D-1{[eiω(t - u) - e-iω(t - u)]g} + Ae-iωt +Beiωt. We have replaced the integration variable by u, so the integral is over u from 0 to t. Dividing by 2iω, we finally have f(t) = (1/ω)D-1{sin ω(t - u)g(u)} + Aeiωt + Be-iωt, where the 2iω has been absorbed in the arbitrary constants A, B. Our solution consists of a special integral plus the general solution of the homogeneous equation, as expected.

For examples of the use of the solution, consider the case of an oscillator at rest at t = 0, so that A = B = 0. First, suppose we apply an impulse g(t) = Vδ(t), which will give an initial velocity of V. The integral is easy to do using the properties of the Dirac Delta Function. The formula then gives f(t) = (V/ω)sin ωt for the subsequent motion. The velocity will be V cos ωt. Second, suppose g(t) is the unit step function times V. Then, f(t) = D-1{sin ω(t - u)} = -(V/ω)cos ωt. The velocity is V sin ωt. Finally, suppose that g(t) = sin ωt. In this case, the result is f(t) = (sin ωt - ωt cos ωt)/2. The amplitude of vibration increases proportionally to t in this case of resonant excitation. The case of excitation off resonance is left as an exercise for the reader. Check that the initial conditions are satisfied. You will get the transient solution as well as the steady state.

This solution is found in Prescott, Applied Elasticity, Appendix C.


Return to Math Index

Composed by J. B. Calvert
Created 9 July 2000
Last revised