  Given a semigroup $S$ generated by its squares equipped with an involutive
automorphism $\sigma$ and a multiplicative function $\mu:S\to\mathbb{C}$ such
that $\mu(x\sigma(x))=1$ for all $x\in S$, we determine the complex-valued
solutions of the following functional equations
\begin{equation*}f(xy)+\mu(y)f(\sigma(y)x)=2f(x)g(y),\, x,y\in S\end{equation*}
and \begin{equation*}f(xy)+\mu(y)f(\sigma(y)x)=2f(y)g(x),\, x,y\in
S\end{equation*}
