Let S be a semigroup, \(\sigma :S \rightarrow S\) an involutive automorphism or just a surjective homomorphism, and \(\mathbb {F}\) a field of characteristic \(\ne 2\) . We study solutions \(f,g_2, g_3,h_1,h_2, h_3 : S \rightarrow \mathbb {F}\) of the functional equation \(\begin{aligned} f(x\sigma (y)) = f(x)h_1(y) + g_2(x)h_2(y) + g_3(x)h_3(y), \ x,y \in S. \end{aligned}\) We show that if f is central then it is abelian, and find criteria on S and the equation for f to be central. We apply the results to trigonometric addition and subtraction laws on semigroups.