On the zeros of certain functions with application to bessel functions