Fourier transform exercise
The signal, whose total energy you want to calculate, is periodic therefore it will have infinite energy...

To see that note, the following Fourier transform pair:
$$
x(t) = \cos(2\pi f_0 t) \longleftrightarrow X(f) = 0.5 \delta(f + f_0) + 0.5 \delta(f - f_0)  
$$

And based on Parseval's relation, 
$$
E_x = \int_{-\infty}^{\infty} |x(t)|^2 dt = \int_{-\infty}^{\infty} |X(f)|^2 df   
$$

you can conlude that total energy is infinite