Sin oscillation (A*sin(x+a))

courteous

New member
Joined
Sep 21, 2008
Messages
41
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}}\) :?:
 
courteous said:
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}}\)

That is how 'a' and 'b' are defined - or chose the values of 'a' and 'b' (since 'p' and 'q' are given.

for example if p = 3 and q = 4

then

a = 3/5

and

b = 4/5

This is how you choose those (a & b)

Now put these expressions for 'a' and 'b' - for the first transition (your first question) - and simplify a bit - you'll see the equality.

?:
 
Is there a geometrical reference of \(\displaystyle a\) and \(\displaystyle b\) being defined by \(\displaystyle \frac{p (\text{or}q)}{\sqrt{p^2+q^2}}\)? [*tic*toc*tic*; time passes by :D ] ... meanwhile, I've drawn some sketch, and now have another issue: shouldn't be vice-versa, so that \(\displaystyle a=\frac{q}{\sqrt{p^2+q^2}}\) (q not p!), as \(\displaystyle a=\cos{\phi}\) (not \(\displaystyle \sin{\phi}\)!) and \(\displaystyle \cos{\phi}\) equals \(\displaystyle q\cos{x}\) :?:
 
courteous said:
Is there a geometrical reference of \(\displaystyle a\) and \(\displaystyle b\) being defined by \(\displaystyle \frac{p (\text{or}q)}{\sqrt{p^2+q^2}}\)? [*tic*toc*tic*; time passes by :D ] ... meanwhile, I've drawn some sketch, and now have another issue: shouldn't be vice-versa,

so that \(\displaystyle a=\frac{q}{\sqrt{p^2+q^2}}\) (q not p!), as \(\displaystyle a=\cos{\phi}\) (not \(\displaystyle \sin{\phi}\)!) and \(\displaystyle \cos{\phi}\) equals \(\displaystyle q\cos{x}\)

That really does not matter - it is all how you are defining it and where you are going. Doing it the way you are suggesting will lead to EXACTLY the SAME output.
:?:
 
Top