[tex]y=tanx\\\\y'=\lim\limits_{h\to0}\frac{tan(x+h)-tanx}{h}=\lim\limits_{h\to0}\frac{1}{h}\left(\frac{sin(x+h)}{cos(x+h)}-\frac{sinx}{cosx}\right)\\\\=\lim\limits_{h\to0}\frac{1}{h}\left(\frac{sin(x+h)cosx-sinxcos(x+h)}{cosxcos(x+h)}\right)=\lim\limits_{h\to0}\frac{sin(x+h-x)}{hcosxcos(x+h)}\\\\=\lim\limits_{h\to0}\frac{sinh}{hcosxcos(x+h)}=\left[\frac{0}{0}\right]\xrightarrow{l'Hopital's\ rule}\lim\limits_{h\to0}\frac{cosh}{cosxcos(x+h)+hcosx[-sin(x+h)]}\\\\=\frac{cos0}{cosxcos(x+0)}=\frac{1}{cos^2x}[/tex]