Let y = tan(x)
Recall the definition of tan(x) as sin(x)/cos(x)
Therefore y = sin(x)/cos(x)
Use the quotient rule, which states that for y = f(x)/g(x), dy/dx = (f'(x)g(x) - f(x)g'(x))/g2(x) with f(x) = sin(x) and g(x) = cos(x).
Recall the derivatives of sin(x) as cos(x) and cos(x) as -sin(x)
This gives:
dy/dx = (cos(x)*cos(x) + sin(x)*sin(x)) / cos2(x)
Recall the trigonometric identity sin2(x) + cos2(x) = 1
Therefore dy/dx = 1/cos2(x) = sec2(x)
QED