How to calculate the Fourier Transform of a constant? The definition of the FT in engineering is:
$$\int_{-\infty}^{\infty}f(x)e^{-j2\pi ft}dt$$
I'm having trouble calculating the FT of a constant, such as $\frac{1}{2}$:
$$\int_{-\infty}^{\infty}\frac{1}{2}\cdot e^{-j2\pi ft}dt =\frac{1}{2} \int_{-\infty}^{\infty}e^{-j2\pi ft}dt $$
$$= \frac{1}{2} \left[\frac{1}{-j2\pi f}e^{-j2\pi ft}\bigg|_{t=-\infty}^{\infty} \right] = \frac{1}{2} \left[\frac{1}{-j2\pi f}(0-\infty) \right] = \infty $$
This is incorrect, as my textbook says $1 \Longleftrightarrow \delta(f)$, which I believe means $\frac{1}{2} \Longleftrightarrow \frac{1}{2}\delta(f)$.
 A: Your computation is incorrect, because the value of $e^{-j2\pi f t}$ oscillates around the unit circle in the complex plane as
$t \to \pm \infty$ (it doesn't approach either $0$ or $\infty$), unless $f = 0$, in which case it is constantly equal to $1$.
Thus, if we average over all values of $t$, we get $0$ if $f \neq 0$ (all the oscillations in the different directions cancel out), while we get $\infty$ if $f = 0$.  So we have a function which is zero at all $f \neq 0$ and infinite at $f = 0$, i.e. $\delta(f)$.  If we take the initial constant to be $1/2$ instead of $1$,
we get $\frac{1}{2} \delta(f)$, as you surmise.
(This is a slightly informal discussion.  The correct mathematical formalism
for handling $\delta(f)$ is the theory of distributions.  It's quite likely that someone else will post an answer, or maybe a link, discussing this more formally correct approach.)
A: The mistake that you are doing is you ignored the 'j' in the exponent. The $e^j$ when raised to infinity is not equal to zero or infinity because
$e^{ix} = \cos(x)+i\sin(x)$,
and the cosine and sine magnitudes never go to beyond 1.
So the $e^{jx}$, as $x$ tends to infinity is not zero or infinity, cause they are just sinusoidal waves with both imaginary and real component.
Now keeping that aside, when you integrate a sinusoidal wave over infinite period you get zero cause the +ve half cycle and -ve half cycle keep cancelling each other for every complete cycle. EXCEPT WHEN THE FREQUENCY IS ZERO that is, if 
$\cos (fx)$ has the value of $f=0$ 
then the value will be a constant (in this case it is 1) over the whole period.
That's the reason why you find the dirac delta function in the answer. 
