Solve function roots.