The expression for f(x) is missing a closing parenthesis.
The next error might be a NameError concerning xcos.
Multiplication should be explicit: write x*cos(x) and x*sin(x) instead of xcos(x) and xsin(x).