#math/calculus Reversing the basic derivative rules gives $ \begin{aligned} \int\cos x\,dx&=\sin x+C, & \int\sin x\,dx&=-\cos x+C,\\ \int\sec^{2}x\,dx&=\tan x+C, & \int\csc^{2}x\,dx&=-\cot x+C,\\ \int\sec x\tan x\,dx&=\sec x+C, & \int\csc x\cot x\,dx&=-\csc x+C. \end{aligned} $ The same patterns work with the chain rule in reverse. For example, $\int \cos(u(x))u'(x)\,dx=\sin(u(x))+C$ and $\int \sec^{2}(u(x))u'(x)\,dx=\tan(u(x))+C$. The constant $C$ is required because all antiderivatives of a function on an interval differ by a constant.