Thursday, 18 July 2013

trigonometry - Are these two functions equivalent?



I'm working my way through some 'Graphs of trigonometric functions' on khanacademy.org and came across something that I found to be a little confusing, and I wanted to know if my intuition is correct or not.



The answer the question wanted me to supply was the function:




f(x)=0.5sin(πx1.5π)+1.5



The answer I provided, but that was rejected was:



g(x)=0.5sin(πx+1.5)+1.5



If I graph these functions, or write a function on my computer and test against various inputs, these yield slightly different answers.



It appears that f gives me better answers than g, but I wasn't sure if this was due to the math, or due to computers.




Are these functions different, or am I just seeing precision errors of using pi on my computer?


Answer



They are not the same. The reason they look somewhat similar is that sin(x) is 2π-periodic so sin(πx1.5π)=sin(πx1.5π+2π)=sin(πx+.5π)=sin(πx+1.5708...)sin(πx+1.5).


No comments:

Post a Comment

real analysis - How to find limhrightarrow0fracsin(ha)h

How to find lim without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...