Signal Reconstruction after fourier transform
Suppose you want to perform N points FFT, then the evenly spaced frequency vector is given by

  f= (0:NumUniquePts-1)*Fs/N;


where NumUniquePts = ceil((N+1)/2) is the number of unique points in f, and Fs is the sampling rate.

So if fftx=fft(x,N), then $\alpha_1$ = fftx[15/(Fs/N)+1] and $\alpha_2$ = fftx[40/(Fs/N)+1] (provided 15 and 40 can be divided by Fs/N).

See here for more.