Added tex. Removed some parenthesis from output.
Fix a simplify test
Added Integer pattern (matches integers, @p and @n) and improved automatic simplification for sin and cos.