What is the formula for $\int \cos(\pi x)dx$? I want to evaluate the integral $$\int \cos(\pi x)dx$$
I thought it would simply be $\sin(\pi x) +C$
However in the solutions book the answer is $\frac{1}{\pi}\sin(\pi x)$
This is an integral where it seems as if the chain rule is being performed? 

Let's take the derivative of $\frac{1}{\pi}\sin(\pi x)$
to see that we get the function being integrated.  
Remember that $$\frac{d}{dx}f(g(x))= g'(x)f'(g(x))$$ 
$g(x)$, here, the inside function, is simply $\pi x$. The outer function, f(x), is the sine function.  
$$g'(x)=\frac{d}{dx}(\pi x)=\pi$$
$$f'(g(x))=\frac{d}{dx}\frac{1}{\pi}\sin(g(x))=\frac{1}{\pi}\cos(g(x))$$  
Multiplying these, and letting $g(x)=\pi x$:  
$$(\pi)(\frac{1}{\pi}\cos(\pi x))= \cos (\pi x)$$  
Which is what we wanted to show.
