1 Setup, notation and terminology

Throughout the paper we work in the following framework and with the following notation and terminology. We use it without explicit mentioning.

S is a semigroup, \(x \mapsto x^*\) is an involution of S, and \(z_0 \in Z(S)\) denotes a fixed element in the center Z(S) of S.

We say that a function f on S is abelian if and only if \(f(x_1x_2 \ldots x_n) =f(x_{\pi (1)}x_{\pi (2)} \ldots x_{\pi (n)})\) for all \(x_1,x_2, \ldots , x_n \in S\), all permutations \(\pi \) of n elements and all \(n= 2,3, \ldots \) All functions are abelian on commutative semigroups.

A function \(\chi :S \rightarrow \mathbb {C}\) is multiplicative, if \(\chi (xy) = \chi (x)\chi (y)\) for all \(x,y \in S\). By a character of a group G we mean a non-zero multiplicative function on G.

Let G be a group. The group inversion \(x \mapsto x^{-1}\) is an example of an involution on G. For any function F on G we let \(\check{F}(x) := F(x^{-1})\), \(x \in G\).

2 Introduction

Trigonometric functional equations have their roots in formulas for trigonometric and hyperbolic functions. To take an example the trigonometric function \(g(x) = \cos x\) and the hyperbolic function and \(g(x) = \cosh x\) satisfy d’Alembert’s functional equation

(1)

in which \(g: \mathbb {R} \rightarrow \mathbb {C}\) is the unknown function to be determined. Of interest for us is that d’Alembert’s functional equation has been studied in the context of a semigroup S with an involution \(x \mapsto x^*\), where it takes the form

(2)

in which \(g: S \rightarrow \mathbb {C}\) is the unknown function to be determined. The literature contains many results about the special extension \(g(xy) + g(xy^{-1}) = 2g(x)g(y)\), \(x,y \in G\) of (1) from the additive group \((\mathbb {R},+)\) to any group G. The abelian solutions of (2) are known (see Theorem 8). Davison [5] found all solutions of (2) when S is a not necessarily commutative monoid. His formulas involve harmonic analysis on S, because he expresses the solutions in terms of multiplicative functions and 2-dimensional, irreducible representations of S ([16] has a detailed exposition). Thus d’Alembert’s functional equation is solved in large generality, and it makes sense to solve other functional equations by expressing their solutions in terms of solutions of (2). This is what we shall do for Kannappan’s functional equation (defined below).

d’Alembert’s classic functional equation (1) has solutions \(g:\mathbb {R}\rightarrow \mathbb {C}\) that are periodic, for instance \(g(x) = \cos x\), and solutions that are not, for instance \(g(x) = \cosh x\). To exclude the non-periodic solutions Kannappan [11] modified (1) to the functional equation

$$\begin{aligned} f(x + y + z_0) + f(x - y + z_0) = 2f(x)f(y), \quad \ x,y \in \mathbb {R}, \end{aligned}$$
(3)

where \(z_0 \ne 0\) is a real constant (we have replaced Kannappan’s notation 2A by \(z_0\)). Kannappan proved that any solution \(f:\mathbb {R}\rightarrow \mathbb {C}\) of (3) has the form \(f(x) = g(x-z_0)\), where \(g:\mathbb {R}\rightarrow \mathbb {C}\) is a periodic solution of (1) with period \(2z_0\). This enabled him to find all Lebesgue measurable solutions. His results are reproduced in Example 12. His solution formulas reveal that \(f = cg\), where \(c = \pm 1\), so that f is proportional to a periodic solution of (1). We call the attention to this unnoticed fact, because it persists to the more general situation of the present paper (Corollary 10).

Like (1) also (3) can be extended to and formulated on semigroups with an involution: In the notation of Sect. 1 we consider the solutions \(f:S \rightarrow \mathbb {C}\) of the functional equation

$$\begin{aligned} f(xyz_0) + f(xy^*z_0) = 2f(x)f(y), \quad \ x,y \in S, \end{aligned}$$
(4)

which is our generalization of (3). Perkins and Sahoo [13] named (4) Kannappan’s functional equation, and we follow their usage here. (4) has always at least one non-zero solution, viz. \(f = 1\). Deleting \(z_0\) from (4) we arrive at d’Alembert’s functional equation (2).

The purpose of the present paper is to show how Kannappan’s work on the relations between (1) and (3) extends to the much wider framework of (2) and (4), so that the natural setting for (4) is semigroups with an involution. We show that any solution of (4) is proportional to a solution of (2) and so can be expressed in terms of multiplicative functions and 2-dimensional, irreducible representations of S, at least on a monoid.

The case of the involution being the identity is given a separate exposition in Sect. 6.

We have already commented on Kannappan’s original paper [11] about the solutions of (3) on \(\mathbb {R}\), but (3) is also solved in Kannappan’s monograph [12, Theorem 3.14].

In the very special case of \(z_0\) being the neutral element of a monoid S (4) becomes (2) which has been solved by Davison [5].

Perkins and Sahoo [13] studied the extension (4) of (3) when S is a group with an involution. In Theorem 2 of [13] they associate to any solution f of (4) a solution \(g:S \rightarrow \mathbb {C}\) of (2) such that \(f(x) = f(z_0)g(xz_0^{-1})\). They use this relation between f and g to find the form of any abelian solution f of (4) on a group (see [13, Corollary 3]).

