Updated diff and equality check in tan. Added tests

Updated equality check so that it checks : `tan(x) = sin(x)/cos(x)`
Changed the diff to `tan(x)**2 + 1` from `sec(x)**2`
Added relevant tests to check the new functionality.