1 Introduction

The problem we consider has its roots in d’Alembert’s classical results [2, 3] on the functional equations

$$\begin{aligned} f(x+y) + f(x-y) = 2f(x)f(y), \end{aligned}$$

for \(f:{\mathbb R}\rightarrow {\mathbb R}\), and

$$\begin{aligned} f(x+y) - f(x-y) = g(x)h(y) \end{aligned}$$

for \(f,g,h:{\mathbb R}\rightarrow {\mathbb R}\). The first of these equations was generalized by Wilson [10, 11], first to

$$\begin{aligned} f(x+y) + f(x-y) = 2f(x)g(y), \end{aligned}$$

and then to

$$\begin{aligned} f(x+y) + f(x-y) = 2g(x)h(y) \end{aligned}$$

for \(f,g,h:{\mathbb R}\rightarrow {\mathbb R}\).

These functional equations have been further generalized in several ways (more general domains and/or ranges, more unknown functions) by several authors. In this article our domain is a monoid (i.e. a semigroup with identity), and we replace the additive inverse in \({\mathbb R}\) by an involutive automorphism of the monoid. Our research extends results on the functional equations

$$\begin{aligned} f(xy) + f(\sigma (y)x) = 2f(x)f(y) \end{aligned}$$

and

$$\begin{aligned} f(xy) - f(\sigma (y)x) = g(x)h(y) \end{aligned}$$

for \(f,g,h:S \rightarrow {\mathbb C}\), where S is a monoid and \(\sigma :S \rightarrow S\) is a homomorphism such that \(\sigma (\sigma (x)) = x\) for all \(x\in S\). The first of these was solved by Stetkær [9] on semigroups, and the second was solved by Stetkær and the author [5] on groups and on monoids which are generated by their squares. The Wilson-type equation

$$\begin{aligned} f(xy) + f(\sigma (y)x) = 2f(x)g(y) \end{aligned}$$

was solved by Fadli et al. [6] on groups and on monoids generated by their squares. Also the results of Ng et al. [8] include the solution of

$$\begin{aligned} f(xy) + g(\sigma (y)x) = 2f(x)h(y) \end{aligned}$$

on groups.

All of the equations mentioned above are special cases of the functional equation

$$\begin{aligned} f(x y) + g(\sigma (y)x) = h(x)k(y), \quad x,y \in S. \end{aligned}$$

Our main goal is to solve this equation for \(f,g,h,k:S \rightarrow \mathbb {K}\), where \(\mathbb {K}\in \{{\mathbb R},{\mathbb C}\}\), S is either a group or a monoid generated by its squares, and \(\sigma :S\rightarrow S\) is a homomorphism satisfying \(\sigma \circ \sigma = id\). This is a full “Pexiderization” of both d’Alembert functional equations in the case of an involution that is homomorphic (rather than anti-homomorphic). The special case of this equation in which \(h = 2f\) was solved in [4], and several authors [1, 7] have treated similar equations with \(h = k\).

We will see that the sine addition and sine subtraction formulas play a key role in this investigation. This is not surprising since both d’Alembert’s and Wilson’s equations have continuous solutions involving cosine and sine functions.

While all of our results state the continuous solutions on topological groups and monoids, they include the general (i.e. purely algebraic) solutions if we take the discrete topology. In fact all of the algebraic results are valid for functions \(f,g,h,k:S \rightarrow K\) where K is any field with \(char(K) \ne 2\).

2 Notation and Terminology

Throughout this paper S denotes a group or a semigroup. A semigroup S is a monoid if it contains an identity element, that is an element e such that \(ex = xe = x\) for all \(x\in S\).

\(\mathbb {K}\) denotes a field which could be either \({\mathbb R}\) or \({\mathbb C}\), and \(\mathbb {K}^* = \mathbb {K}{\setminus } \{0\}\).

A homomorphism \(\sigma :S \rightarrow S\) is a called involutive (or an involution) if \(\sigma (\sigma (x)) = x\) for all \(x\in S\), in which case it is an automorphism. It is not difficult to verify that \(\sigma (e) = e\) for such a morphism.

For any function \(f:S \rightarrow \mathbb {K}\) where S is a semigroup with involution \(\sigma \), we define \(f_e,f_o:S \rightarrow \mathbb {K}\) by

$$\begin{aligned} f_e:= \dfrac{1}{2}(f + f\circ \sigma ) \quad \text { and } \quad f_o:= \dfrac{1}{2}(f - f\circ \sigma ). \end{aligned}$$

Then \(f_e\) is called the even part of f and \(f_o\) is the odd part of f (with respect to \(\sigma \)). Clearly \(f = f_e + f_o\).

An additive function on S is a homomorphism from S into the additive group \((\mathbb {K},+)\).

A multiplicative function on S is a homomorphism from S into the multiplicative monoid \((\mathbb {K},\cdot )\). Although a non-zero multiplicative function on a group can never take the value 0, it is possible for a multiplicative function \(\chi : S \rightarrow \mathbb {K}\) on a semigroup S to take the value 0 on a non-empty proper subset. If \(\chi \ne 0\), then

$$\begin{aligned} I_{\chi }:= \{ x \in S \mid \chi (x) = 0\} \end{aligned}$$

is either empty or a proper subset of S. That \(\chi \) is multiplicative means \(I_{\chi }\) is a two-sided ideal in S if not empty, and \(S {\setminus } I_{\chi }\) is a subsemigroup of S. The ideals \(I_{\chi }\) play an important role in our investigation on semigroups, and they account for the somewhat different forms of the solutions of our functional equations on semigroups and on groups. Where on a group we have a solution containing the exponential monomial term \(A\chi \) with A additive and \(\chi \) multiplicative, the corresponding term on a semigroup is

$$\begin{aligned} \Psi _{A\chi }(x) = {\left\{ \begin{array}{ll} A(x)\chi (x) &{} \text { when } x \in S{\setminus } I_{\chi } \\ 0 &{} \text { when } x \in I_{\chi } \end{array}\right. } \end{aligned}$$
(1)

where \(A:S{\setminus } I_\chi \rightarrow \mathbb {K}\) is an additive mapping on a subsemigroup. The notation \(\Psi _{A\chi }\) always refers to such a function, and \(\Psi _{A^2\chi }\) is defined in the same way with A replaced by \(A^2\). One could call such \(\Psi _{A\chi }\) and \(\Psi _{A^2\chi }\) exponential piecewise-monomials on a semigroup. On a group, \(I_{\chi }\) is empty so \(\Psi _{A\chi } = A\chi \) and \(\Psi _{A^2\chi } = A^2\chi \).

We will usually require our monoids to be generated by their squares. That means for each \(x\in S\) there exist an \(n\in {\mathbb N}\) and \(x_1,\ldots ,x_n \in S\) such that \(x = x_1^2 x_2^2 \cdots x_n^2\). If S happens to be commutative then this means that S is 2-divisible. Other conditions on S also suffice, such as S being regular.

For a topological space S, let \(\mathcal {C}(S,\mathbb {K})\) denote the algebra of continuous \(\mathbb {K}\)-valued functions on S.

We also need a convenient way to deal with solutions of the “homogeneous” equation

$$\begin{aligned} f(xy) - f(\sigma (y)x) = 0, \quad x,y \in S, \end{aligned}$$

for a given involutive automorphism \(\sigma \) on S. This forms a kind of degenerate case, since the solutions are highly dependent on the semigroup S. In a semigroup where \(st = t\) for all s and t, the only solutions are the constant functions. On the other hand if S is commutative and \(\sigma \) is the identity function on S, then every function is a solution. For this reason we shall find it convenient to define the nullspace

$$\begin{aligned} \mathcal {N}(S,\sigma ) := \{\theta \in \mathcal {C}(S,\mathbb {K}) \mid \theta (xy) = \theta (\sigma (y)x), \quad x,y \in S\} \end{aligned}$$

as the vector space of all solutions of this equation (normally \(\mathbb {K} = {\mathbb C}\) here unless \(\mathbb {K} = {\mathbb R}\) is dictated by the context).

3 Preliminaries

We begin by quoting [9, Theorem 2.1], which gives the solution of the variant of d’Alembert’s most well-known functional equation on semigroups with a homomorphic involution.

Proposition 3.1

Let S be a topological semigroup with an involutive automorphism \(\sigma :S \rightarrow S\). If \(h\in \mathcal {C}(S,\mathbb {C})\) satisfies

$$\begin{aligned} h(xy) + h(\sigma (y)x) = 2h(x)h(y), \quad x,y \in S, \end{aligned}$$
(2)

then

$$\begin{aligned} h = \dfrac{1}{2}(\chi + \chi \circ \sigma ) \end{aligned}$$

for some multiplicative \(\chi \in \mathcal {C}(S,{\mathbb C})\).

We will need the following consequence later.

Corollary 3.2

Let S be a topological semigroup with an involutive automorphism \(\sigma :S \rightarrow S\), and let \(c \in \mathbb {C}^*\). If \(h\in \mathcal {C}(S,\mathbb {C})\) satisfies

$$\begin{aligned} h(xy) + h(\sigma (y)x) = ch(x)h(y), \quad x,y \in S, \end{aligned}$$

then

$$\begin{aligned} h = \dfrac{1}{c}(\chi + \chi \circ \sigma ) \end{aligned}$$

for some multiplicative \(\chi \in \mathcal {C}(S,{\mathbb C})\).

Proof

Defining \(h' := ch/2\) we see that \(h'\) is a solution of (2), and the conclusion follows immediately.

The following result, which treats a partial Pexiderization of d’Alembert’s “other” functional equation, is from [5, Theorems 4.2 and 4.3]. The cases \(h=0\) or \(k=0\) are omitted because they are trivial. In either case the other of hk is arbitrary and \(f \in \mathcal {N}(S,\sigma )\).

Proposition 3.3

Let S be a topological group or topological monoid generated by its squares, let \(\sigma :S \rightarrow S\) be an involutive automorphism, and let \(f,h,k\in \mathcal {C}(S,\mathbb {C})\) with \(h\ne 0\) and \(k\ne 0\). Then the solutions of

$$\begin{aligned} f(xy) - f(\sigma (y)x) = h(x)k(y), \quad x,y \in S, \end{aligned}$$
(3)

belong to the following families, where \(\chi \in \mathcal {C}(S,{\mathbb C})\) is a nonzero multiplicative function, \(\theta \in \mathcal {N}(S,\sigma )\), \(A\in \mathcal {C}(S{\setminus } I_\chi ,{\mathbb C})\) is a nonzero additive mapping with \(A\circ \sigma = -A\), with \(b\in \mathbb {C}^*\) and \(b_1,b_2 \in \mathbb {C}\).

  1. (a)

    For \(\chi \circ \sigma \ne \chi \) we have

    $$\begin{aligned} f&= \theta + b[b_1(\chi + \chi \circ \sigma ) + b_2(\chi - \chi \circ \sigma )], \\ h&= b_1(\chi - \chi \circ \sigma ) + b_2(\chi + \chi \circ \sigma ), \quad k = b(\chi - \chi \circ \sigma ). \end{aligned}$$
  2. (b)

    For \(\chi \circ \sigma = \chi \) we have

    $$\begin{aligned} f = \theta + b\Psi _{A\chi } + b_1 \Psi _{A^2\chi },\quad h = 2b\chi + 4b_1 \Psi _{A\chi }, \quad k = \Psi _{A\chi }. \end{aligned}$$

In the group case \(I_\chi \) is empty, \(\Psi _{A\chi } = A\chi \), and \(\Psi _{A^2\chi } = A^2\chi \).

We also need the following two results dealing with the sine addition and sine subtraction formulas on groups and semigroups with an involutive automorphism. The first is (a corollary of) [5, Proposition 3.6].

Proposition 3.4

Let S be a topological group or topological monoid generated by its squares, let \(\sigma :S \rightarrow S\) be an involutive automorphism, and let \(h,k\in \mathcal {C}(S,\mathbb {C})\) with \(h\ne 0\). Then the solutions of the sine subtraction formula

$$\begin{aligned} h(y\sigma (x)) = h(y)k(x) - k(y) h(x), \quad x,y \in S, \end{aligned}$$

belong to the following families, where \(\chi \in \mathcal {C}(S,{\mathbb C})\) is a nonzero multiplicative function, \(A\in \mathcal {C}(S{\setminus } I_\chi ,{\mathbb C})\) is a nonzero additive function such that \(A\circ \sigma = -A\), with constants \(b\in \mathbb {C}^*\) and \(c \in \mathbb {C}\).

  1. (a)

    If \(\chi \ne \chi \circ \sigma \), then

    $$\begin{aligned} h = b(\chi - \chi \circ \sigma ), \quad k = \frac{1}{2}(\chi + \chi \circ \sigma ) + c(\chi - \chi \circ \sigma ). \end{aligned}$$
  2. (b)

    If \(\chi = \chi \circ \sigma \), then

    $$\begin{aligned} h = \Psi _{A\chi }, \quad k = \chi + c \Psi _{A\chi }. \end{aligned}$$

In the group case \(I_\chi = \emptyset \) and \(\Psi _{A\chi } = A\chi \).

The next result is a corollary of [5, Lemma 3.4].

Proposition 3.5

Let S be a topological group or topological monoid generated by its squares, and let \(f,g\in \mathcal {C}(S,\mathbb {C})\) with \(f\ne 0\). Then the solutions of the sine addition formula

$$\begin{aligned} f(xy) = f(x)g(y) + f(y) g(x), \quad x,y \in S, \end{aligned}$$

belong to the following families, where \(\chi ,\chi _1,\chi _2\in \mathcal {C}(S,{\mathbb C})\) are multiplicative functions, \(A\in \mathcal {C}(S{\setminus } I_\chi ,{\mathbb C})\) is a nonzero additive function, and \(b \in \mathbb {C}^*\).

  1. (a)

    For \(\chi _1 \ne \chi _2\),

    $$\begin{aligned} f = b(\chi _1 - \chi _2), \quad g = \frac{1}{2}(\chi _1 + \chi _2). \end{aligned}$$
  2. (b)

    For \(\chi \ne 0\),

    $$\begin{aligned} f = \Psi _{A\chi }, \quad g = \chi . \end{aligned}$$

In the group case \(I_\chi = \emptyset \) and \(\Psi _{A\chi } = A\chi \).

4 The Main Result

Now we begin to focus on our primary objective, which is to solve the fully Pexiderized d’Alembert equation

$$\begin{aligned} f(xy) + g(\sigma (y)x) = h(x)k(y), \quad x,y \in S. \end{aligned}$$
(4)

The solution is given in Theorem 4.6 below.

We attain our goal through a series of four lemmas.

Lemma 4.1

Let S be a topological group or topological monoid generated by its squares, let \(\sigma :S \rightarrow S\) be an involutive automorphism, and let \(f,g,h,k\in \mathcal {C}(S,\mathbb {C})\). If \(h\ne 0\), \(h(e) = 0\), and \(k(e)\ne 0\), then the solutions of (4) are the following. Here \(\chi \in \mathcal {C}(S,{\mathbb C})\) is a nonzero multiplicative function, \(\theta \in \mathcal {N}(S,\sigma )\), \(A\in \mathcal {C}(S{\setminus } I_\chi ,{\mathbb C})\) is a nonzero additive mapping with \(A\circ \sigma = -A\), with \(a,b\in \mathbb {C}^*\).

  1. (i)

    For \(\chi \circ \sigma \ne \chi \),

    $$\begin{aligned} f = \theta + ab\chi , \quad g = - \theta - ab\chi \circ \sigma , \quad h = b(\chi - \chi \circ \sigma ), \quad k = a\chi . \end{aligned}$$
  2. (ii)

    For \(\chi \circ \sigma = \chi \),

    $$\begin{aligned} f =&\theta + a\Psi _{A\chi } + ac\Psi _{A^2\chi }, \quad g = -\theta + a\Psi _{A\chi } - ac\Psi _{A^2\chi }, \quad \\ h =&2\Psi _{A\chi }, \quad k = a(\chi + 2c\Psi _{A\chi }). \end{aligned}$$

In the group case \(I_\chi = \emptyset \), \(\Psi _{A\chi } = A\chi \), and \(\Psi _{A^2\chi } = A^2\chi \).

Proof

With \(y = e\) in (4) we find that \(f + g = k(e)h\), so with \(a = k(e)\in \mathbb {C}^*\) we have

$$\begin{aligned} g = -f + ah. \end{aligned}$$

Now rewrite (4) as

$$\begin{aligned} f(xy) - f(\sigma (y)x) = h(x)k(y) - ah(\sigma (y)x), \quad x,y \in S. \end{aligned}$$
(5)

With \(x = e\) here we get

$$\begin{aligned} f - f\circ \sigma = - ah\circ \sigma \end{aligned}$$
(6)

since \(h(e) = 0\). Thus

$$\begin{aligned} -ah = (f - f\circ \sigma )\circ \sigma = f\circ \sigma - f = ah\circ \sigma , \end{aligned}$$

so \(h = -h\circ \sigma = h_o\) is odd (with respect to \(\sigma \)) and \((1/2)f_o = f - f\circ \sigma = ah\). Replacing (xy) by \((\sigma (y),x)\) in (5) yields

$$\begin{aligned} f(\sigma (y)x) - f\circ \sigma (xy) = h(\sigma (y))k(x) - ah\circ \sigma (xy) = - h(y)k(x) + ah(xy). \end{aligned}$$

Adding this to (5) we get

$$\begin{aligned} f(xy) - f\circ \sigma (xy) = h(x)k(y) - ah(\sigma (y)x) - h(y)k(x) + ah(xy), \end{aligned}$$

which reduces to a kind of sine subtraction formula

$$\begin{aligned} ah(\sigma (y)x) = h(x)k(y) - h(y)k(x), \quad x,y \in S. \end{aligned}$$

In fact using \(h\circ \sigma = -h\) we can rewrite the equation as

$$\begin{aligned} h(y\sigma (x)) = h(y)\cdot \dfrac{1}{a}k(x) - \dfrac{1}{a}k(y)\cdot h(x), \quad x,y \in S. \end{aligned}$$

By Proposition 3.4 we have two solution families. From family (a) we get

$$\begin{aligned} k = \frac{a}{2}(\chi + \chi \circ \sigma ) + ac(\chi - \chi \circ \sigma ), \quad h = b(\chi - \chi \circ \sigma ), \end{aligned}$$

for nonzero \(\chi \in \mathcal {C}(S,{\mathbb C})\) with \(\chi \ne \chi \circ \sigma \) and constants bc with \(b\in \mathbb {C}^*\). Now we have \(f - f\circ \sigma = ah = ab(\chi - \chi \circ \sigma )\), so defining \(\delta := f - ab\chi \) we find that \(f = \delta + ab\chi \), \(\delta = \delta \circ \sigma \), and \(g = -f + ah = - \delta - ab\chi \circ \sigma \). Checking, we find that (5) is satisfied only if

$$\begin{aligned} \delta (xy) - \delta (\sigma (y)x) = ab\left( c - \dfrac{1}{2}\right) [\chi (x) - \chi \circ \sigma (x)][\chi (y) - \chi \circ \sigma (y)], \quad x,y \in S. \end{aligned}$$

This means that \(\theta := \delta - ab(c - 1/2)(\chi + \chi \circ \sigma ) \in \mathcal {N}(S,\sigma )\) and we have

$$\begin{aligned} f =&\theta + ab\chi - ab\left( c - \frac{1}{2}\right) (\chi + \chi \circ \sigma ),\\ g =&-\theta - ab\chi \circ \sigma + ab\left( c - \frac{1}{2}\right) (\chi + \chi \circ \sigma ). \end{aligned}$$

Inserting these forms into (4) we find after simplification that

$$\begin{aligned} (1 - 2c)[\chi (x) -\chi \circ \sigma (x)]\chi (y) = 0, \quad x,y \in S. \end{aligned}$$

Hence \(c = 1/2\) and we have solution (i).

From family (b) of Proposition 3.4 we have

$$\begin{aligned} k = a(\chi + c \Psi _{A\chi }), \quad h = \Psi _{A\chi }. \end{aligned}$$

for nonzero \(\chi \in \mathcal {C}(S,{\mathbb C})\) with \(\chi = \chi \circ \sigma \), additive \(A\in \mathcal {C}(S{\setminus } I_\chi ,{\mathbb C})\) such that \(A\circ \sigma = -A \ne 0\), and \(c\in {\mathbb C}\). Here \(f - f\circ \sigma = ah = a\Psi _{A\chi } = (a/2)[\Psi _{A\chi } - \Psi _{A\chi }\circ \sigma ]\), since \(\Psi _{A\chi }\circ \sigma = -\Psi _{A\chi }\). Thus the function \(\delta : = f - (a/2)\Psi _{A\chi }\) is even with respect to \(\sigma \). Now \(f = \delta + (a/2)\Psi _{A\chi }\) and \(g = -f + ah = -\delta + (a/2)\Psi _{A\chi }\). Substituting into (5) we find that

$$\begin{aligned} \delta (xy) - \delta (\sigma (y)x) + \dfrac{a}{2}\Psi _{A\chi }(xy) + \dfrac{a}{2}\Psi _{A\chi }(\sigma (y)x) = \Psi _{A\chi }(x)a(\chi + c \Psi _{A\chi })(y). \end{aligned}$$

For x or y in \(I_\chi \) this means the restriction of \(\delta \) to \(I_\chi \) is in the nullspace \(\mathcal {N}(I_\chi ,\sigma )\). For \(x,y \in S{\setminus } I_\chi \) the equation reduces to

$$\begin{aligned} \delta (xy) - \delta (\sigma (y)x) = a c A(x)A(y)\chi (x)\chi (y) = \dfrac{ac}{4}[A^2(xy) - A^2(\sigma (y)x)]\chi (x)\chi (y). \end{aligned}$$

Therefore

$$\begin{aligned} \delta - \dfrac{ac}{4}\Psi _{A^2\chi } =: \theta \in \mathcal {N}(S,\sigma ). \end{aligned}$$

Replacing A by 2A we have solution (ii).

It is easily checked that (i) and (ii) form solutions of (4), and this completes the proof.

Recall now that \(\phi _e\) and \(\phi _o\) are, respectively, the even and odd parts of a function \(\phi \) (with respect to \(\sigma \)).

Lemma 4.2

Let S be a topological semigroup with an involutive automorphism \(\sigma :S \rightarrow S\), and let \(f,g,h,k\in \mathcal {C}(S,\mathbb {C})\) be a solution of (4) with \(h(e) \ne 0\) and \(k(e)\ne 0\). Then we have

  1. (i)

    \(g = -f + ah\),

  2. (ii)

    \(k = \dfrac{1}{b}(2f_o + ah\circ \sigma )\),

  3. (iii)

    \(f_o(y)h_o(x) = f_o(x)h_o(y)\),

  4. (iv)

    \(h_e = \dfrac{b}{2}(\chi + \chi \circ \sigma )\),

  5. (v)
    $$\begin{aligned}&2f_o(xy) - f_o(x)(\chi + \chi \circ \sigma )(y) - f_o(y)(\chi + \chi \circ \sigma )(x)\\&\quad = a[h_o(xy) - h_o(\sigma (y)x) - (\chi + \chi \circ \sigma )(x)h_o(y)]. \end{aligned}$$

where \(\chi \in \mathcal {C}(S,{\mathbb C})\) is a nonzero multiplicative function and \(a,b\in \mathbb {C}^*\).

Proof

With \(y = e\) in (4) we find that \(f + g = k(e)h\), and with \(a = k(e) \in \mathbb {C}^*\) this is item (i). Now rewriting (4) as

$$\begin{aligned} f(xy) - f(\sigma (y)x) = h(x)k(y) - ah(\sigma (y)x), \end{aligned}$$
(7)

and putting \(x = e\) here we have \(f - f\circ \sigma = h(e)k - ah\circ \sigma \), which is item (ii) with \(b = h(e) \in \mathbb {C}^*\).

Next rewrite (7) as

$$\begin{aligned} f(xy) - f(\sigma (y)x) = h(x)\dfrac{1}{b}(f - f\circ \sigma + ah\circ \sigma )(y) - ah(\sigma (y)x), \quad x,y \in S. \end{aligned}$$

Here we replace (xy) by \((\sigma (y),x)\) to get

$$\begin{aligned} f(\sigma (y)x) - f\circ \sigma (xy) = h(\sigma (y))\dfrac{1}{b}(f - f\circ \sigma + ah\circ \sigma )(x) - ah(\sigma (xy)). \end{aligned}$$

Adding these two equations we find that

$$\begin{aligned} 2f_o(xy) =&\dfrac{1}{b}[2f_o(y)h(x) + 2f_o(x)h(\sigma (y))] \nonumber \\&+ \dfrac{2a}{b}h_e(x)h\circ \sigma (y) - a[h(\sigma (y)x) + h(\sigma (xy))]. \end{aligned}$$
(8)

Now replacing (xy) by \((\sigma (x),\sigma (y))\) here we obtain

$$\begin{aligned} - 2f_o(xy) =&- \dfrac{1}{b}[2f_o(y)h(\sigma (x)) + 2f_o(x)h(y)] \\&+ \dfrac{2a}{b}h_e(x)h(y) - a[h(y\sigma (x)) + h(xy)], \end{aligned}$$

and summing these last two equations we arrive at

$$\begin{aligned}&\dfrac{4}{b}[f_o(y)h_o(x) - f_o(x)h_o(y)] + \dfrac{4a}{b}h_e(x)h_e(y)\\&\quad = a[h(\sigma (y)x) + h(\sigma (xy)) + h(y\sigma (x)) + h(xy)], \end{aligned}$$

which reduces to

$$\begin{aligned} 4[f_o(y)h_o(x) - f_o(x)h_o(y)] = ab\left[ 2h_e(xy) + 2h_e(\sigma (y)x) - \dfrac{4}{b}h_e(x)h_e(y)\right] . \end{aligned}$$

Under the transformation \((x,y) \mapsto (\sigma (y),x)\) the left side of this equation is negated while the right side is unchanged, therefore both sides are equal to 0. Thus we have item (iii) and

$$\begin{aligned} h_e(xy) + h_e(\sigma (y)x) = \dfrac{2}{b}h_e(x)h_e(y). \end{aligned}$$

The solution of the latter equation is found by Corollary 3.2 to be item (iv) for some multiplicative \(\chi \in \mathcal {C}(S,{\mathbb C})\).

Splitting h into \(h_e + h_o\) and using items (iii) and (iv) in (8), we find after some calculation that the pair \((f_o,h_o)\) also satisfy the equation in item (v).

Finally we note that \(\chi \ne 0\), because (iv) implies \(0 \ne h(e) = h_e(e) = b\chi (e)\).

Before stating the next lemma we make a simple observation. Let \(\chi :S \rightarrow \mathbb {K}\) be multiplicative. If \(\chi + \chi \circ \sigma = 0\) then \(\chi (e) = 0\), so \(\chi (x) = \chi (x)\chi (e) = 0\) for all \(x\in S\). Thus it is not possible for a nonzero \(\chi \) to satisfy \(\chi + \chi \circ \sigma = 0\).

Lemma 4.3

Let S be a topological group or topological monoid generated by its squares, let \(\sigma :S \rightarrow S\) be an involutive automorphism, and let \(f,g,h,k\in \mathcal {C}(S,\mathbb {C})\). If \(h(e) \ne 0\), \(k(e)\ne 0\), and either f or h is even with respect to \(\sigma \), then the solutions of (4) are the following, where \(\chi \in \mathcal {C}(S,{\mathbb C})\) is a nonzero multiplicative function, \(\theta \in \mathcal {N}(S,\sigma )\), \(A\in \mathcal {C}(S{\setminus } I_\chi ,{\mathbb C})\) is an additive mapping with \(A\circ \sigma = -A\), and \(a,b\in \mathbb {C}^*\) and \(c \in \mathbb {C}\).

  1. (i)

    For any \(\chi (\ne 0)\),

    $$\begin{aligned} f&= \theta + \dfrac{a}{b}(b^2 - c^2)(\chi + \chi \circ \sigma ),\\ g&= - \theta + \dfrac{a}{b}(b^2 + c^2)(\chi + \chi \circ \sigma ) + 2ac(\chi - \chi \circ \sigma ),\\ h&= b(\chi + \chi \circ \sigma ) + c(\chi - \chi \circ \sigma ),\quad k = a(\chi + \chi \circ \sigma ) - \dfrac{ac}{b}(\chi - \chi \circ \sigma ). \end{aligned}$$
  2. (ii)

    For \(\chi = \chi \circ \sigma \),

    $$\begin{aligned} f&= \theta - \dfrac{a}{4b}\Psi _{A^2\chi },\quad g = - \theta + ab\chi + a\Psi _{A\chi } + \dfrac{a}{4b}\Psi _{A^2\chi },\\ h&= b\chi + \Psi _{A\chi },\quad k = a\chi - \dfrac{a}{b}\Psi _{A\chi }. \end{aligned}$$
  3. (iii)

    For \(\chi \ne \chi \circ \sigma \),

    $$\begin{aligned} f&= \theta + \dfrac{ab}{4}(\chi + \chi \circ \sigma ) + b(\chi - \chi \circ \sigma ),\quad g = - \theta + \dfrac{ab}{4}(\chi + \chi \circ \sigma ) - b(\chi - \chi \circ \sigma ),\\ h&= \dfrac{b}{2}(\chi + \chi \circ \sigma ),\quad k = \dfrac{a}{2}(\chi + \chi \circ \sigma ) + 2(\chi - \chi \circ \sigma ). \end{aligned}$$
  4. (iv)

    For \(A \ne 0\) and \(\chi = \chi \circ \sigma \),

    $$\begin{aligned} f = \theta + \Psi _{A\chi },\quad g = - \theta + ab\chi - \Psi _{A\chi },\quad h = b\chi ,\quad k = a\chi + \dfrac{2}{b}\Psi _{A\chi }. \end{aligned}$$

In the group case \(I_\chi = \emptyset \), \(\Psi _{A\chi } = A\chi \), and \(\Psi _{A^2\chi } = A^2\chi \).

Proof

We have two cases to consider.

Case 1 Suppose f is even. Then \(f_o = 0\) and by Lemma 4.2 there exist \(a,b\in \mathbb {C}^*\) and nonzero multiplicative \(\chi \in \mathcal {C}(S,{\mathbb C})\) such that

$$\begin{aligned} g = -f + ah , \quad k = \dfrac{a}{b}h\circ \sigma , \quad h = h_e + h_o = \dfrac{b}{2}(\chi + \chi \circ \sigma ) + h_o, \end{aligned}$$

and

$$\begin{aligned} h_o(xy) - h_o(\sigma (y)x) = (\chi + \chi \circ \sigma )(x)h_o(y). \end{aligned}$$
(9)

Since \(\chi + \chi \circ \sigma \ne 0\) we may read the solutions from Proposition 3.3 unless \(h_o = 0\). Suppose for the moment that \(h_o \ne 0\). In solution (a) of Proposition 3.3 we must take \(\theta = 0\), \(b_1 = 0\), \(b_2 = 1\) so that \(h_o = c(\chi - \chi \circ \sigma )\) for some \(c\in \mathbb {C}\). Allowing for \(c = 0\) includes the possibility that \(h_o = 0\), so in any case we now have

$$\begin{aligned} h = \dfrac{b}{2}(\chi + \chi \circ \sigma ) + c(\chi - \chi \circ \sigma ). \end{aligned}$$

Inserting the forms for ghk into (4) we find after some calculation that

$$\begin{aligned} f(xy) - f(\sigma (y)x) = \dfrac{a}{b}\left( \dfrac{b^2}{4} - c^2\right) [(\chi + \chi \circ \sigma )(xy) - (\chi + \chi \circ \sigma )(\sigma (y)x)]. \end{aligned}$$

Thus we have

$$\begin{aligned} f = \theta + \dfrac{a}{b}\left( \dfrac{b^2}{4} - c^2\right) (\chi + \chi \circ \sigma ) \end{aligned}$$

for some \(\theta \in \mathcal {N}(S,\sigma )\). It follows that

$$\begin{aligned} k&= \dfrac{a}{b}h\circ \sigma = \dfrac{a}{2}(\chi + \chi \circ \sigma ) - \dfrac{ac}{b}(\chi - \chi \circ \sigma ),\\ g&= -f + ah = - \theta + \dfrac{a}{b}\left( \dfrac{b^2}{4} + c^2\right) (\chi + \chi \circ \sigma ) + ac(\chi - \chi \circ \sigma ). \end{aligned}$$

One can check that this quadruplet (fghk) is a solution of (4). Replacing (ab) by (2a, 2b), this is solution (i).

The solution of (9) provided by Proposition 3.3(b) in case \(h_o \ne 0\) is \(h_o = \Psi _{A\chi }\) with \(\chi = \chi \circ \sigma \) and nonzero additive \(A = -A\circ \sigma \). Since \(h_o\) may vanish here we admit the possibility that \(A = 0\). Now we have

$$\begin{aligned} h = b\chi + \Psi _{A\chi }, \quad g = -f + ab\chi + a\Psi _{A\chi } , \quad k = a\chi - \dfrac{a}{b}\Psi _{A\chi }. \end{aligned}$$

Inserting these into (4) and simplifying we get

$$\begin{aligned}&f(xy) - f(\sigma (y)x) + a\Psi _{A\chi }(\sigma (y)x) \\&\quad = a\chi (y)\Psi _{A\chi }(x) - a\chi (x)\Psi _{A\chi }(y) - \dfrac{a}{b}\Psi _{A\chi }(x)\Psi _{A\chi }(y). \end{aligned}$$

For \(x\in I_\chi \) or \(y\in I_\chi \) this shows that the restriction of f to \(I_\chi \) belongs to \(\mathcal {N}(I_\chi ,\sigma )\). For \(x,y \in S{\setminus } I_{\chi }\) we have

$$\begin{aligned} f(xy) - f(\sigma (y)x)&= - \dfrac{a}{b}A(x)A(y)\chi (x)\chi (y) \\&= - \dfrac{a}{4b}[A^2(xy)\chi (\sigma (y)x) - A^2(xy)\chi (\sigma (y)x)], \end{aligned}$$

which means that \(f + (a/4b)A^2\chi = \theta \in \mathcal {N}(S,\sigma )\). Thus we arrive at solution (ii).

Case 2 Suppose f is not even; then by hypothesis h is even, so \(h_o = 0\). Lemma 4.2 shows that there exist \(a,b\in \mathbb {C}^*\) and a nonzero multiplicative \(\chi \in \mathcal {C}(S,{\mathbb C})\) for which

$$\begin{aligned} g = -f + ah , \quad k = \dfrac{1}{b}(2f_o + ah), \quad h = \dfrac{b}{2}(\chi + \chi \circ \sigma ), \end{aligned}$$

and \(f_o\) satisfies the sine addition formula

$$\begin{aligned} f_o(xy) = f_o(x)\cdot \dfrac{1}{2}(\chi + \chi \circ \sigma )(y) + f_o(y)\cdot \dfrac{1}{2}(\chi + \chi \circ \sigma )(x). \end{aligned}$$

Since f is not even we have \(f_o \ne 0\) and the solutions are given by Proposition 3.5, which provides the following two solution forms.

Form (a) is \(f_o = b(\chi _1 - \chi _2)\) with \(\frac{1}{2}(\chi + \chi \circ \sigma ) = \frac{1}{2}(\chi _1 + \chi _2)\) for two multiplicative functions \(\chi _1 \ne \chi _2 \in \mathcal {C}(S,{\mathbb C})\) and constant \(b\in \mathbb {C}^*\). Since \(\chi \ne 0\) and distinct nonzero multiplicative functions are linearly independent, we may without loss of generality take \(\chi _1 = \chi \) and \(\chi _2 = \chi \circ \sigma \). Thus

$$\begin{aligned} f_o = b(\chi - \chi \circ \sigma ) \quad \text { with } \quad \chi \ne \chi \circ \sigma . \end{aligned}$$

Updating ghk now we have

$$\begin{aligned} h&= \dfrac{b}{2}(\chi + \chi \circ \sigma ), \quad g = -f + \dfrac{ab}{2}(\chi + \chi \circ \sigma ),\quad \\ k&= 2(\chi - \chi \circ \sigma ) + \dfrac{a}{2}(\chi + \chi \circ \sigma ). \end{aligned}$$

Substituting into (4) we can arrange the result as

$$\begin{aligned}&f(xy) - \left( \dfrac{ab}{4} + b\right) \chi (xy) - \left( \dfrac{ab}{4} - b\right) \chi \circ \sigma (xy)\\&\quad = f(\sigma (y)x) - \left( \dfrac{ab}{4} + b\right) \chi (\sigma (y)x) - \left( \dfrac{ab}{4} - b\right) \chi \circ \sigma (\sigma (y)x). \end{aligned}$$

Therefore we have

$$\begin{aligned} f = \theta + \dfrac{ab}{4}(\chi + \chi \circ \sigma ) + b(\chi - \chi \circ \sigma ) \end{aligned}$$

for \(\theta \in \mathcal {N}(S,\sigma )\), and this is solution (iii).

Finally, solution form (b) from Proposition 3.5 yields \(f_o = \Psi _{A\chi }\) for a nonzero multiplicative \(\chi \in \mathcal {C}(S,{\mathbb C})\) with \(\chi = \chi \circ \sigma \) and a nonzero additive function \(A\in \mathcal {C}(S{\setminus } I_\chi ,{\mathbb C})\). In this case we get from Lemma 4.2

$$\begin{aligned} g = -f + ab\chi , \quad k = a\chi + \dfrac{2}{b}\Psi _{A\chi }, \quad h = b\chi . \end{aligned}$$

Inserting all into (4) we find that

$$\begin{aligned} f_e(xy) + \Psi _{A\chi }(xy) - f_e(\sigma (y)x) - \Psi _{A\chi }(\sigma (y)x) = 2\chi (x)\Psi _{A\chi }(y). \end{aligned}$$

For \(x\in I_\chi \) this reduces to \(f_e(xy) = f_e(\sigma (y)x)\), and the same is true if \(y\in I_\chi \). Now supposing \(x,y \in S{\setminus } I_\chi \) we get

$$\begin{aligned} f_e(xy) - f_e(\sigma (y)x) = \chi (x)[A(y) + A\circ \sigma (y)]\chi (y). \end{aligned}$$

The solutions of this functional equation are determined by Proposition 3.3(b) provided that \(A + A\circ \sigma \ne 0\), but that solution fits only if \(A = 0\), a contradiction. Therefore \(A\circ \sigma = -A\) and \(f_e = \theta \in \mathcal {N}(S,\sigma )\). This is solution (iv).

It can be checked that (i)–(iv) form solutions of (4), and with that the proof is finished.

The next lemma is the last before our main result. For one part of the proof we need to assume that one of our unknown functions is central in the case \(\mathbb {K} = {\mathbb C}\). What this means for a function \(\phi :S \rightarrow {\mathbb C}\) is that \(\phi (xy) = \phi (yx)\) for all xy in the domain of \(\phi \).

Lemma 4.4

Let S be a topological group or topological monoid generated by its squares, let \(\sigma :S \rightarrow S\) be an involutive automorphism, and let \(f,g,h,k\in \mathcal {C}(S,\mathbb {K})\). Suppose \(h(e) \ne 0\), \(k(e)\ne 0\), and neither f nor h is even, so \(f_o \ne 0\) and \(h_o\ne 0\). Furthermore we assume that either \(\mathbb {K} = {\mathbb R}\) or that \(f_o\) is central. Then the solutions of (4) fall into the following families, where \(\chi \in \mathcal {C}(S,{\mathbb C})\) is a nonzero multiplicative function, \(\theta \in \mathcal {N}(S,\sigma )\), \(A\in \mathcal {C}(S{\setminus } I_\chi ,{\mathbb C})\) is a nonzero additive mapping with \(A\circ \sigma = -A\), and \(a,b,c,d \in \mathbb {K}^*\).

  1. (i)

    For \(\chi \ne \chi \circ \sigma \),

    $$\begin{aligned} f&= \theta + \left( \dfrac{ab}{4} + \dfrac{(2 - ac)cd^2}{b}\right) (\chi + \chi \circ \sigma ) + d(\chi - \chi \circ \sigma ), \\ g&= -\theta + \left( \dfrac{ab}{4} - \dfrac{(2 - ac)cd^2}{b}\right) (\chi + \chi \circ \sigma ) + (ac - 1)d(\chi - \chi \circ \sigma ),\\ h&= \dfrac{b}{2}(\chi + \chi \circ \sigma ) + cd(\chi - \chi \circ \sigma ), \\ k&= \dfrac{a}{2}(\chi + \chi \circ \sigma ) + \dfrac{(2 - ac)d}{b}(\chi - \chi \circ \sigma ). \end{aligned}$$
  2. (ii)

    For \(\chi = \chi \circ \sigma \),

    $$\begin{aligned} f&= \theta + \Psi _{A\chi } + \dfrac{(2 - ac)c}{4b}\Psi _{A^2\chi }, \\ g&= -\theta + ab\chi + (ac - 1)\Psi _{A\chi } - \dfrac{(2 - ac)c}{4b}\Psi _{A^2\chi },\\ h&= b\chi + c\Psi _{A\chi }, \quad k = a\chi + \dfrac{2 - ac}{b}\Psi _{A\chi }. \end{aligned}$$

In the group case \(I_\chi = \emptyset \), \(\Psi _{A\chi } = A\chi \), and \(\Psi _{A^2\chi } = A^2\chi \).

Proof

Under the conditions here, Lemma 4.2(i)–(iv) tells us there exist a nonzero multiplicative \(\chi \in \mathcal {C}(S,{\mathbb C})\) and \(a,b\in \mathbb {K}^*\) for which

$$\begin{aligned} g&= -f + ah, \quad h_e = \dfrac{b}{2}(\chi + \chi \circ \sigma ), \\ k&= \dfrac{1}{b}(2f_o + ah\circ \sigma ), \quad f_o(y)h_o(x) = f_o(x)h_o(y). \end{aligned}$$

The last of these equations entails \(h_o = cf_o\) for some \(c \in \mathbb {K}^*\) since \(h_o, f_o \ne 0\). Updating h with this information we find that

$$\begin{aligned} h = h_e + h_o = \dfrac{b}{2}(\chi + \chi \circ \sigma ) + cf_o, \end{aligned}$$
(10)

and with this we have

$$\begin{aligned} g = -f + acf_o + \dfrac{ab}{2}(\chi + \chi \circ \sigma ) \quad \text { and } \quad k = \dfrac{2 - ac}{b}f_o + \dfrac{a}{2}(\chi + \chi \circ \sigma ). \end{aligned}$$
(11)

Also Lemma 4.2(v) provides

$$\begin{aligned}&2f_o(xy) - f_o(x)(\chi + \chi \circ \sigma )(y) - f_o(y)(\chi + \chi \circ \sigma )(x)\\&\quad = a[h_o(xy) - h_o(\sigma (y)x) - (\chi + \chi \circ \sigma )(x)h_o(y)], \end{aligned}$$

and replacing \(h_o\) here by \(cf_o\) we find that

$$\begin{aligned}&(2 - ac)f_o(xy) + acf_o(\sigma (y)x) \nonumber \\&\quad = f_o(x)(\chi + \chi \circ \sigma )(y) + (1 - ac)f_o(y)(\chi + \chi \circ \sigma )(x). \end{aligned}$$
(12)

Replacing (xy) by \((\sigma (y),x)\) we get

$$\begin{aligned}&(2 - ac)f_o(\sigma (y)x) - acf_o(xy) \\&\quad = (1 - ac)f_o(x)(\chi + \chi \circ \sigma )(y) - f_o(y)(\chi + \chi \circ \sigma )(x), \end{aligned}$$

since \(f_o\) is odd. Subtracting ac times this equation from \((2-ac)\) times (12) we arrive at

$$\begin{aligned}&2(2 - 2ac + (ac)^2)f_o(xy) \nonumber \\&\quad = (2 - 2ac + (ac)^2)[f_o(y)(\chi + \chi \circ \sigma )(x) + f_o(x)(\chi + \chi \circ \sigma )(y)]. \end{aligned}$$
(13)

Now consider two cases.

Case 1 Suppose \(\mathbb {K} = {\mathbb R}\). Then \(ac\ne 1 \pm i\) and (13) is a sine addition formula

$$\begin{aligned} f_o(xy) = f_o(x)\cdot \dfrac{1}{2}(\chi + \chi \circ \sigma )(y) + f_o(y)\cdot \dfrac{1}{2}(\chi + \chi \circ \sigma )(x). \end{aligned}$$

Taking the first solution (form (a)) from Proposition 3.5 we have (as in the previous lemma) \(f_o = d(\chi - \chi \circ \sigma )\) for \(\chi \ne \chi \circ \sigma \) and some \(d \in {\mathbb R}^*\). Updating ghk from (10), (11) we get

$$\begin{aligned} g&= -f_e + \dfrac{ab}{2}(\chi + \chi \circ \sigma ) + (ac - 1)d(\chi - \chi \circ \sigma ),\\ h&= \dfrac{b}{2}(\chi + \chi \circ \sigma ) + cd(\chi - \chi \circ \sigma ), \quad k = \dfrac{a}{2}(\chi + \chi \circ \sigma ) + \dfrac{(2 - ac)d}{b}(\chi - \chi \circ \sigma ). \end{aligned}$$

Checking these in (4) we find after some calculation that

$$\begin{aligned}&f_e(xy) - \left( \dfrac{ab}{4} + \dfrac{(2 - ac)cd^2}{b}\right) (\chi + \chi \circ \sigma )(xy)\\&\quad = f_e(\sigma (y)x) - \left( \dfrac{ab}{4} + \dfrac{(2 - ac)cd^2}{b}\right) (\chi + \chi \circ \sigma )(\sigma (y)x), \end{aligned}$$

which leads to solution (i).

Solution form (b) for \(f_o \ne 0\) from Proposition 3.5 is \(f_o = \Psi _{A\chi }\) where \(\chi = \chi \circ \sigma \) and \(A\in \mathcal {C}(S{\setminus } I_\chi ,{\mathbb C})\) is a nonzero additive function. The corresponding forms of ghk in this case are

$$\begin{aligned} g = - f_e + ab\chi + (ac - 1)\Psi _{A\chi }, \quad h = b\chi + c\Psi _{A\chi }, \quad k = a\chi + \dfrac{2 - ac}{b}\Psi _{A\chi }. \end{aligned}$$

Putting these into (4) and simplifying we arrive at

$$\begin{aligned}&f_e(xy) + \Psi _{A\chi }(xy) - f_e(\sigma (y)x) + (ac - 1)\Psi _{A\chi }(\sigma (y)x)\\&\quad = ac\Psi _{A\chi }(x)\chi (y) + (2 - ac)\chi (x)\Psi _{A\chi }(y) + \dfrac{(2 - ac)c}{b}\Psi _{A\chi }(x)\Psi _{A\chi }(y). \end{aligned}$$

For \(x\in I_\chi \) or \(y\in I_\chi \) this tells us that the restriction of \(f_e\) to \(I_\chi \) belongs to \(\mathcal {N}(I_\chi ,\sigma )\). Now for \(x,y\in S{\setminus } I_\chi \) this equation reduces to

$$\begin{aligned} f_e(xy) - f_e(\sigma (y)x) = \left[ \dfrac{(2 - ac)c}{b}A(x)A(y) + (1 - ac)(A + A\circ \sigma )(y)\right] \chi (x)\chi (y). \end{aligned}$$
(14)

Under the transformation \((x,y)\mapsto (\sigma (y)x)\) in this equation becomes

$$\begin{aligned}&f_e(\sigma (y)x) - f_e(xy) \\&\quad = \left[ \dfrac{(2 - ac)c}{b}A(x)A\circ \sigma (y) + (1 - ac)(A + A\circ \sigma )(x)\right] \chi (x)\chi (y) \end{aligned}$$

since \(f_e\) is even. Summing these two equations brings us to

$$\begin{aligned} \dfrac{(2 - ac)c}{b}A(x)(A + A\circ \sigma )(y) = (ac - 1)[(A + A\circ \sigma )(x) + (A + A\circ \sigma )(y)], \end{aligned}$$
(15)

where we have canceled \(\chi (x)\chi (y)\) since \(x,y\in S{\setminus } I_\chi \). Since the right hand side is symmetric in x and y, the same is true of the left side, therefore

$$\begin{aligned} \dfrac{(2 - ac)c}{b}[A(x)(A\circ \sigma )(y) - A(y)(A\circ \sigma )(x)] = 0, \quad x,y \in S{\setminus } I_\chi . \end{aligned}$$
(16)

We show that \(A\circ \sigma = -A\). First, if \(ac = 2\) then (15) shows that

$$\begin{aligned} (A + A\circ \sigma )(x) + (A + A\circ \sigma )(y) = 0, \quad x,y \in S{\setminus } I_\chi , \end{aligned}$$

which means \(A + A\circ \sigma = 0\). Now suppose \(ac \ne 2\). Then (16) gives us

$$\begin{aligned} A(x)(A\circ \sigma )(y) = A(y)(A\circ \sigma )(x), \quad x,y \in S{\setminus } I_\chi . \end{aligned}$$

Since \(A \ne 0\) there exists \(x_0\in S{\setminus } I_\chi \) such that \(A(x_0) \ne 0\). Putting \(x = x_0\) in the last equation we get \(A\circ \sigma = \epsilon A\) for some \(\epsilon \in {\mathbb R}^*\). The fact that \(\sigma \) is involutive implies that \(\epsilon ^2 = 1\), so \(\epsilon = \pm 1\). Thus we have either \(A\circ \sigma = -A\) or \(A\circ \sigma = A\). For a contradiction, suppose \(A\circ \sigma = A\). Then (15) becomes

$$\begin{aligned} \dfrac{(2 - ac)c}{b}A(x)A(y) = (ac - 1)[A(x) + A(y)], \end{aligned}$$

which is impossible for a nonzero additive function A. Therefore \(A\circ \sigma = -A\).

Now (14) reduces to

$$\begin{aligned}&f_e(xy) - f_e(\sigma (y)x) \\&\quad = \dfrac{(2 - ac)c}{b}A(x)A(y)\chi (x)\chi (y) \\&\quad = \dfrac{(2 - ac)c}{4b}[A^2(xy)\chi (xy) - A^2(\sigma (y)x)\chi (\sigma (y)x)], \quad x,y \in S{\setminus } I_\chi . \end{aligned}$$

Hance \(\theta := f_e - \dfrac{(2 - ac)c}{4b}\Psi _{A^2\chi }\in \mathcal {N}(S,\sigma )\) and we have solution (ii).

Case 2 Suppose \(\mathbb {K} = {\mathbb C}\); then by hypothesis \(f_o\) is central. This case leads to the same solutions as above, but we have to work in a different way.

If \(ac = 1\) then (12) becomes the d’Alembert-type equation

$$\begin{aligned} f_o(xy) + f_o(\sigma (y)x) = f_o(x)(\chi + \chi \circ \sigma )(y). \end{aligned}$$

In this case we invoke Lemma 4.1 with \(h = g = f = f_o\) and \(k = \chi + \chi \circ \sigma \). Under these conditions the only solution is \(f_o = 2\Psi _{A\chi }\) with \(\chi = \chi \circ \sigma \) and additive \(A = -A\circ \sigma \ne 0\). As in Case 1 this leads to solution (ii), with \(ac = 1\).

If on the other hand \(ac \ne 1\) then we replace y by \(\sigma (y)\) in (12) to get

$$\begin{aligned}&(2 - ac)f_o(x\sigma (y)) + acf_o(yx) \\&\quad = f_o(x)(\chi + \chi \circ \sigma )(y) - (1 - ac)f_o(y)(\chi + \chi \circ \sigma )(x). \end{aligned}$$

Since \(f_o\) is central this can now be written as

$$\begin{aligned}&acf_o(xy) + (2 - ac)f_o(\sigma (y)x) \\&\quad = f_o(x)(\chi + \chi \circ \sigma )(y) - (1 - ac)f_o(y)(\chi + \chi \circ \sigma )(x). \end{aligned}$$

Subtracting ac times this equation from \((2 - ac)\) times (12), we arrive at the familiar sine addition formula

$$\begin{aligned} f_o(xy) = f_o(x)\cdot \dfrac{1}{2}(\chi + \chi \circ \sigma )(y) + f_o(y)\cdot \dfrac{1}{2}(\chi + \chi \circ \sigma )(x). \end{aligned}$$

From this point the proof goes as in Case 1 and results in the same solutions.

We include an open problem at this point.

Remark 4.5

The proof above shows that the obstacle in the case \(\mathbb {K} = {\mathbb C}\) occurs when \(ac = 1 + i\) or \(ac = 1 - i\) in equation (12). In the case \(ac = 1 + i\) for example, (12) becomes

$$\begin{aligned} (1 - i)f_o(xy) + (1 + i)f_o(\sigma (y)x) = f_o(x)(\chi + \chi \circ \sigma )(y) - if_o(y)(\chi + \chi \circ \sigma )(x). \end{aligned}$$

If this equation could be solved for odd \(f_o\) (and a similar equation with \(ac = 1 - i\)), then one would have a complete result for complex-valued functions without assuming that \(f_o\) is central. It is an open problem whether there exist non-central solutions of this equation.

The next theorem summarizes our principle findings.

Theorem 4.6

Let S be a topological group or topological monoid generated by its squares, let \(\sigma :S \rightarrow S\) be an involutive automorphism, and let \(f,g,h,k\in \mathcal {C}(S,\mathbb {K})\). We also assume that either \(\mathbb {K} = {\mathbb R}\) or that \(f_o\) is central. Then the solutions of (4) consist of the following families, where \(\chi \in \mathcal {C}(S,{\mathbb C})\) is a nonzero multiplicative function, \(\theta \in \mathcal {N}(S,\sigma )\), \(A\in \mathcal {C}(S{\setminus } I_\chi ,{\mathbb C})\) is a nonzero additive mapping with \(A\circ \sigma = -A\), with \(a_i,b_i,c_i,d_i \in \mathbb {C}\) \((i = 1,2)\) and \(a,b \in \mathbb {C}^*\). (In the case \(\mathbb {K} = {\mathbb R}\) the constants must be chosen so that fghk are real-valued.)

  1. (a)

    \(h = 0\), \(-g = f = \theta \), and k is arbitrary.

  2. (b)

    \(k = 0\), \(-g = f = \theta \), and h is arbitrary.

  3. (c)

    For \(\chi \circ \sigma \ne \chi \),

    $$\begin{aligned} f&= \theta + a_1(\chi + \chi \circ \sigma ) + a_2 (\chi - \chi \circ \sigma ), \quad g = -\theta + b_1(\chi + \chi \circ \sigma )\\&\quad + b_2 (\chi - \chi \circ \sigma ),\\ h&= c_1(\chi + \chi \circ \sigma ) + c_2(\chi - \chi \circ \sigma ), \quad k = d_1(\chi + \chi \circ \sigma ) + d_2(\chi - \chi \circ \sigma ), \end{aligned}$$

    where

    $$\begin{aligned} \begin{pmatrix} c_{1} &{} c_{2} \\ c_{1} &{} -c_{2} \end{pmatrix}\begin{pmatrix} d_{1} &{} d_{2}\\ d_{2} &{} d_{1} \end{pmatrix} = \begin{pmatrix} a_{1} &{} a_2 \\ b_{1} &{} -b_2 \end{pmatrix}. \end{aligned}$$
  4. (d)

    For \(\chi \circ \sigma = \chi \),

    $$\begin{aligned} f&= \theta + \dfrac{1}{2}(c_2d_1 + c_1d_2) \Psi _{A\chi } + \dfrac{1}{4}c_2d_2\Psi _{A^2\chi },\quad h = c_1\chi + c_2 \Psi _{A\chi }, \quad \\&\quad k = d_1\chi + d_2\Psi _{A\chi },\\ g&= -\theta + c_1d_1\chi + \dfrac{1}{2}(c_2d_1 - c_1d_2)\Psi _{A\chi } - \dfrac{1}{4}c_2d_2\Psi _{A^2\chi }. \end{aligned}$$
  5. (e)

    For \(\chi = \chi \circ \sigma \),

    $$\begin{aligned} f = \theta + \left( \dfrac{ab}{2} + c_1\right) \chi ,\quad g = - \theta + \left( \dfrac{ab}{2} - c_1\right) \chi ,\quad h = b\chi ,\quad k = a\chi . \end{aligned}$$

In the group case \(I_\chi = \emptyset \), \(\Psi _{A\chi } = A\chi \) and \(\Psi _{A^2\chi } = A^2\chi \).

Proof

It is verifiable by substitution that the function quadruples (fghk) in (a) - (e) satisfy equation (4).

For the converse, if we suppose either \(h=0\) or \(k=0\) then the other of hk is an arbitrary function and \(f(x y) + g(\sigma (y)x) = 0\) for all \(x,y\in S\). With \(y=e\) we have \(f + g = 0\) and we are in solution (a) or (b). Henceforth we suppose that \(h\ne 0\) and \(k \ne 0\).

Putting \(y = e\) in (4) we have \(f + g = k(e)h\). If \(k(e) = 0\) then \(g = -f\) and (4) becomes

$$\begin{aligned} f(xy) - f(\sigma (y)x) = h(x)k(y), \end{aligned}$$

with solutions given by Proposition 3.3. These are, respectively, solution (c) with \(d_1 = 0\) and solution (d) with \(d_1 = 0\), \(d_2 = 1\). Henceforth we assume that \(k(e) \ne 0\).

If \(h(e) = 0\) then we look to Lemma 4.1 for the solutions of (4). The first is solution (c) with \(c_1 = 0\), \(d_2 = d_1\), \(a_2 = a_1 = d_1c_2 = b_2 = -b_1\), and the second is solution (d) with \(c_1 = 0\), \(c_2 = 2\), \(d_1\ne 0\). From here on we assume that \(h(e) \ne 0\).

If either f or h is even, we take the solutions from Lemma 4.3. Concerning solution (i) there, the case \(\chi = \chi \circ \sigma \) leads to solution (e) in our present theorem; the case \(\chi \ne \chi \circ \sigma \) is included in the present solution (c) with \(a_2 = 0\). Solution (ii) from Lemma 4.3 in the case \(A = 0\) is our present solution (d) with \(c_2 = d_2 = 0\); in case \(A \ne 0\) we are in solution (d) with \(c_2 = 1\), \(c_1 \ne 0\), and \(d_2 = -d_1/c_1\). Solution (iii) from Lemma 4.3 is our current solution (c) with \(c_2 = 0\), \(d_2 = 2\), and \(b_2 = -a_2\). Lastly from Lemma 4.3, solution (iv) is our current solution (d) with \(c_2 = 0\), \(c_1 \ne 0\), and \(d_2 = 2/c_1\).

Finally we take solutions from Lemma 4.4 in the case that neither f nor h is even. Solutions (i) and (ii) there are our solutions (c) and (d) here with \(c_1d_1 \ne 0\), and the proof is finished.