Our results encompass not just Kannappan’s in [11, 12], but also those of Perkins and Sahoo [13] about Kannappan’s functional equation, and we do not confine our study to abelian solutions of (4).

Let us for the sake of completeness mention two related functional equations from the literature. Gajda [7] studied a functional equation on a locally compact, abelian group G that in a special case reduces to

$$\begin{aligned} f(x+y + z_0) + f(x - y - z_0) = 2f(x)f(y), \quad x,y \in G, \end{aligned}$$
(5)

This is connected to (4), because f is an even solution of (5) if and only if f satisfies (3) (in which \(\mathbb {R}\) is replaced by G). Recent developments in the theory of Gajda’s equation can be found in Fechner and Székelyhidi [6].

Van Vleck’s functional equation

$$\begin{aligned} f(xyz_0) - f(xy^*z_0) = 2f(x)f(y), \quad \ x,y \in S, \end{aligned}$$
(6)

looks similar to (4), but differs by having a minus instead of a plus between the terms of the left hand side. Its solutions are generalized sine functions, while those of (4) are generalized cosine functions. (6) has been studied by Van Vleck [19, 20], Perkins and Sahoo [13, Sect. 3] and Stetkær [17].

We are of course not the first ones to consider trigonometric functional equations on semigroups. However, in the literature the semigroups or the solutions are often assumed abelian. For example in Chung and Sahoo [4], Ger and Kominek [8], Sinopoulos [15] and Szélyhidi [21].

Our main contributions to the knowledge about Kannappan’s functional equation (4) are the following:

  1. 1.

    We extend the setting from groups to semigroups with an involution.

  2. 2.

    We relate the solutions of (4) to those of (2) (Theorem 5).

  3. 3.

    We derive formulas for the solutions of (4) (Corollary 6 and Proposition 9).

  4. 4.

    We apply the theory to varied examples (Sect. 5).

Like our predecessors the methods of the present paper are elementary.

3 The detailed theory

3.1 Overview

In Theorem 5 we derive a 1-1 correspondence between the non-zero solutions of (4) and a subset of the solutions of (2), which transfers the study of Kannappan’s functional equation to d’Alembert’s functional equation. This is our final step, because (2) has been solved, at least on monoids. By help of the correspondence we prove that any solution \(f \ne 0\) of (4) has the form \(f(x) = g(xz_0^*) = g(z_0)g\), where g is a solution of (2), which is periodic in the sense that \(g(xz_0) = g(xz_0^*)\) for all \(x \in S\) (Corollary 6). In particular any solution of (4) is a constant times a solution of (2).

In Sect. 5 we apply our theory to selected examples, including Kannappan’s original equation (3), for various semigroups.

The particular solution \(f(x) = - \cos x\) of Kannappan’s functional equation (3) with \(z_0 = \pi \), i.e.,

$$\begin{aligned} f(x + y + \pi ) + f(x - y + \pi ) = 2 f(x)f(y), \quad \ x,y \in \mathbb {R}, \end{aligned}$$

illuminates many af the results in this and the next section. For instance we get from general principles that f is even, \(f(z_0) = 1\) and f is \(2z_0\)-periodic.

3.2 Basic results

Lemma 1, respectively Lemmas 2 and 3, contain useful results about the solutions of Kannappan’s functional equation (4), respectively of d’Alembert’s functional equation (2). Theorem 5 and Corollary 6 relate these two solution sets.

In proofs we use without explicit mentioning the assumption \(z_0 \in Z(S)\) and its consequence \(z_0^* \in Z(S)\).

Lemma 1

Let f be a solution of (4). Then

  1. (a)

    f is even with respect to the involution, meaning that \(f(x^*) = f(x)\) for all \(x \in S\).

  2. (b)

    The following two formulas hold for all \(x \in S\).

    $$\begin{aligned} f(xz_0^*z_0)&= f(z_0)f(x), \text { and} \end{aligned}$$
    (7)
    $$\begin{aligned} f(xz_0^2)&= f(z_0)f(x). \end{aligned}$$
    (8)
  3. (c)

    \(f \ne 0 \iff f(z_0) \ne 0\).

Proof

  1. (a)

    This is because the left and hence also the right hand side of (4) are unchanged under interchange of y and \(y^*\).

  2. (b)

    Taking \(x = z_0^*\) in (4) and using (a) show that (7) holds. Putting \(y = z_0\) in (4) and using (7) give us (8).

  3. (c)

    It suffices to prove that \(f(z_0) = 0 \Rightarrow f(x) = 0\) for all \(x \in S\), so we assume that \(f(z_0) = 0\). Replacing x by \(xz_0\) and y by \(yz_0\) in (4) results in

    $$\begin{aligned} f\big (xz_0yz_0^2\big ) + f\big (xz_0z_0^*y^*z_0\big ) = 2f(xz_0)f(yz_0) \;\; \ \text { for all } x,y \in S. \end{aligned}$$
    (9)

The first term \(f(xz_0yz_0^2)\) vanishes by (8), because \(f(z_0) = 0\). By the same reason also the second term \(f(xz_0z_0^*y^*z_0) = f(xz_0^*y^*z_0^2)\) vanishes. It follows that \(2f(xz_0)f(yz_0) = 0\), so that \(f(xz_0) = 0\) for all \(x \in S\). Thus the left hand side of (4) is zero, so that \(f(x) = 0\) for all \(x \in S\). \(\square \)

Let \(g:S \rightarrow \mathbb {C}\). It turns out that the condition \(g(xz_0) = g(xz_0^*)\) for all \(x \in S\) plays an important role for our study. We may view it as a periodicity condition on g, because when S is a group it can be reformulated to \(g(xz_0(z_0^*)^{-1}) = g(x)\), which means that g is periodic with period \(p = z_0(z_0^*)^{-1}\). If the involution is the inversion of the group, then the period simplifies to \(p = z_0^2\). Lemma 2b formulates the periodicity condition in various equivalent ways when g is a solution of d’Alembert’s functional equation (2).

Lemma 2

We have for any solution g of (2) that:

  1. (a)

    \(g(x^*) = g(x)\)    for all \(x \in S\).

  2. (b)

    The following three statements are equivalent

    1. (i)

      \(g(xz_0) = g(xz_0^*)\)    for all \(x \in S\),

    2. (ii)

      \(g(xz_0) = g(z_0)g(x)\)    for all \(x \in S\),

    3. (iii)

      \(g(z_0^2) = g(z_0)^2\).

Proof

  1. (a)

    The proof is the same as the one of Lemma 1a.

  2. (b)

    Assuming \(g(xz_0) = g(xz_0^*)\) we get from (2) that

    $$\begin{aligned} g(xz_0) = \frac{g(xz_0) + g(xz_0^*)}{2} = \frac{2g(x)g(z_0)}{2} = g(z_0)g(x). \end{aligned}$$

Conversely, from \(2g(xz_0) = 2g(x)g(z_0) = g(xz_0) + g(xz_0^*)\) we get \(g(xz_0) = g(xz_0^*)\). Thus (bi) and (bii) are equivalent.

Define \(g_x(y) := g(xy) - g(x)g(y)\) for \(x,y \in S\). Any solution g of d’Alembert’s functional equation is a solution of the pre-d’Alembert functional equation (see for instance [16, Proposition 9.17]). For such solutions it is known (see for instance [16, p. 133]) that \(g_x(z_0)^2 = g_x(x)g_{z_0}(z_0)\), when \(z_0 \in Z(S)\). From this identity we infer that (bii) \(\iff \) (biii). \(\square \)

Lemma 3

Let \(g_1\) and \(g_2\) be two non-zero solutions of (2) and let \(\alpha _1, \alpha _2 \in \mathbb {C} \setminus \{ 0\}\). If \(\alpha _1 g_1 = \alpha _2 g_2\) then \(\alpha _1 = \alpha _2\) and \(g_1 = g_2\).

Proof

Using that \(g_1 = (\alpha _2 /\alpha _1)g_2\) satisfies (2) we find that

$$\begin{aligned} g_2\left( xy\right) + g_2\left( xy^*\right) = \frac{\alpha _2}{\alpha _1}2g_2(x)g_2(y). \end{aligned}$$

But \(g_2 \ne 0\) satisfies (2), so we infer that \(\alpha _2 /\alpha _1 = 1\). \(\square \)

3.3 Principal results

Our main result is Corollary 6 below.

Definition 4

We introduce two sets \(\mathcal {A}\) (refers to d’Alembert) and \(\mathcal {K}\) (refers to Kannappan) of functions on S. The point \(z_0 \in S\) is inherent in the definitions of \(\mathcal {A}\) and \(\mathcal {K}\), but since it is fixed, we leave it out of the notation.

  1. (a)

    \(\mathcal {A}\) consists of the solutions \(g:S \rightarrow \mathbb {C}\) of d’Alembert’s functional equation (2) with \(g(z_0) \ne 0\) and satisfying the conditions of Lemma 2(b).

  2. (b)

    To any \(g \in \mathcal {A}\) we associate the function \(Tg:= g(z_0)g: S \rightarrow \mathbb {C}\).

  3. (c)

    \(\mathcal {K}\) consists of the non-zero solutions \(f:S \rightarrow \mathbb {C}\) of Kannappan’s functional equation (4).

\(\mathcal {A}\) and \(\mathcal {K}\) are not empty, because \(g = 1 \in \mathcal {A}\) and \(f = 1 \in \mathcal {K}\). In general \(\mathcal {A}\) is a proper subset of the non-zero solutions of (2). See Examples 12 and 13.

Theorem 5 and Corollary 6 are our main results. Theorem 5 derives a 1–1 correspondence between the sets \(\mathcal {A}\) and \(\mathcal {K}\). Note that \(f(z_0) \ne 0\) for all \(f \in \mathcal {K}\) by Lemma 1c, so that formula (10) makes sense.

Theorem 5

T is a bijection of \(\mathcal {A}\) onto \(\mathcal {K}\). In particular \(\mathcal {K} = T(\mathcal {A})\). The inverse \(T^{-1}:\mathcal {K} \rightarrow \mathcal {A}\) is given by the formula

