Because an integral is, in essence, the inverse function to a derivative, the integral of \(\cos x\) is going to be the function whose derivative is equal to \(\cos x\). To do this, let’s look at the derivatives for the basic trigonometric functions:
\[ \frac{d}{dx}(\sin x) = \cos x \]
\[ \frac{d}{dx}(\cos x) = -\sin x \]
We can tell that the derivative of \(\cos x\) is \(\sin x\) because the value of the slope of the red curve is the value of the blue curve at every point.
If we have memorized the derivatives of the trigonometric functions, then the integral is the opposite of that. This means that:
\[ \int \cos x \,dx = \sin x + C \]
In other words, the integral of \(\cos x\) is equal to \(\sin x + C\).