<s>[INST] Let $f(x)=1+2\cos x +3 \sin x$. If real number $a, b, c$ are such that $af(x)+bf(x+c)=1$ holds for any $x \in \mathbb R$, then find $a, b, c$ 

Let $f(x)=1+2\cos x +3\sin x$. If real number $a, b, c$ are such that $af(x)+bf(x+c)=1$ holds for any $x \in \mathbb R$, then find $a, b, c$


Solution given as in book:
since $f(x)+f(x+\pi)=2 \implies \dfrac{1}{2}f(x)+\dfrac{1}{2}f(x+\pi)=1$
and after comparing with original equation we get $a=\dfrac{1}{2}, b=\dfrac{1}{2}, c=\pi$
My doubt: Isn't there other way to approach this problem as it is not obvious to do  $f(x)+f(x+\pi)=2$ because this kind of step does not come to mind immediately.
 [/INST] Note that $3\sin x+2\cos x=\sqrt{13}\sin (x+\alpha)$ where $\tan \alpha=\frac{2}{3}$.
Now we get $$a+b+\sqrt{13}(a\sin(x+\alpha)+b\sin(x+c+\alpha))=1$$
for all $x\in \mathbb R$.
Now if we set $x=-\alpha$ and $x=\pi-\alpha$, then $a+b=1$ and $\sin c=0$ so $c=k\pi$ for some integer $k$.
Plugging $x=\frac{\pi}{2}-\alpha$ gives $a+b\cos k\pi=0$ so $k$ is odd and $a-b=0$. Therefore $a=b=\frac{1}{2}$.
</s>