Understanding the frequency domain I'm trying to understand what frequency domain is. I found general explanations on the Internet, for example:

frequency-domain graph shows how much of the signal lies within each given frequency band over a range of frequencies
Fourier transform refers to both the frequency domain representation and the mathematical operation that associates the frequency domain representation to a function of time.
Fourier series transform a signal from time domain to frequency domain.

But I could not find an example which shows how I can obtain the frequency domain graph using the formula of a signal.
The graphs I found are sometimes discrete like this one:

and sometimes continuous like this one:

that seems confusing.
Suppose I have a signal $x:\Bbb R\to \Bbb R$ defined by the formula $x(t) = \cos(6\pi t)e^{-\pi t^2}$.
It's clear how to plot its time domain graph, But how can I find its frequency domain function or graph?
Should I apply fourier transform on it?:
$$\widehat{x}(\tau)=\int_{-\infty}^\infty \cos(6\pi t)e^{-\pi t^2}e^{-2\pi t \tau i}dt$$
Does plotting this new function give the frequency domain graph? (but it is complex valued, how can it be plotted?)
Or should I find the Fourier series of $x(t)$ and plot the series coefficients discretely?
So my only question is: How can I mathematically obtain the the frequency domain function (and then plot it to get the frequency domain graph) using the formula of $x(t)$?
In simple terms, Image shown here speaks for itself.

Before speaking about Fourier Transform black magic lets understand idea behind it. Work of the Mathematician Joseph Fourier demonstrated any arbitrary periodic (this is important) signal can be decomposed into bunch of sine-waves at with their corresponding amplitude and relative phases. 

Essentially, he meant basic component to build any signal is a sine-wave. In other words you can build any arbitrary signal exactly if you have information about how many different frequencies are present, amplitude of the each sine wave, and there relative phases. This job can be done by inverse Fourier transform. And as should be clear by now, Fourier Transform does the reverse give it composed time domain signal and it will tell you sine-waves amplitude for corresponding frequencies and there relative phases. Hence, the output is a complex. Which makes sense in polar co-ordinates, which gives you amplitude and phase. 

E.G. When you strum a guitar strings, it vibrates at multiple frequencies with different amplitude which makes up a beautiful sound, otherwise you know how a single frequency sounds(watch this :https://www.youtube.com/watch?v=qNf9nzvnd1k). one with the highest amplitude is known as tone.

So, as you can see in the figure attached here, Fourier transform tells you exactly the same information.


  Suppose I have a signal $x:\Bbb R\to \Bbb R$ defined by the formula
  $x(t) = \cos(6\pi x)e^{-\pi x^2}$.


For to obtain Fourier transform of the function you specified it should be function of time (t). So, I will just re-write your function above slightly differently replace x with t, since x(t).

$x(t) = \cos(6\pi t)e^{-\pi t^2}$.

Also, Take a look at this,
http://www.thefouriertransform.com/pairs/rightSidedSinusoids.php

Hope this helps.