$$\begin{aligned} \left( T^{-1}f\right) (x) = \frac{f(xz_0)}{f(z_0)}, \quad \ x \in S, \end{aligned}$$
(10)

which holds for any \(f \in \mathcal {K}\).

Proof

We prove first that \(f:= Tg = g(z_0)g \in \mathcal {K}\) for any \(g \in \mathcal {A}\). Applying the definition of \(\mathcal {A}\) a number of times we get

$$\begin{aligned} f\big (xyz_0\big ) + f\big (xy^*z_0\big )&= g(z_0)\Big [g\big (xyz_0\big ) + g\big (xy^*z_0\big )\Big ] \\&= g\big (z_0\big )^2\Big [g\big (xy\big ) + g\big (xy^*\big )\Big ] = g\big (z_0\big )^22g(x)g(y) \\&= 2g(z_0)g(x)g(z_0)g(y) = 2f(x)f(y), \end{aligned}$$

which shows that f is a solution of Kannappan’s functional equation (4). Furthermore \(f(z_0) = g(z_0)^2 \ne 0\), since \(g \in \mathcal {A}\). Thus \(f \in \mathcal {K}\).

The map T is injective by Lemma 3.

We continue by showing that T is surjective, so let \(f \in \mathcal {K}\). We shall find \(g \in \mathcal {A}\), such that \(Tg = f\). Since \(f(z_0) \ne 0\) (by Lemma 1c), we may define \(g:S \rightarrow \mathbb {C}\) by

$$\begin{aligned} g(x) := \frac{f(xz_0)}{f(z_0)}, \quad \ x \in S. \end{aligned}$$
(11)

Now, by (8) and (7) we find

$$\begin{aligned} f\big (z_0\big )^2\Big [g\big (xy\big ) + g\big (xy^*\big )\Big ]&= f\big (z_0\big )f\big (xyz_0\big ) + f\big (z_0\big )f\big (xy^*z_0\big )\\&= f\big (xyz_0^3\big ) + f\big (xy^*z_0^*z_0^2\big )\\&= f\big ((xz_0)(yz_0)z_0\big ) + f\big (xz_0(yz_0)^*z_0\big )\\&= 2f(xz_0)f(yz_0) = 2f(z_0)^2 \frac{f(xz_0)}{f(z_0)} \frac{f(yz_0)}{f(z_0)}\\&= 2f(z_0)^2g(x)g(y), \end{aligned}$$

which implies that g satisfies d’Alembert’s functional equation (2).

Next, from (7) and (8) we get

$$\begin{aligned} g\big (z_0\big )^2&= \frac{1}{2}\left[ g\big (z_0^2\big ) + g\big (z_0z_0^*\big ) \right] = \frac{1}{2}\left[ \frac{f\big (z_0^2z_0\big )}{f\big (z_0\big )} + \frac{f\big (z_0z_0^*z_0\big )}{f\big (z_0\big )} \right] \\&= \frac{1}{2}\left[ \frac{f(z_0)f(z_0)}{f(z_0)} + \frac{f(z_0)f(z_0)}{f(z_0)} \right] = f(z_0), \text { and}\\ g\big (z_0^2\big )&= \frac{f\big (z_0^2z_0\big )}{f(z_0)} = \frac{f(z_0)f(z_0)}{f(z_0)} = f(z_0), \end{aligned}$$

so \(g(z_0^2) = g(z_0)^2\), which means that the conditions of Lemma 2b hold. Combining that \(f(z_0) \ne 0\) (by Lemma 1c) with \(g(z_0)^2 = f(z_0)\) we get \(g(z_0)\ne 0\), so \(g \in \mathcal {A}\).

Finally, for any \(x \in S\) we compute that

$$\begin{aligned} (Tg)(x) = g(z_0)g(x) = g(xz_0) = \frac{f(xz_0^2)}{f(z_0)} = \frac{f(z_0)f(x)}{f(z_0)} = f(x), \end{aligned}$$

which means that \(Tg = f\).

The formula (11) tells us that (10) holds. \(\square \)

Corollary 6

The non-zero solutions \(f: S \rightarrow \mathbb {C}\) of Kannappan’s functional equation (4) are the functions of the form \(f = g(z_0)g\), where \(g \in \mathcal {A}\). Furthermore \(f(x) = g(xz_0) = g(xz_0^*) = g(z_0)g(x)\) for all \(x \in S\).

In particular, any solution \(f \ne 0\) is periodic in the sense that \(f(xz_0) = f(xz_0^*)\) for all \(x \in S\). So is the corresponding \(g \in \mathcal {A}\).

Proof

The only statements which are not obvious, are the periodicity statements. The one for g is contained in Lemma 2b, because \(g \in \mathcal {A}\). This implies the statement about f, because f is proportional to g. \(\square \)

Corollary 7

Let \(f \ne 0\) be a solution of Kannappan’s functional equation (4). Let \(g := T^{-1}f\) be the corresponding solution of (2).

  1. (a)

    f is abelian if and only if g is abelian.

  2. (b)

    Assume that S is equipped with a topology. Then f is continuous if and only if g is continuous.

Proof

The statements are immediate from the explicit formula \(f = g(z_0)g\) relating f and g. Note that \(g(z_0)\ne 0\), because \(g \in \mathcal {A}\). \(\square \)

