I do.
OK, seems like everything is done.
Last question: isn't there going to be any problem with radians or degrees?
You appear to be doing math (as opposed to navigation or engineering), so degrees doesn't enter into it.
Do you have any idea why this program isn't working for x=3 or x=-3?
Because it does. Is there a reason you think it doesn't?
It doesn't... I enter x=3 and it says to enter something between -pi and pi