Let S be a semigroup. Our main result is that we describe the complex-valued solutions of the following functional equationsg(xσ(y)) = g(x)g(y) + f(x)f(y), x, y ∈ S,f(xσ(y)) = f(x)g(y) + f(y)g(x), x, y ∈ S,andf(xσ(y)) = f(x)g(y) - f(y)g(x), x, y ∈ S,where σ : S → S is an automorphism that need not be involutive. As a consequence we show that the first two equations are equivalent to their variants.We also give some applications