# Moment generating function DNE

## Homework Statement

Write the integral that would define the mgf of the pdf,
$f(x) = \frac 1{\pi} \frac 1{1+x^2} dx$

The moment generating function (mgf) is $E e^{tX}[\itex]. ## The Attempt at a Solution My question really has to do with improper integrals. I must show the improper integral diverges: [itex]\int_0^{\infty} e^{tx} \frac 1{\pi} \frac 1{1+x^2} dx$.

Now if do integration by parts and let $u=e^{tx}$ and $dV = \frac 1{1+x^2}dx$, then I have:

$\frac 1{\pi} e^{tx} arctan(x) |_0^{\infty} - \int_0^{\infty} \frac 1{\pi} t arctan(x) e^{tx} dx$.

However I can see that $arctan(x) e^{tx} \frac 1{\pi} |_0^{\infty}$, will be ∞. So is this enough to show that the improper integral diverges?

jbunniii
Homework Helper
Gold Member
Now if do integration by parts and let $u=e^{tx}$ and $dV = \frac 1{1+x^2}dx$, then I have:

$\frac 1{\pi} e^{tx} arctan(x) |_0^{\infty} - \int_0^{\infty} \frac 1{\pi} t arctan(x) e^{tx} dx$.

However I can see that $arctan(x) e^{tx} \frac 1{\pi} |_0^{\infty}$, will be ∞. So is this enough to show that the improper integral diverges?
No, it's not enough unless you establish that the second integral (the one being subtracted) is not also ##\infty##. If it is, then you have an indeterminate form ##\infty - \infty## and more work is required to determine convergence.

By the way, if the moment generating function is ##E[e^{tX}]##, shouldn't you be integrating over all of ##\mathbb{R}## instead of ##[0,\infty)##? As you have written it, your integral does in fact converge for ##t \leq 0##. (Granted, in order for it to be of any use in generating moments, you need convergence on some open interval containing ##t=0##.)

I was thinking a comparison test would work, except that (I think) t can be any real number.

The support wasn't stated in the problem, so I just guessed. Looking back, I think the author meant this to be the Cauchy distribution, in which case the support is all reals.

jbunniii
Homework Helper
Gold Member
For positive ##t##, you can simply show (using L'Hospital's rule, for example) that
$$\lim_{x \rightarrow \infty}\frac{e^{tx}}{1 + x^2} = \infty$$
Similarly, for negative ##t##, show that
$$\lim_{x \rightarrow -\infty}\frac{e^{tx}}{1 + x^2} = \infty$$
These two facts imply that the integral does not converge for any nonzero ##t##. (Of course, it converges to 1 for ##t=0##.)

1 person
I maybe (figuratively) beating a dead horse here, but is it always the case that:

If a function fails to converge at a finite value as it approaches infinity, then the improper integral of said function from an arbritrary value to infinity must diverge

?

jbunniii
Homework Helper
Gold Member
I maybe (figuratively) beating a dead horse here, but is it always the case that:

If a function fails to converge at a finite value as it approaches infinity, then the improper integral of said function from an arbritrary value to infinity must diverge
No, that's not true. Consider the function defined as follows:
$$f(x) = \begin{cases} 1 & \text{if }n \leq x \leq n + 1/n^2 \text{ and }n \geq 1 \text{ is an integer}\\ 0 & \text{elsewhere} \\ \end{cases}$$
Then this function oscillates between 0 and 1 as ##x \rightarrow \infty##, so it doesn't converge to any value. But the intervals where the function value is 1 become narrower and narrower, and the integral does converge:
$$\int_0^\infty f(x) dx = \sum_{n=1}^{\infty}\frac{1}{n^2} = \frac{\pi^2}{6}$$
However, your function does something more severe: it diverges to ##\infty## as ##x \rightarrow \infty##. In this case it is true that the integral diverges to infinity. Proof: given any positive integer ##N##, there is some ##X > 0## such that ##f(x) \geq N## for all ##x \geq X## (definition of divergence to ##\infty##). Therefore, since the integrand is nonnegative, we have
$$\int_{0}^{\infty} f(x) dx \geq \int_{X}^{\infty} f(x) dx \geq \int_{X}^{\infty} N dx = N \cdot \infty = \infty$$

Last edited:
jbunniii
Homework Helper
Gold Member
Fixed some typos, sorry.

What is capital X above?

Note: the only "proofy" math I know is from a discrete math course I took.

jbunniii
Homework Helper
Gold Member
What is capital X above?

Note: the only "proofy" math I know is from a discrete math course I took.
OK, let me state the argument a bit more simply. We established that if ##t > 0##,
$$\lim_{x \rightarrow \infty}\frac{e^tx}{1+x^2} = \infty$$
by L'Hospital's rule. If the function goes to infinity, then it certainly must exceed 1 beyond some point (the exact value of the point depends on ##t##). In other words, if you draw a horizontal line at ##y=1##, then the function will eventually always stay above that line if ##x## is large enough. Therefore the area under the function is larger than the area under the line, which is infinite.

jbunniii
Homework Helper
Gold Member
Here is a picture which might help. In the picture, ##X## indicates the point beyond which the function stays above the line ##y=1##. So the area of the part of the function to the right of ##X## must be even larger than the area of the rectangle to the right of ##X##, which is infinite (height = 1, width = ##\infty##).

#### Attachments

• graph.png
6.4 KB · Views: 362
Homework Helper
Another way to see this: remember that
$$e^{tx} = \sum_{n=0}^\infty \frac{(tx)^n}{n!}$$

so the integral for your mgf is really
$$\frac 1 {\pi} \, \int_{-\infty}^{\infty} \sum_{n=0}^\infty \frac{t^n x^n}{1+x^2} \, dx$$

If the mgf existed then these integrals would all exist (since they are the moments)

$$\int_{-\infty}^{\infty} \frac{x^n}{1+x^2} \, dx \quad n \ge 0$$

but for $n \ge 1$ none of those integrals converge, therefore the mgf doesn't exist.

Summary: If an mgf exists then all integral moments exist. So, if some integral moment does not exist the mgf does not exist.

1 person