ANSWER:
The cosine and sine values are reversed.
Explanation:
We can rewrite the function as follows:
In this case, then it would be:
What it means is that the error was that it was wrong when calculating the cosine and the sine, it has the values inverted