What is the difference between a function and a distribution? I remember there was a tongue-in-cheek rule in mathematical analysis saying that to obtain the Fourier transform of a function $f(t)$, it is enough to get its Laplace transform $F(s)$, and replace $s$ by $j\omega$. Because their formula is pretty much the same except for the variable of integration.
And I know that this is not necessarily true (that's why I used the term tongue-in-cheek) e.g. take $f(t)=1$ to see the obvious difference.
I read somewhere that although their formula is somehow similar, their result is not necessarily similar because Laplace transform is a function and Fourier transform is a distribution. For example, the Dirac delta, $\delta(\omega)$ is a distribution and not a function.
So this led me to wonder:

  
*
  
*What is the difference between a function and a distribution? (preferably in layman's terms)
  
*Why the Laplace transform is a function and Fourier transform is a distribution? I mean, they are both infinite integrals. So what am I missing?
  

 A: Short answer by analogy: distributions are to functions as real numbers are to rational ones. The real number set can be defined as all rational numbers with the limits of all convergent infinite sequences of rational numbers added in, so distributions would be the set of all functions plus all infinite sequences of functions that "converge" in some sense. The Dirac delta function, which is the classic example of a distribution, has many equivalent definitions just like there are many different ways to calculate $\pi$ or $\operatorname{e}$. One frequently used definition is:
$$\delta(x) = \lim_{\sigma\rightarrow 0} \frac{1}{\sigma\sqrt{2\pi}} \operatorname{e}^{-\frac{1}{2} \left(\frac{x}{\sigma}\right)^2}.$$
Formally, just like how every real calculation done is performed on rational numbers, the limit is only taken after it's argument has been used in an integral. As a practical matter, though, just like taking integrals and derivatives, we can short circuit that formal process in most cases.
A: We look only at the bilateral Laplace transform, the unilateral Laplace transform being the Laplace transform of $f(t) 1_{t > 0}$.
The Laplace transform of a function (or a distribution) $f(t)$ is $$F(s) = \int_{-\infty}^\infty f(t) e^{-st}dt \overset{def}= \lim_{A \to -\infty} \lim_{B \to +\infty}\int_A^B f(t) e^{-st}dt$$
If this limit of integrals converges for $s = s_0$ and $s=s_1$, then it converges for every $Re(s) \in (Re(s_0),Re(s_1))$, and $F(s)$ is analytic there.
This is why we require $F(s)$ to be well-defined (and hence analytic) on some strip $Re(s) \in (a,b)$. In that case, the Fourier transform of $f(t) e^{-\sigma t}$ is well-defined and is $=F(\sigma+i\omega)$ for any $\sigma \in (a,b)$.
Conversely, if the Fourier transform of $f(t)$ is well-defined only as a (tempered) distribution, then the Laplace transform of $f(t)$ isn't defined on $Re(s) =0$. Indeed, because of the definition of tempered distributions and because the Fourier transform isn't well-defined for non-tempered distributions, only two cases are possible if the Fourier transform of $f(t)$ is well-defined (as a distribution) : 
 $F(s)$ is well-defined on $(0,a)$, or $F(s)$ is well-defined nowhere.
A last case exists : when $F(s)$ admits an analytic continuation beyond $Re(s) \in (a,b)$, in that case you have to remember that it isn't the Laplace transform of $f(t)$ anymore. For example $\frac{1}{s}$ is the Laplace transform of $1_{t > 0}$ on $Re(s) > 0$, and the Laplace transform of $-1_{t < 0}$ on $Re(s) < 0$
A: Suppose $f$ is a well behaved continuous function and $f(0)=0$.  Then $\displaystyle \int_{-\infty}^\infty f(x)\delta(x)\,dx = 0$, no matter which function $f$ is and if $\delta$ were a function in the conventional sense of the word, that can happen only if $\delta(x)=0$ whenever $x\ne0$.  And what is $\delta(0)$?  If $\delta$ were a function in the conventional sense, then  $\delta(0)$ would be some number, if so $\delta(x)$ would be $0$ if $x\ne0$, and some particular number if $x=0$.  But if you integrate $\displaystyle \int_{-\infty}^\infty f(x)\delta(x)\,dx$ and if $\delta$ is as just described, you would get $0$ rather than $f(0)$. So it gets said that $\delta(0)$ is a sort of "infinity".  But this is an "infinity" that can be multiplied by, for example, $3.2$, so that $\displaystyle\int_{-\infty}^\infty f(x) \Big( 3.2 \delta(x) \Big) \, dx = 3.2f(0)$.
And what of the fact that $\displaystyle\int_{-\infty}^\infty f(x) \delta'(x)\,dx = -f'(0)$?  What number or what kind of "infinity" could be assigned as the value of $\delta'(0)$ that would make that true?
A function $f$ in the conventional sense takes an input $x$ which is some number and returns an output $f(x)$ which is a number.  The "distributions" or "generalized functions" $\delta$ and $\delta'$ don't do that.
A: A distribution is also a function (mapping), but its "input" are also functions and not "numbers". This is what a distribution is in layman's terms. A precise definition would be rather complicated (basically the topology on the test functions is rather difficult to define).
To clarify: when people say that "$\delta$ is not a function", then they mean there is no function $\delta:\mathbf{R}\rightarrow\mathbf{R}$ such that $$\int_{-\infty}^\infty \delta(x)f(x)dx=f(0)$$
for all $f\in\mathcal{F}$ where $\mathcal{F}$ is a certain vector space of functions. By definition $\delta$ is the function $\delta:\mathcal{F}\rightarrow\mathbf{R}$ by $\delta(f)=f(0)$. So this "not is a function" relies on a more narrow interpretation of "function", i.e. that functions are those whose domain is (say) a set of real numbers.

Why the Laplace transform is a function and Fourier transform is a distribution? I mean, they are both infinite integrals. So what am I missing?

I think you mean that the Laplace transform of $1$ and the Fourier transform of $1$, right? Well the integral defining the Fourier transform of $1$ does not converge!
A: Disclaimer: In the following, “function” refers to the classical map from $(\mathbb{R})$ to $\mathbb{C}$. Many book authors do the same, and so presumably did yours.
A distribution in a more general concept than a function. Some distributions correspond to functions (although they are still different objects, if you look deep enough) so many authors just use the same notation for those, like $\sin x$. But there are many more distributions which behave like no function could.
(Most strikingly, they may not have values in points on the real axis. You must take $\delta(\omega)$ as nothing but a symbol with known properties: $\delta(0)$ can't be evaluated not only because it would not be finite or something but because there's no such thing as evaluating a $\delta$ in what is a singular point to start with.)
Your integral is a good example. You can indeed write an integral representation of the Fourier transform, and if you can successfully calculate the integral (plus some boring further assumptions), then the function you obtain can be thought of as the distribution that is the “real” result, in the sense of the first paragraph. But the Fourier transform is also well-defined in many cases where the integral would diverge.
It's more natural to define Fourier transform in terms of distributions, because it allows many tricks people would be doing anyway, and because restricting oneself to normal functions would mean losing or obscuring many interesting cases from real world use*) **). For Laplace transform you get a strong enough theory in functions alone, so there's no need to make things harder by imposing an unnecessarily general formalism that takes its own module to explain.
*) Also because it beautifully reflects many internal properties and symmetries the transform has.
**) You can also define Fourier transform on the subspace of functions known as $L^2$ (important for quantum mechanics, for example) and stay within that realm. It's a slightly different assumption resulting in a slightly different theory. For example, the constant $1$ is not a $L^2$ function and would not have any Fourier transform in that version.
