#y=tanx# is a discontinuous function. It means that it is not a function like #y=x^3+5# or #y=sinx# (all functions which domain is all the set #RR#), but it's a more particular function and we have to determinate its domain.

It's important to say that #y=tan(x)-3# has the same domain of #y=tan(x)#. That's because if a point exists in tan(y), it exists also in tan(x)-3. Geometrically speaking, imagine the points of discontinuity as some sections or points where the function can't be draw. If you translate vertically the function, all the points of the function are moved up or down, but the "holes" are in the same position.

So the domain D of #y=tanx# is defined in this way: #D=RR-{pi/2+kpi " where "k in ZZ}#.

The domain of #y=tan(x)-3# is D as said above.