Find gradient from implicit equation (#533)