1
$\begingroup$

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?

$\endgroup$
4
$\begingroup$

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}

$\endgroup$
  • $\begingroup$ ah, thanks... that makes sense. I just didn't understand why the different wasn't greater, but your explanation helps. $\endgroup$ – Adam Wagner Aug 20 '15 at 15:22
  • $\begingroup$ @AdamWagner You're welcome. I understand the question as they are quite close. $\endgroup$ – Eff Aug 20 '15 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.