Starting from:
cos2(x)+sin2(x)=1
Divide both sides by cos2(x) to get:
cos2(x)cos2(x)+sin2(x)cos2(x)=1cos2(x)
which simplifies to:
1+tan2(x)=sec2(x)