I'm going through part of textbook on deriving "formula" for writing \(\displaystyle p\sin{x}+q\cos{x}\) as \(\displaystyle A*\sin{(x+\alpha)}\).
As it is not english, I'll roughly translate it (keeping the gist in context faultless, of course):
BEGIN»Let's look at function \(\displaystyle f(x)=p\sin{x}+q\cos{x}\), where \(\displaystyle p, q\) simultaneously don't equal \(\displaystyle 0\) (zero). \(\displaystyle \rightarrow\) Then \(\displaystyle f(x)=\sqrt{p^2+q^2}(a\sin{x}+b\cos{x})\), where \(\displaystyle a\) is \(\displaystyle a=\frac{p}{\sqrt{p^2+q^2}}\) and \(\displaystyle b\) is \(\displaystyle b=\frac{q}{\sqrt{p^2+q^2}}\). So, \(\displaystyle a^2+b^2=1\). As we know, there exists such \(\displaystyle \phi\), so that \(\displaystyle a=\cos{\phi}\) and \(\displaystyle b=\sin{\phi}\) (note:\(\displaystyle \phi\) is an angle of rotation to get from point \(\displaystyle (1,0)\) on unit circle to point with coordinates \(\displaystyle (a,b)\)).
Therefore, \(\displaystyle f(x)=\sqrt{p^2+q^2}(\cos{\phi}\sin{x}+\sin{\phi}\cos{x})=\sqrt{p^2+q^2}\sin({x+\phi})\)«END
Now, how did the first transition happen »... \(\displaystyle f(x)=p\sin{x}+q\cos{x}\) \(\displaystyle \rightarrow\) \(\displaystyle f(x)=\sqrt{p^2+q^2}(a\sin{x}+b\cos{x})\) ...« :?:
And, why is \(\displaystyle a=\frac{p}{\sqrt{p^2+q^2}}\) :?:
As it is not english, I'll roughly translate it (keeping the gist in context faultless, of course):
BEGIN»Let's look at function \(\displaystyle f(x)=p\sin{x}+q\cos{x}\), where \(\displaystyle p, q\) simultaneously don't equal \(\displaystyle 0\) (zero). \(\displaystyle \rightarrow\) Then \(\displaystyle f(x)=\sqrt{p^2+q^2}(a\sin{x}+b\cos{x})\), where \(\displaystyle a\) is \(\displaystyle a=\frac{p}{\sqrt{p^2+q^2}}\) and \(\displaystyle b\) is \(\displaystyle b=\frac{q}{\sqrt{p^2+q^2}}\). So, \(\displaystyle a^2+b^2=1\). As we know, there exists such \(\displaystyle \phi\), so that \(\displaystyle a=\cos{\phi}\) and \(\displaystyle b=\sin{\phi}\) (note:\(\displaystyle \phi\) is an angle of rotation to get from point \(\displaystyle (1,0)\) on unit circle to point with coordinates \(\displaystyle (a,b)\)).
Therefore, \(\displaystyle f(x)=\sqrt{p^2+q^2}(\cos{\phi}\sin{x}+\sin{\phi}\cos{x})=\sqrt{p^2+q^2}\sin({x+\phi})\)«END
Now, how did the first transition happen »... \(\displaystyle f(x)=p\sin{x}+q\cos{x}\) \(\displaystyle \rightarrow\) \(\displaystyle f(x)=\sqrt{p^2+q^2}(a\sin{x}+b\cos{x})\) ...« :?:
And, why is \(\displaystyle a=\frac{p}{\sqrt{p^2+q^2}}\) :?: