A new method for obtaining exact analytical formulae for the roots of transcendental functions