Answer
$$\frac{1}{a}\sin ax + C{\text{ and }} - \frac{1}{a}\cos ax + C,{\text{ where }}C{\text{ is an arbitrary constant}}{\text{.}}$$
Work Step by Step
$$\eqalign{
& \int {\cos ax} dx \cr
& {\text{The derivative of }}\frac{d}{{dx}}\left[ {\sin ax} \right] = a\cos ax{\text{ }} \Rightarrow {\text{ }}\cos ax = \frac{1}{a}\frac{d}{{dx}}\left[ {\sin ax} \right] \cr
& {\text{Then, }} \cr
& \int {\cos ax} dx = \frac{1}{a}\sin ax + C,{\text{ where }}C{\text{ is an arbitrary constant}}{\text{.}} \cr
& \cr
& \int {\sin ax} dx \cr
& {\text{The derivative of }}\frac{d}{{dx}}\left[ {\cos ax} \right] = - a\sin ax{\text{ }} \Rightarrow {\text{ }}\sin ax{\text{ }} = - \frac{1}{a}\frac{d}{{dx}}\left[ {\cos ax} \right] \cr
& {\text{Then, }} \cr
& \int {\sin ax} dx = - \frac{1}{a}\cos ax + C,{\text{ where }}C{\text{ is an arbitrary constant}}{\text{.}} \cr} $$