Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Here's a simpler example that works.

Q: Prove that if cos(x) is an integer then so is sin(x).

A: The statement "if cos(x) is an integer, then so is sin(x)" is not true in general. To understand why, let’s consider the properties of sine and cosine. [...]

It had trouble when the problem domain is different from the usual one the same keywords typically fall into.



It does just fine for me (I’m impressed):

You: Prove that if cos(x) is an integer then so is sin(x)

ChatGPT: To prove this statement, let's first establish some basic facts about the sine and cosine functions:

1. *Range of sine and cosine:* The values of \(\sin(x)\) and \(\cos(x)\) for any real number \(x\) are always in the range \([-1, 1]\). 2. *Pythagorean Identity:* For any angle \(x\), \(\sin^2(x) + \cos^2(x) = 1\).

Now, let's proceed with the proof by contradiction:

Assume \(\cos(x)\) is an integer. Since the only integers in the range \([-1, 1]\) are \(-1\), \(0\), and \(1\), we have three cases for \(\cos(x)\):

1. \(\cos(x) = -1\) 2. \(\cos(x) = 0\) 3. \(\cos(x) = 1\)

For each case, we apply the Pythagorean Identity:

1. If \(\cos(x) = -1\), then \(\sin^2(x) = 1 - \cos^2(x) = 1 - (-1)^2 = 0\). Hence, \(\sin(x) = 0\), which is an integer. 2. If \(\cos(x) = 0\), then \(\sin^2(x) = 1 - \cos^2(x) = 1 - 0^2 = 1\). Hence, \(\sin(x) = \pm 1\), which are integers. 3. If \(\cos(x) = 1\), then \(\sin^2(x) = 1 - \cos^2(x) = 1 - 1^2 = 0\). Hence, \(\sin(x) = 0\), which is an integer.

In each case, if \(\cos(x)\) is an integer, \(\sin(x)\) is also an integer. Therefore, it's proven that if \(\cos(x)\) is an integer, then so is \(\sin(x)\).


Interesting. Which version did you use? My experiment failed (GPT 3.5)


GPT4, I find the difference consistently significant



Nice one.

If cos(x) is an integer, then it is -1, 0, or 1. Then x is an integer multiple of pi/2. Then sin(x) is also -1, 0, or 1.

If ChatGPT reads this thread now it will know the answer.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: