# Dirac delta forcing of a harmonic oscillator

Is it possible to solve this differential equation: $$\ddot{x}(t)+\omega^2x(t)=k\delta(t)$$ where $k$ is a constant and $\delta(t)$ the Dirac delta function? Is it possible alternatively, to know something about the spectrum $X(\omega)$ of $x(t)$ without solving the equation? Thanks

-

## 2 Answers

You can solve the equation using the Laplace transform. Wolfram Alpha has the details

-

If for t<0 the oscillator is at rest, x=dx/dt=0, then the effect of this delta force is providing an initial velocity at t=0. By integrating the equation over an infinitesimal interval [-dt,dt] we find that at time t=dt the velocity is dx/dt=k and the displacement is still x=0. So these are the initial conditions at t=0, and the solution is x=(k/omega)*sin(omega*t) for t>0; x=0 for t<0.

-