Slove root of functions.