Let S be a semigroup, Z(S) be the center of S and \(\sigma :S\rightarrow S\) is an involutive automorphism. In this paper, we describe the complex-valued solutions of one of d’Alembert’s functional equations \(\begin{aligned} f(xy)-\tau (y)f(x\sigma (y))=2f(x)g(y),\ x,y\in S, \end{aligned}\) where \(\tau :S\rightarrow {\mathbb {C}}\) is a multiplicative function such that \(\tau (x\sigma (x))=1\) for all \(x\in S\) . This allows us to solve Van Vleck’s functional equation \(\begin{aligned} \displaystyle \int _{S} f(xyt)d\mu (t)-\tau (y)\displaystyle \int _{S} f(x\sigma (y)t)d\mu (t)= 2f(x)g(y),\ x,y\in S, \end{aligned}\) where \(\mu \) is a measure that is a linear combination of Dirac measures \((\delta _{z_i})_{i\in I}\) , such that \(z_i\in Z(S)\) for all \(i\in I\) , and I is a finite set. Many consequences of these results are presented.