4 Various kinds of solutions

4.1 Non-abelian solutions

Kannappan’s paper [11, Corollary] shows that there exist non-trivial, abelian solutions of (3) on \(\mathbb {R}\), even continuous ones. It is a natural question to ask whether there are examples of non-abelian solutions of (3). After all Van Vleck’s similarly looking functional equation (6) has only abelian solutions (see [17, Theorem 4]). The answer is yes.

Kannappan’s functional equation (4) becomes d’Alembert’s functional equation (2) when S has a neutral element e and \(z_0 = e\). Examples of continuous, non-abelian solutions of (2) are known (see [16, Example 9.11] for an example on \(S = SL(2,\mathbb {C})\)). More interesting is Example 11, because it exhibits a non-abelian solution of (4) in a case where \(z_0 \ne e\).

4.2 Abelian solutions

The solution formulas simplify if the solution is abelian. This subsection tells how.

We shall need the following basic result about the form of the abelian solutions of d’Alembert’s functional equation (2). Kannappan’s seminal paper [10] from 1968 derived it for S a group and the group inversion as the involution.

Theorem 8

Let S be a semigroup with an involution. The abelian solutions \(g:S \rightarrow \mathbb {C}\) of (2) are the functions of the form \(g = (\chi (x) + \chi (x^*))/2\), \(x \in S\), where \(\chi \) ranges over the multiplicative function on S.

Proof

We refer to [16, Theorem 9.21] for a proof. \(\square \)

The formulas for g in Theorem 8 reflect Euler’s formulas

$$\begin{aligned} \cos x = \frac{e^{ix} + e^{-ix}}{2} \text { and } \cosh x = \frac{e^{x} + e^{-x}}{2}, \quad x \in \mathbb {R}, \end{aligned}$$

in which \(x^* = -x\), while \(\chi (x) = e^{ix}\) for the cosine and \(\chi (x) = e^{x}\) for the hyperbolic cosine.

Proposition 9

The abelian solutions \(f \ne 0\) of Kannappan’s functional equation (4) are the functions of the form

$$\begin{aligned} f(x) = \chi (z_0)\,\frac{\chi (x) + \chi (x^*)}{2}, \quad \ x \in S, \end{aligned}$$
(12)

where \(\chi :S \rightarrow \mathbb {C}\) ranges over the multiplicative functions with the two properties \(\chi (z_0) = \chi (z_0^*)\) and \(\chi (z_0) \ne 0\).

The solution g of d’Alembert’s functional equation (2) corresponding to the f above is

$$\begin{aligned} g(x) = \frac{\chi (x) + \chi (x^*)}{2}, \quad \ x \in S. \end{aligned}$$

\(\chi \) is unique for given f, except that \(x \mapsto \chi (x)\) can be interchanged with \(x \mapsto \chi (x^*)\).

If S is a topological semigroup and the involution is continuous, then f is continuous if and only if \(\chi \) is continuous.

Proof

Let \(f \ne 0\) be an abelian solution of (4). By Corollary  6 we may write \(f = g(z_0)g\) for some \(g \in \mathcal {A}\). Since f is abelian, so is g, and hence g has by Theorem 8 the form \(g = (\chi (x) + \chi (x^*))/2\), where \(\chi :S \rightarrow \mathbb {C}\) is a multiplicative function. A computation produces for any \(x \in S\) the formula \(g(x^2) - g(x)^2 = [\chi (x) - \chi (x^*)]^2/4\). Take \(x = z_0\) to get \(\chi (z_0) = \chi (z_0^*)\), because \(g \in \mathcal {A}\). Hence f has the form (12). The proof of the converse implication is a simple calculation that we omit.

The expression for g follows from Lemma 3.

The uniqueness and continuity statements can be deduced from [16, Theorems 3.18b, d] respectively. \(\square \)

The condition \(\chi (z_0) = \chi (z_0^*)\) in Proposition 9 cuts down the number of continuous solutions of (4) compared with the case of \(z_0 = e\). Sometimes even drastically, because the set of continuous solutions can consist of just \(f=0\) and \(f = 1\) (see Example 13).

Formula (12) was for groups derived in [13, Corollary 3].

4.3 Solutions in the case of the group inversion

In this subsection we describe how relations simplify when S is a group and the involution is the group inversion, in which case Kannappan’s functional equation (4) and d’Alembert’s functional equation (2) become

$$\begin{aligned} f\big (xyz_0\big ) + f\big (xy^{-1}z_0\big )&= 2f(x)f(y), \quad \ x,y \in S, \text { and} \end{aligned}$$
(13)
$$\begin{aligned} g\big (xy\big ) + g\big (xy^{-1}\big )&= 2g(x)g(y), \quad \ x,y \in S. \end{aligned}$$
(14)

We get from (7) that \(f(z_0) = 1\) for any solution \(f \ne 0\) of (13). This was derived in [13, Remark 4]. Furthermore the relation (10) between f and \(g := T^{-1}f\) reduces to \(g(x) = f(xz_0)\), which is Kannappan’s formula in [11]. Finally \(f = \pm g\). Indeed, since \(f = g(z_0)g\) it suffices to note that \(g(z_0) = \pm 1\). And \(1 = f(z_0) = (g(z_0)g)(z_0) = g(z_0)^2\). In Example 12 the even-numbered solutions carry the plus sign and the odd-numbered ones the minus sign.

