Let R be a semiprime ring with the extended centroid C and Q the maximal right ring of quotients of R. Set [y, x]1 = [y, x] = yx − xy for x, y ∈ Q and inductively [y, x]k = [[y, x]k−1, x] for k > 1. Suppose that f : R → Q is an additive map satisfying [f(x), x]n = 0 for all x ∈ R, where n is a fixed positive integer. Then it can be shown that there exist λ ∈ C and an additive map μ : R → C such that f(x) = λx + μ(x) for all x ∈ R. This gives the affirmative answer to the unsolved problem of such functional identities initiated by Brešar in 1996.