I am trying to solve the following 1D inhomogeneous wave equation. Forgive me if I a miss any rigorous mathematical concept.$$ \frac{\partial^2 u}{\partial x^2} - \frac{1}{c^2}\frac{\partial^2 u}{\partial t^2} = \delta(x)f(t) $$where $c$ is the wave velocity, $f(t)$ any force function and $\delta (x)$ is the dirac delta function. The $\delta(x)$ is used to simulate a point source at $x=0$. I used the Fourier Transform $\mathcal{F}$ first to get to:$$  \frac{\partial^2 U_{\omega}(\omega,x)}{\partial x^2} + \frac{\omega^2}{c^2} U_{\omega}(\omega,x) =  \delta(x)F(\omega)$$$$  \frac{\partial^2 U_{\omega}(\omega,x)}{\partial x^2} + k^2 U_{\omega}(\omega,x) =  \delta(x)F(\omega)$$ (A)with $ k^2 = \frac{\omega^2}{c^2} $ and the subscript $ U_{\omega}(\omega,x) = \mathcal{F_t}(u(t,x)) $ meaning Fourier Transformed from $t$.Since this is the Helmholtz equation I used the already known Green's function solution:$$ u(t,x) = \mathcal{F}^{-1}\{ G(x) \ast \left[ F_{\omega} \delta(x) \right] \} $$$$ u(t,x) = \mathcal{F}^{-1}\{F_{\omega} \frac{j e^{jkx}}{2k}\} $$ (B)Where $j = \sqrt{-1} $ imaginary unit and $ G(x) = \frac{j e^{jkx}}{2k} $ is the Green's function for the inhomogeneous Helmoltz equation.Forgive-me for the simple question, but what would be the best way to evaluate B numerically, for any discrete source f(t) in a discrete grid?I was using FFT and IFFT but I was getting weird results, your guidance will help a lot.Edit:Another condition I want the energy vanishes at infinity $ x^+_-$ .
Numerically evaluate 1D inhomogeneous wave equation solution
numerical analysis;hyperbolic pde;wave propagation