Corollary 10 gives the form of the abelian solutions of (13).

Corollary 10

Let S be a group.

  1. (a)

    The abelian solutions \(f \ne 0\) of Kannappan’s functional equation (13) are the functions of the form \(f = \chi (z_0)(\chi + \check{\chi })/2\), where \(\chi :S \rightarrow \mathbb {C}\) ranges over the characters of S for which \(\chi (z_0)^2 = 1\).

  2. (b)

    The solution g of d’Alembert’s functional equation (14) corresponding to the f from (a) is \(g = (\chi + \check{\chi })/2\).

  3. (c)

    \(\chi \) is unique for given f, except that \(\chi \) can be interchanged with \(\check{\chi }\).

  4. (d)

    If S is a topological group, then f is continuous if and only if \(\chi \) is continuous.

5 Examples

In this section we go through selected examples.

Example 11

This example exhibits a non-abelian solution of Kannappan’s functional equation with \(z_0 \ne e\), where e is a neutral element. We take \(S = SL(2,\mathbb {R})\) and the group inversion as the involution. The neutral element of S is the identity matrix I. The center is \(Z(S) = \{ \pm I\}\), so we must choose \(z_0 = I\) of \(z_0 = -I\). In Sect. 4.1 we considered \(z_0 = I\), so we shall in this example restrict our attention to \(z_0 = -I\). A non-abelian solution of d’Alembert’s classic functional equation is

$$\begin{aligned} g(x) = \frac{1}{2}{{\mathrm{tr}}}(x), \quad \ x \in S. \end{aligned}$$

The condition \(g(xz_0) = g(xz_0^*)\) of Lemma 2b is clearly satisfied here, because \(z_0^* = z_0^{-1} = z_0\). The solution of Kannappan’s functional equation (4) corresponding to g is \(f = g(z_0)g = -g\).

Example 12

In this example we derive Kannappan’s solutions of (3) on \(S = \mathbb {R}\) (as found in [11] or in his monograph [12, Corollary 3.14a]) from our results about abelian solutions (Corollary 10). Our formulation (15) of the result is simpler than Kannappan’s.

According to [2, Remark 2.4] the only continuous involutions of \((\mathbb {R},+)\) are I and \(-I\), where \(I:\mathbb {R} \rightarrow \mathbb {R}\) denotes the identity map. Results about I can be found in Sect. 6. In the present example the involution is the group inversion \(-I\).

Like Kannappan we restrict our attention to \(z_0 \in \mathbb {R}\setminus \{ 0\}\), because \(z_0 = 0\) reduces (3) to d’Alembert’s classic functional equation (1), the continuous solutions of which can be found in the literature (see for instance [1, Sect. 2.4.1] or [16, Proposition 9.4]).

The continuous characters on \(\mathbb {R}\) are known to be \(\chi (x) = \exp (\lambda x)\), \(x \in \mathbb {R}\), where \(\lambda \) ranges over \(\mathbb {C}\) (see for instance [16, Example 3.7a]). The condition \(\chi (z_0)^2 = 1\) of Corollary 10 becomes \(\exp (2i\lambda z_0) =1\), which reduces to \(\lambda = m\pi /z_0\), where \(m \in \mathbb {Z}\). The relevant characters are thus

$$\begin{aligned} \chi _m(x) := \exp (im\pi \,\frac{x}{z_0}), \quad \ x \in \mathbb {R}, \text { and } m \in \mathbb {Z}, \end{aligned}$$

and so the corresponding continuous solutions of (4) are

$$\begin{aligned} f_m(x) = \chi _m(z_0)\,\frac{\chi _m(x) + \chi _m(-x)}{2} = (-1)^m\cos \left( m\pi \,\frac{x}{z_0}\right) , \quad \ x \in \mathbb {R}. \end{aligned}$$

This formula shows that \(f_m = f_{-m}\). Hence \(m \in \{ 0,1,2, \dots \}\) suffices as domain for the parametrization by m. We conclude that the non-zero continuous solutions of (3) are the functions

$$\begin{aligned} f_m(x) = (-1)^m\cos \left( m\pi \,\frac{x}{z_0}\right) , \quad \ x \in \mathbb {R}, \; m= 0,1,2, \dots \end{aligned}$$
(15)

The solution \(g_m\) of d’Alembert’s functional equation corresponding to \(f_m\) is \(g_m(x) = \cos (m\pi x/z_0)\), \(x \in \mathbb {R}\), for \(m = 0,1,2,\dots \)

In fairness it should be mentioned that Kannappan considered Lebesgue measurable and not just continuous solutions. However, that makes no difference, because Lebesgue-measurable solutions of d’Alembert’s functional equation on \(\mathbb {R}\) are continuous ([9, Corollary 22.5] or [16, Corollary 9.22d]).

Example 13

We shall in this example find the continuous solutions of Kannappan’s functional equation on the circle group

$$\begin{aligned} S = \mathbb {T} := \big \{ e^{i\theta } \mid \theta \in \mathbb {R} \big \} \end{aligned}$$

