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.5\sin(\pi x − 1.5\pi) + 1.5$$



The answer I provided, but that was rejected was:



$$g(x) = 0.5\sin(\pi 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\pi$-periodic so \begin{align}\sin(\pi x - 1.5\pi)&= \sin(\pi x - 1.5\pi + 2\pi)\\ &= \sin(\pi x + .5\pi)\\&= \sin(\pi x + 1.5708...)\\&\approx \sin(\pi x + 1.5).\end{align}


No comments:

Post a Comment

real analysis - How to find $lim_{hrightarrow 0}frac{sin(ha)}{h}$

How to find $\lim_{h\rightarrow 0}\frac{\sin(ha)}{h}$ without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...