Funkcijos pirmykštės funkcijos

Kodėl formulė \(\int \frac{1}{\cos^2 x} dx = \tan x + C\) yra teisinga?