with the involution being the group inversion, and with \(z_0 \in \mathbb {T} \setminus \{ 1\}\). We may write \(z_0 = \exp {i\theta _0}\), where \(\theta _0 > 0\). Kannappan’s functional equation is here

$$\begin{aligned} f\big (xye^{i\theta _0}\big ) + f\big (xy^{-1}e^{i\theta _0}\big ) = 2f(x)f(y) \quad \text { for }x,y \in \mathbb {T}. \end{aligned}$$
(16)

According to Corollary 10 the continuous solutions \(f \ne 0\) of (16) are the functions of the form

$$\begin{aligned} f = \chi (z_0)\,\frac{\chi + \check{\chi }}{2}, \end{aligned}$$

where \(\chi : \mathbb {T} \rightarrow \mathbb {C}\) ranges over the continuous characters of \(\mathbb {T}\) for which \(\chi (z_0)^2 = 1\). It is well known that the continuous characters of \(\mathbb {T}\) are the functions

$$\begin{aligned} \chi _n(e^{i\theta }) = e^{in\theta }\quad \text { for }e^{i\theta } \in \mathbb {T},\;\; \text { where } n \in \mathbb {Z} \end{aligned}$$

(see for instance [16, Example 3.10]). The condition \(\chi (z_0)^2 = 1\) becomes

$$\begin{aligned} \chi _n(z_0)^2 = e^{2i\theta _0n} = 1. \end{aligned}$$
(17)

Case 1 \(\theta _0\) is an irrational multiple of \(\pi \).

Assume there is a continuous solution \(f \ne 0\) of (16) such that \(f \ne 1\). Then \(f = \chi _n(z_0)(\chi _n + \check{\chi _n})/2\) for some \(n \in \mathbb {Z}\), where \(n \ne 0\), since \(f \ne 1\). The condition (17) for \(\chi _n\) says that \(2\theta _0n = 2\pi m\) for some \(m \in \mathbb {Z}\). Thus \(\theta _0\) is a rational multiple of \(\pi \), contradicting the headline of this case. Hence the only continuous solutions of (16) are in this case the trivial ones \(f = 0\) and \(f = 1\) that always exist.

Case 2 \(\theta _0\) is a rational multiple of \(\pi \). We write

$$\begin{aligned} \theta _0 = \frac{p}{q}\,\pi , \quad \text { where } p,q \in \{ 1,2, \dots \} \text { and }\gcd (p,q) = 1. \end{aligned}$$

If \(\chi _n\) satisfies (17) then \(\tfrac{p}{q}n \in \mathbb {Z}\), so q|n. So non-zero, continuous solutions exist only if \(n = mq\) for some \(m \in \mathbb {Z}\). On the other hand, for any such index \(n = mq\) we find that \(\chi _{mq}\) satisfies (17), so \(f_{m} := \chi _{mq}(z_0)(\chi _{mq} + \check{\chi _{mq}})/2\) is according to Corollary 10 a solution of (16). Written out,

$$\begin{aligned} \chi _{mq}\big (e^{i\theta }\big )&= e^{i\theta mq} \text { and } \chi _{mq}\big (e^{i\theta _0}\big ) = e^{i\theta _0 mq} = e^{imp} = (-1)^{mp}, \text { so}\nonumber \\ f_{m}\big (e^{i\theta }\big )&= (-1)^{mp}\,\frac{e^{i\theta mq} + e^{-i\theta mq}}{2} = (-1)^{mp}\cos \big (mq\theta \big ). \end{aligned}$$
(18)

We conclude that the functions \(f_{m}\) range over all non-zero continuous solutions of (16) with \(\theta _0 = \tfrac{p}{q}\pi \), when m ranges over \(\mathbb {Z}\). Actually, \(m \in \{ 0,1,2, \dots \}\) suffices, because \(f_{m}\) is even with respect to the index m, as is apparent from the formula (18).

For each \(m = 0,1,2,\dots \) the solution \(g_m\) of d’Alembert’s functional equation corresponding to \(f_m\) is \(g_{m}(e^{i\theta })= \cos (mq\theta )\).

Example 14

In this example we solve Kannappan’s functional equation on a semigroup S, which is not a group. It is not even a monoid.

Let \(I := \,]0,1[\) be equipped with multiplication as composition rule. Then \(S := I \times I\) is a commutative semigroup and \(\tau :S \rightarrow S\), given by \(\tau (s,t) := (t,s)\), an involution. For \(s_0,t_0 \in I\) consider the functional equation

$$\begin{aligned} f\big (prs_0, qst_0\big ) + f\big (pss_0,qrt_0\big ) = 2f(p,q)f(r,s), \quad \ p,q,r,s \in I. \end{aligned}$$
(19)

Deleting \(s_0\) and \(t_0\) from (19) we arrive at the functional equation

$$\begin{aligned} g(pr, qs) + g(ps,qr) = 2g(p,q)g(r,s), \quad \ p,q,r,s \in I, \end{aligned}$$
(20)

which was studied by Chung et al. [3] (except for the innocuous normalizing factor 2 on the right hand side). For more about the background of (20) consult the monographs [12, Sect. 10.2j] by Kannappan and [14, Theorem 17.2] by Kannappan and Sahoo.

