The limit:
#lim_(x->1) (1-x)tan ((pix)/2)#
is in the indeterminate form #0*oo#. We can then write it as:
#lim_(x->1) tan ((pix)/2)/(1/(1-x))#
which is in the form #oo/oo# so we can use l'Hospital's rule:
#lim_(x->1) tan ((pix)/2)/(1/(1-x)) = lim_(x->1) (d/dx tan ((pix)/2))/(d/dx(1/(1-x))) #
#lim_(x->1) tan ((pix)/2)/(1/(1-x))= lim_(x->1) (pi/(2cos^2((xpi)/2)))/(1/(1-x)^2)#
#lim_(x->1) tan ((pix)/2)/(1/(1-x))= lim_(x->1) (pi(1-x)^2)/(2cos^2((xpi)/2))#
This is now in the form #0/0# and we can apply l'Hospital's rule again:
#lim_(x->1) tan ((pix)/2)/(1/(1-x))= lim_(x->1) (d/dx(pi(1-x)^2))/(d/dx (2cos^2((xpi)/2)))#
#lim_(x->1) tan ((pix)/2)/(1/(1-x))= lim_(x->1) (-2pi(1-x))/(-2picos((xpi)/2)sin((xpi)/2))= 2lim_(x->1) (1-x)/sin(pix) #
and again:
#lim_(x->1) tan ((pix)/2)/(1/(1-x))=2lim_(x->1) (d/dx(1-x))/(d/dx sin(pix)) = 2lim_(x->1) -1/(picospix) = 2/pi#