Q:

Figuring out the frequency components using FFT

The function defined below has three frequencies 2, 4 and 10. How to use the Fourier transform (FFT) to show these frequencies?
   myfun[t_] = 
 1/(2 Sqrt[
   2]) (\[Sqrt]Abs[
     3 + Cos[4 t] - 
      4 Cos[2 t] (-1 + 
         E^(-0.018` t) (Cos[9.99999594999918` t] + 
            0.0009000003645002213` Sin[9.99999594999918` t])^2) + 
      4 E^(-0.018` t) (Cos[9.99999594999918` t] + 
         0.0009000003645002213` Sin[9.99999594999918` t])^2])

Edit: The suggested duplicate deals with a simple function. It really doesn't work for this complicated scenario. Would appreciate if someone gets it done.

A:

First lets plot your function to see what it looks like.
Plot[myfun[t], {t, 0, 100}]

This is only between 0 to 100 seconds. What we see is some very high frequencies but also a constant frequency which we can estimate at about 0.3 Hz. If we plot at later times 
Plot[myfun[t], {t, 500, 600}]

We can see that the starting high frequencies have died away and the frequency at about 0.3 Hz remains.
Now we can do a Fourier analysis. As you have some high frequencies we need to sample at a very fast sample rate. I have guessed at the sample rate but hope it is good enough. 
sr = 100;  (* Sample rate *)
data = Table[myfun[t], {t, 0, 1000, 1/sr}];
nn = Length@data

Plotting again shows that I seem to have captured the high frequency data
ListLinePlot[data[[1 ;; Round[100 sr]]]]

You should probably check by looking at a shorter time interval. 
Now for the Fourier analysis.
ft = Fourier[data, FourierParameters -> {-1, -1}];
freqs = Table[f, {f, 0, sr (nn - 1)/nn, sr/nn}];

The second line of code is to make the frequencies that correspond to the data in the Fourier transform. See here for details. 
ListLogPlot[Transpose[{freqs, Abs[ft]}][[1 ;; 10000]], 
 PlotRange -> All, Joined -> True]

We can see a dominant peak at about 0.3 Hz and lots of other peaks that make up your high frequencies. 
Hope that helps. 

A:

Periodogram and Spectrogram are also useful:
data = Table[myfun[t], {t, 0, 100000, .1}];
Periodogram[data, SampleRate -> 10, PlotRange -> All, Frame -> True, 
 FrameLabel -> {"Hz", "dB"}]

Spectrogram[data, SampleRate -> 10, PlotRange -> {0, .5}, 
 FrameLabel -> {"Time", "Hz"}]