The functional equation (19) fits into our framework: Take S and \(\tau \) to be as above and put \(z_0 := (s_0,t_0) \in S\). Then (19) becomes (4), and (20) becomes d’Alembert’s functional equation (2). This connection between (20) and (2) was pointed out in [18].

We apply the results of [18] about (20). It follows from [18, Corollary 4.1] that the solutions g of (20) are the functions of the form

$$\begin{aligned} g(s,t) = \frac{\mu _1(s)\mu _2(t) + \mu _1(t)\mu _2(s)}{2}, \end{aligned}$$

where \(\mu _1, \mu _2:I \rightarrow \mathbb {C}\) are multiplicative functions on I. That \(g \in \mathcal {A}\) means that \(g((s_0,t_0)^2) = g(s_0,t_0)^2\) and that \(g(s_0,t_0) \ne 0\). By a simple computation

$$\begin{aligned} g\big ((s_0,t_0)^2\big ) - g(s_0,t_0)^2 = \tfrac{1}{4}\big [\mu _1(s_0)\mu _2(t_0) - \mu _1(t_0)\mu _2(s_0)\big ]^2, \end{aligned}$$

so the conditions mean that \(\mu _1(s_0)\mu _2(t_0) = \mu _1(t_0)\mu _2(s_0) \ne 0\). From Corollary 6 we read that the non-zero solutions f of (19) are

$$\begin{aligned} f(s,t) = \mu _1(s_0)\mu _2(t_0)\,\frac{\mu _1(s)\mu _2(t) + \mu _1(t)\mu _2(s)}{2}, \quad s,t \in I, \end{aligned}$$

where \(\mu _1, \mu _2:I \rightarrow \mathbb {C}\) are multiplicative and \(\mu _1(s_0)\mu _2(t_0) = \mu _1(t_0)\mu _2(s_0) \ne 0\).

6 The case of the identity map

In this section we solve Kannappan’s functional equation in the form

$$\begin{aligned} f(xys_0) = f(x)f(y) \quad \text { for all } x,y \in S, \end{aligned}$$
(21)

where S is a semigroup, and \(s_0 \in S\) is arbitrary, but fixed (Proposition 16). The Eq. (21) is our earlier Eq. (4) with \(x^* = x\). However, on a non-commutative semigroup the identity is not an involution. So the theory developed in the previous sections does not apply, and we must provide a separate exposition. We change notation from \(z_0\) to \(s_0\), because we do not require that \(s_0 \in Z(S)\), which we did for \(z_0\).

Lemma 15

Let \(f:S \rightarrow \mathbb {C}\) be a solution of (21). Then

  1. (a)

    \(f(xs_0^2) = f(s_0)f(x)\)    for all \(x \in S\).

  2. (b)

    \(f \ne 0 \iff f(s_0) \ne 0\).

  3. (c)

    \(f(xs_0y) = f(xys_0)\)    for all \(x,y \in S\).

Proof

(a) and (b) are proved like the corresponding statements in Lemma 1. (c) We may here assume \(f \ne 0\), so that \(f(s_0) \ne 0\) by (b). Putting \(x = s_0\) in (21) we see that \(f(s_0ys_0) = f(s_0)f(y)\). Using that we find

$$\begin{aligned} f(s_0)f(xs_0y)&= f\big (xs_0ys_0^2\big ) = f\big (x(s_0ys_0)s_0\big ) = f(x)f(s_0ys_0) \\&= f(x)f(s_0)f(y) = f(s_0)f(x)f(y) = f(s_0)f(xys_0). \end{aligned}$$

\(\square \)

If S has an identity element \(e \in S\) and \(s_0 = e\), then (21) reduces to the relation that defines multiplicative functions. Proposition 16 generalizes in a neat way this from \(s_0 = e\) to any \(s_0 \in S\).

Proposition 16

The solutions of (21) are the functions of the form \(f = \chi (s_0)\chi \), where \(\chi :S \rightarrow \mathbb {C}\) is a multiplicative function.

Proof

The case of \(f = 0\) is trivial, so we may during the rest of the proof assume that \(f \ne 0\).

Let \(f \ne 0\) be a solution of (21). Since \(f(s_0) \ne 0\) by Lemma 15b we may define the function \(\chi (x) := f(xs_0)/f(s_0)\), \(x \in S\). Using Lemma 15a and c we get

$$\begin{aligned} f(s_0)^2\chi (x)\chi (y)&= f(xs_0)f(ys_0) = f\big ((xs_0)(ys_0)s_0\big ) = f\big (xs_0ys_0^2\big ) \\&= f(s_0)f(xs_0y) = f(s_0)f(xys_0) = f(s_0)^2\,\frac{f(xys_0)}{ f(s_0)} \\&= f(s_0)^2\,\chi (xy), \end{aligned}$$

which implies that \(\chi \) is multiplicative. By Lemma 15(a) we find that

$$\begin{aligned} f(x) = \frac{f\big (xs_0^2\big )}{f(s_0)} = \frac{f(xs_0s_0)}{f(s_0)} = \chi (xs_0) = \chi (x)\chi (s_0). \end{aligned}$$

The converse statement is trivial to verify, so we omit it. \(\square \)