As #costheta=0#, we have

#sintheta=sqrt(1-cos^2theta)=sqrt(1-0)=sqrt1=+-1# and

#theta=+-pi/2#

But, #tantheta=sintheta/costheta# and as #sintheta!=0#, but #costheta=0#, #tantheta# is not defined.

However, as #theta->pi/2# from left (on real number line), #tantheta->oo# and as #theta->pi/2# from right (on real number line), #tantheta->-oo#.

Similarly, as #theta->-pi/2# from left (on real number line), #tantheta->oo# and as #theta->-pi/2# from right (on real number line), #tantheta->-oo#.

graph{tanx [-10, 10, -5, 5]}