why the integral of secant squared is tangent?

Can you find and share a proof of why the integral of secant squared is tangent?
As another reply opportunity, why is the integral of cosecant squared negative cotangent?

f sec(x)tan(x)dx

Since

sec(x)= 1/cos(x)

tan(x) = sin(x)/cos(x)

f 1/cos2(x) sin(x)dx

— f cos-2(x) X d(cos(x))

Let u = cos(x), and n = -2

Un+1/n+1 + C

_cos -2+1(x)/-2+1 + C

_cos -1(x)/-1 + C

1/cos(x) + C

and since 1/cos(x) = sec(x)

4sec(x) + C