Deriving the Fourier transform of cosine and sine
Your work is OK except for the problem that the Fourier transform of 
$\cos(2\pi f_0 t)$ does not exist in the usual sense of a function of $f$,
and we have to extend the notion to include what are called distributions,
or impulses, or Dirac deltas, or (as we engineers are wont to do, much
to the disgust of mathematicians) delta functions.  Read
about the conditions that must be satisfied in order for the Fourier 
transform $X(f)$ of the signal $x(t)$ to exist (in the usual sense)
and you will see that $\cos(2\pi f_0 t)$ does not have a Fourier transform
in the usual sense.

Turning to your specific question, once you understand that impulses
are defined only in terms of how they behave as integrands in an
integral, that is, for $a &lt; x_0 &lt; b$,
$$\int_{a}^{b} \delta(x-x_0)g(x)\,\mathrm dx = g(x_0)$$
provided that $g(x)$ is continuous at $x_0$, then
it is easier to deduce the Fourier transform of 
$$\cos(2\pi f_0 t) 
= \left.\left.\frac{1}{2}\right[e^{j2\pi f_0 t} + e^{-j2\pi f_0 t}\right]$$
by musing on the fact that
$$\int_{-\infty}^\infty \delta(f-f_0)e^{j2\pi ft}\,\mathrm df = e^{j2\pi f_0t}$$
and so it must be that $\cos(2\pi f_0 t)$ is the inverse
Fourier transform of $\displaystyle \left.\left.\frac{1}{2}\right[\delta(f-f_0) + \delta(f+f_0)\right]$.