Unconditionally stable solution for wave equations of the second order