# Different ways of computing a limit (Part 2)

One of my colleagues placed the following problem on an exam for his Calculus II course…

$\displaystyle \lim_{x \to \infty} \frac{\sqrt{x^2+1}}{x}$

and was impressed by the variety of correct responses that he received. I thought it would be fun to discuss some of the different ways that this limit can be computed.

Method #2. Using L’Hopital’s Rule. The limit has the indeterminant form $\infty/\infty$, and so I can differentiate the top and the bottom with respect to $x$:

$\displaystyle \lim_{x \to \infty} \frac{\sqrt{x^2+1}}{x} = \displaystyle \lim_{x \to \infty} \frac{ \displaystyle \frac{d}{dx} \left( \sqrt{x^2+1} \right) }{\displaystyle \frac{d}{dx} \left( x \right)}$

$= \displaystyle \lim_{x \to \infty} \frac{ \displaystyle \frac{1}{2} \left( x^2+1 \right)^{-1/2} \cdot 2x }{1}$

$= \displaystyle \lim_{x \to \infty} \frac{x}{\sqrt{x^2+1}}$.

Oops… it looks like I just got the reciprocal of the original limit! Indeed, if I use L’Hopital’s Rule again, I’ll just return back to the original limit.

So that doesn’t look very helpful… except it is. If I define the value of this limit to be equal to $L$, then I’ve just shown that $L = 1/L$ (assuming that the limit exists in the first place, of course). That means that $L = 1$ or $L = -1$. Well, clearly the limit of this nonnegative function can’t be negative, and so we conclude that the limit is equal to $1$.

# How I Impressed My Wife: Part 6a

This series was inspired by a question that my wife asked me: calculate

$Q = \displaystyle \int_0^{2\pi} \frac{dx}{\cos^2 x + 2 a \sin x \cos x + (a^2 + b^2) \sin^2 x}$

Originally, I multiplied the top and bottom of the integrand by $\tan^2 x$ and performed a substitution. However, as I’ve discussed in this series, there are four different ways that this integral can be evaluated.
Starting with today’s post, I’ll begin a fifth method. I really like this integral, as it illustrates so many different techniques of integration as well as the trigonometric tricks necessary for computing some integrals.
Since $Q$ is independent of $a$, I can substitute any convenient value of $a$ that I want without changing the value of $Q$. As shown in previous posts, substituting $a =0$ yields the following simplification:

$Q = \displaystyle \int_0^{2\pi} \frac{dx}{\cos^2 x + 2 a \sin x \cos x + (a^2 + b^2) \sin^2 x}$

$= \displaystyle \int_{0}^{2\pi} \frac{dx}{\cos^2 x + 2 \cdot 0 \cdot \sin x \cos x + (0^2 + b^2) \sin^2 x}$

$= \displaystyle \int_{0}^{2\pi} \frac{dx}{\cos^2 x + b^2 \sin^2 x}$

$= \displaystyle \int_{-\pi}^{\pi} \frac{dx}{\cos^2 x + b^2 \sin^2 x}$

$= \displaystyle \int_{-\infty}^{\infty} \frac{ 2(1+u^2) du}{u^4 + (4 b^2 - 2) u^2 + 1}$

Earlier, I evaluated this last integral using partial fractions, separating into the cases $|b| = 1$, $|b| > 1$, and $|b| < 1$. Now, I’ll calculate this same integral using contour integration. (See Wikipedia and Mathworld for more details.)

It turns out that $Q$ can be rewritten as

$Q = \displaystyle \lim_{R \to \infty} \oint_{C_R} \frac{ 2(1+z^2) dz}{z^4 + (4 b^2 - 2) z^2 + 1}$,

where $C_R$ is the contour in the complex plane shown above (graphic courtesy of Mathworld). That’s because

$\displaystyle \lim_{R \to \infty} \oint_{C_R} \frac{ 2(1+z^2) dz}{z^4 + (4 b^2 - 2) z^2 + 1}$

$= \displaystyle \lim_{R \to \infty} \int_{-R}^R \frac{ 2(1+z^2) dz}{z^4 + (4 b^2 - 2) z^2 + 1} + \lim_{R \to \infty} \int_{\gamma_R} \frac{ 2(1+z^2) dz}{z^4 + (4 b^2 - 2) z^2 + 1}$

$= \displaystyle \int_{-\infty}^{\infty} \frac{ 2(1+z^2) dz}{z^4 + (4 b^2 - 2) z^2 + 1} + \lim_{R \to \infty} \int_{\gamma_R} \frac{ 2(1+z^2) du}{z^4 + (4 b^2 - 2) z^2 + 1}$

$= Q + \displaystyle \lim_{R \to \infty} \int_{\gamma_R} \frac{ 2(1+z^2) dz}{z^4 + (4 b^2 - 2) z^2 + 1}$

To show that the limit of the last integral is equal to 0, I use the parameterization $z = R e^{i \theta}$, so that $dz = i R e^{i \theta}$:

$\displaystyle \lim_{R \to \infty} \left| \int_{\gamma_R} \frac{ 2(1+z^2) dz}{z^4 + (4 b^2 - 2) z^2 + 1} \right|$

$= \displaystyle \lim_{R \to \infty} \left| \int_0^{\pi} \frac{ 2R(1+R^2 e^{2i\theta}) d\theta}{R^4 e^{4 i\theta} + (4 b^2 - 2) R^2 e^{2i\theta} + 1} \right|$

$\le \displaystyle \lim_{R \to \infty} \pi \max_{0 \le \theta \le \pi} \left| \frac{ 2R(1+R^2 e^{2i\theta})}{R^4 e^{4 i\theta} + (4 b^2 - 2) R^2 e^{2i\theta} + 1} \right|$

$= \displaystyle \pi \max_{0 \le \theta \le \pi} \lim_{R \to \infty} \left| \frac{ 2R(1+R^2 e^{2i\theta})}{R^4 e^{4 i\theta} + (4 b^2 - 2) R^2 e^{2i\theta} + 1} \right|$

$= \displaystyle \pi \max_{0 \le \theta \le \pi} 0$

$= 0$.

The above limit is equal to zero because the numerator grows like $R^3$ while the denominator grows like $R^4$. (This can be more laboriously established using L’Hopital’s rule).

Therefore, I have shown that

$Q = \displaystyle \lim_{R \to \infty} \oint_{C_R} \frac{ 2(1+z^2) dz}{z^4 + (4 b^2 - 2) z^2 + 1}$,

and this contour integral can be computed using residues.

I’ll continue with this fifth evaluation of the integral, starting with the case $|b| = 1$, in tomorrow’s post.

# How I Impressed My Wife: Part 4h

So far in this series, I have used three different techniques to show that

$Q = \displaystyle \int_0^{2\pi} \frac{dx}{\cos^2 x + 2 a \sin x \cos x + (a^2 + b^2) \sin^2 x} = \displaystyle \frac{2\pi}{|b|}$.

For the third technique, a key step in the calculation was showing that the residue of the function

$f(z) = \displaystyle \frac{1}{z^2 + 2\frac{S}{R}z + 1} = \displaystyle \frac{1}{(z-r_1)(z-r_2)}$

at the point

$r_1 = \displaystyle \frac{-S + \sqrt{S^2 -R^2}}{R}$

was equal to

$\displaystyle \frac{R}{ 2 \sqrt{S^2-R^2} }$.

Initially, I did this by explicitly computing the Laurent series expansion about $z = r_1$ and identifying the coefficient for the term $(z-r_1)^{-1}$.

In this post, I’d like to discuss another way that this residue could have been obtained.

Notice that the function $f(z)$ has the form $\displaystyle \frac{g(z)}{(z-r) h(z)}$, where $g$ and $h$ are differentiable functions so that $g(r) \ne 0$ and $h(r) \ne 0$. Therefore, we may rewrite this function using the Taylor series expansion of $\displaystyle \frac{g(z)}{h(z)}$ about $z = r$:

$f(z) = \displaystyle \frac{1}{z-r} \left[ \frac{g(z)}{h(z)} \right]$

$f(z) = \displaystyle \frac{1}{z-r} \left[ a_0 + a_1 (z-r) + a_2 (z-r)^2 + a_3 (z-r)^3 + \dots \right]$

$f(z) = \displaystyle \frac{a_0}{z-r} + a_1 + a_2 (z-r) + a_3 (z-r)^2 + \dots$

Clearly,

$\displaystyle \lim_{z \to r} (z-r) f(z) = \displaystyle \lim_{z \to r} \left[ a_0 + a_1 (z-r) + a_2 (z-r)^2 + a_3 (z-r)^3 + \dots \right] = a_0$

Therefore, the residue at $z = r$ can be found by evaluating the limit $\displaystyle \lim_{z \to r} (z-r) f(z)$. Notice that

$\displaystyle \lim_{z \to r} (z-r) f(z) = \displaystyle \lim_{z \to r} \frac{(z-r) g(z)}{(z-r) h(z)}$

$= \displaystyle \lim_{z \to r} \frac{(z-r) g(z)}{H(z)}$,

where $H(z) = (z-r) h(z)$ is the original denominator of $f(z)$. By L’Hopital’s rule,

$a_0 = \displaystyle \lim_{z \to r} \frac{(z-r) g(z)}{H(z)} = \displaystyle \lim_{z \to r} \frac{g(z) + (z-r) g'(z)}{H'(z)} = \displaystyle \frac{g(r)}{H'(r)}$.

For the function at hand, $g(z) \equiv 1$ and $H(z) = z^2 + 2\frac{S}{R}z + 1$, so that $H'(z) = 2z + 2\frac{S}{R}$. Therefore, the residue at $z = r_1$ is equal to

$\displaystyle \frac{1}{2r_1+2 \frac{S}{R}} = \displaystyle \frac{1}{2 \displaystyle \frac{-S + \sqrt{S^2 -R^2}}{R} + 2 \frac{S}{R}}$

$= \displaystyle \frac{1}{ ~ 2 \displaystyle \frac{\sqrt{S^2 -R^2}}{R} ~ }$

$= \displaystyle \frac{R}{2 \sqrt{S^2-R^2}}$,

matching the result found earlier.

# Different definitions of e (Part 10): Connecting the two definitions

In this series of posts, I consider how two different definitions of the number $e$ are related to each other. The number $e$ is usually introduced at two different places in the mathematics curriculum:

1. Algebra II/Precalculus: If $P$ dollars are invested at interest rate $r$ for $t$ years with continuous compound interest, then the amount of money after $t$ years is $A = Pe^{rt}$.
2. Calculus: The number $e$ is defined to be the number so that the area under the curve $y = 1/x$ from $x = 1$ to $x = e$ is equal to $1$, so that

$\displaystyle \int_1^e \frac{dx}{x} = 1$.

These two definitions appear to be very, very different. One deals with making money. The other deals with the area under a hyperbola. Amazingly, these two definitions are related to each other. In this series of posts, I’ll discuss the connection between the two.

In yesterday’s post, I proved the following theorem, thus completing a long train of argument that began with the second definition of $e$ and ending with a critical step in the derivation of the continuous compound interest formula. Today, I present an alternate proof of the theorem using L’Hopital’s rule.

Theorem. $\displaystyle \lim_{n \to \infty} P \left( 1 + \frac{r}{n} \right)^{nt} = P e^{rt}$.

Proof #2. Let’s write the left-hand side as

$L = \displaystyle \lim_{n \to \infty} P \left( 1 + \frac{r}{n} \right)^{nt}$.

Let’s take the natural logarithm of both sides:

$\ln L = \displaystyle \ln \left[ \lim_{n \to \infty} P \left( 1 + \frac{r}{n} \right)^{nt} \right]$

Since $g(x) = \ln x$ is continuous, we can interchange the function and the limit on the right-hand side:

$\ln L = \displaystyle \lim_{n \to \infty} \ln \left[ P \left( 1 + \frac{r}{n} \right)^{nt} \right]$

$\ln L = \displaystyle \lim_{n \to \infty} \left[ \ln P + \ln \left( 1 + \frac{r}{n} \right)^{nt} \right]$

$\ln L = \displaystyle \lim_{n \to \infty} \left[ \ln P + nt \ln \left( 1 + \frac{r}{n} \right)\right]$

$\ln L = \ln P + \displaystyle \lim_{n \to \infty} \frac{t \displaystyle \ln \left(1 + \frac{r}{n} \right)}{1/n}$

$\ln L = \ln P + \displaystyle t \lim_{n \to \infty} \frac{\displaystyle \ln \left(1 + \frac{r}{n} \right)}{1/n}$

The limit on the right-hand side follows the indeterminate form $0/0$, as so we may apply L’Hopital’s Rule. Taking the derivative of both the numerator and denominator with respect to $n$, we find

$\ln L = \ln P + \displaystyle t \lim_{n \to \infty} \frac{\displaystyle \frac{1}{1 + \frac{r}{n}} \cdot \frac{-r}{n^2}}{\displaystyle \frac{-1}{n^2}}$

$\ln L = \ln P + \displaystyle t \lim_{n \to \infty}\frac{r}{1 + \frac{r}{n}}$

$\ln L = \ln P + \displaystyle t \frac{r}{1 + 0}$

$\ln L = rt + \ln P$

We now solve for the original limit $L$:

$L = e^{rt + \ln P}$

$L = e^{rt} e^{\ln P}$

$L = Pe^{rt}$

# Different definitions of e (Part 8): Connecting the two definitions

In this series of posts, I consider how two different definitions of the number $e$ are related to each other. The number $e$ is usually introduced at two different places in the mathematics curriculum:

1. Algebra II/Precalculus: If $P$ dollars are invested at interest rate $r$ for $t$ years with continuous compound interest, then the amount of money after $t$ years is $A = Pe^{rt}$.
2. Calculus: The number $e$ is defined to be the number so that the area under the curve $y = 1/x$ from $x = 1$ to $x = e$ is equal to $1$, so that

$\displaystyle \int_1^e \frac{dx}{x} = 1$.

These two definitions appear to be very, very different. One deals with making money. The other deals with the area under a hyperbola. Amazingly, these two definitions are related to each other. In this series of posts, I’ll discuss the connection between the two.

In yesterday’s post, I proved the following theorem, thus completing a long train of argument that began with the second definition of $e$ and ending with a critical step in the derivation of the continuous compound interest formula. Today, I present an alternate proof of the theorem using L’Hopital’s rule.

Theorem. $\displaystyle \lim_{h \to 0} \left( 1 + h \right)^{1/h} = e$.

Proof #2. Let’s write the left-hand side as

$L = \displaystyle \lim_{h \to 0} \left( 1 + h \right)^{1/h}$.

Let’s take the natural logarithm of both sides:

$\ln L = \displaystyle \ln \left[ \lim_{h \to 0} \left( 1 + h \right)^{1/h} \right]$

Since $g(x) = \ln x$ is continuous, we can interchange the function and the limit on the right-hand side:

$\ln L = \displaystyle \lim_{h \to 0} \ln (1+h)^{1/h}$

$\ln L = \displaystyle \lim_{h \to 0} \frac{1}{h} \ln(1+h)$

$\ln L = \displaystyle \lim_{h \to 0} \frac{\ln(1+h)}{h}$

The right-hand side follows the indeterminate form $0/0$, as so we may apply L’Hopital’s Rule. Taking the derivative of both the numerator and denominator, we find

$\ln L = \displaystyle \lim_{h \to 0} \frac{ \displaystyle ~ \frac{1}{1+h} ~}{1}$

$\ln L = \displaystyle \lim_{h \to 0} \frac{1}{1+h}$

$\ln L = \displaystyle \frac{1}{1+0} = 1$.

Therefore, the original limit is $L = e^1 = e$.

# Why 0^0 is undefined

Here’s an explanation for why $0^0$ is undefined that should be within the grasp of pre-algebra students:

Part 1.

• What is $0^3$? Of course, it’s $0$.
• What is $0^2$? Again, $0$.
• What is $0^1$? Again, $0$.
• What is $0^{1/2}$, or $\sqrt{0}$? Again, $0$.
• What is $0^{1/3}$, or $\sqrt[3]{0}$? In other words, what number, when cubed, is $0$? Again, $0$.
• What is $0^{1/10}$, or $\sqrt[10]{0}$? In other words, what number, when raised to the 10th power, is $0$. Again, $0$.

So as the exponent gets closer to $0$, the answer remains $0$. So, from this perspective, it looks like $0^0$ ought to be equal to $0$.

Part 2.

• What is $3^0$. Of course, it’s $1$.
• What is $2^0$. Again, $1$.
• What is $1^0$. Again, $1$.
• What is $\left( \displaystyle \frac{1}{2} \right)^0$? Again, $1$
• What is $\left( \displaystyle \frac{1}{3} \right)^0$. Again, $1$
• What is $\left( \displaystyle \frac{1}{10} \right)^0$? Again, $1$

So as the base gets closer to $0$, the answer remains $1$. So, from this perspective, it looks like $0^0$ ought to be equal to $1$.

In conclusion: looking at it one way, $0^0$ should be defined to be $0$. From another perspective, $0^0$ should be defined to be $1$.

Of course, we can’t define a number to be two different things! So we’ll just say that $0^0$ is undefined — just like dividing by $0$ is undefined — rather than pretend that $0^0$ switches between two different values.

Here’s a more technical explanation about why $0^0$ is an indeterminate form, using calculus.

Part 1. As before,

$\displaystyle \lim_{x \to 0^+} 0^x = \lim_{x \to 0^+} 0 = 0$.

The first equality is true because, inside of the limit, $x$ is permitted to get close to $0$ but cannot actually equal $0$, and there’s no ambiguity about $0^x = 0$ if $x >0$. (Naturally, $0^x$ is undefined if $x < 0$.)

The second equality is true because the limit of a constant is the constant.

Part 2. As before,

$\displaystyle \lim_{x \to 0} x^0 = \lim_{x \to 0} 1 = 1$.

Once again, the first equality is true because, inside of the limit, $x$ is permitted to get close to $0$ but cannot actually equal $0$, and there’s no ambiguity about $x^0 = 1$ if $x \ne 0$.

As before, the answers from Parts 1 and 2 are different. But wait, there’s more…

Part 3. Here’s another way that $0^0$ can be considered, just to give us a headache. Let’s evaluate

$\displaystyle \lim_{x \to 0^+} x^{1/\ln x}$

Clearly, the base tends to $0$ as $x \to 0$. Also, $\ln x \to \infty$ as $x \to 0^+$, so that $\displaystyle \frac{1}{\ln x} \to 0$ as $x \to 0^+$. In other words, this limit has the indeterminate form $0^0$.

To evaluate this limit, let’s take a logarithm under the limit:

$\displaystyle \lim_{x \to 0^+} \ln x^{1/\ln x} = \displaystyle \lim_{x \to 0^+} \frac{1}{\ln x} \cdot \ln x$

$\displaystyle \lim_{x \to 0^+} \ln x^{1/\ln x} = \displaystyle \lim_{x \to 0^+} 1$

$\displaystyle \lim_{x \to 0^+} \ln x^{1/\ln x} = 1$

Therefore, without the extra logarithm,

$\displaystyle \lim_{x \to 0^+} x^{1/\ln x} = e^1 = e$

Part 4. It gets even better. Let $k$ be any positive real number. By the same logic as above,

$\displaystyle \lim_{x \to 0^+} x^{\ln k/\ln x} = e^{\ln k} = k$

So, for any $k \ge 0$, we can find a function $f(x)$ of the indeterminate form $0^0$ so that $\displaystyle f(x) = k$.

In other words, we could justify defining $0^0$ to be any nonnegative number. Clearly, it’s better instead to simply say that $0^0$ is undefined.

P.S. I don’t know if it’s possible to have an indeterminate form of $0^0$ where the answer is either negative or infinite. I tend to doubt it, but I’m not sure.

# A surprising appearance of e

Here’s a simple probability problem that should be accessible to high school students who have learned the Multiplication Rule:

Suppose that you play the lottery every day for about 20 years. Each time you play, the chance that you win is $1$ chance in $1000$. What is the probability that, after playingÂ  $1000$ times, you never win?

This is a straightforward application of the Multiplication Rule from probability. The chance of not winning on any one play is $0.999$. Therefore, the chance of not winning $1000$ consecutive times is $(0.999)^{1000}$, which we can approximate with a calculator.

Well, that was easy enough. Now, just for the fun of it, let’s find the reciprocal of this answer.

Hmmm. Two point seven one. Where have I seen that before? Hmmm… Nah, it couldn’t be that.

What if we changed the number $1000$ in the above problem to $1,000,000$? Then the probability would be $(0.999999)^{1000000}$.

There’s no denying it now… it looks like the reciprocal is approximately $e$, so that the probability of never winning for both problems is approximately $1/e$.

The above calculations are numerical examples that demonstrate the limit

$\displaystyle \lim_{n \to \infty} \left(1 + \frac{x}{n}\right)^n = e^x$

In particular, for the special case when $n = -1$, we find

$\displaystyle \lim_{n \to \infty} \left(1 - \frac{1}{n}\right)^n = e^{-1} = \displaystyle \frac{1}{e}$

The first limit can be proved using L’Hopital’s Rule. By continuity of the function $f(x) = \ln x$, we have

$\ln \left[ \displaystyle \lim_{n \to \infty} \left(1 + \frac{x}{n}\right)^n \right] = \displaystyle \lim_{n \to \infty} \ln \left[ \left(1 + \frac{x}{n}\right)^n \right]$

$\ln \left[ \displaystyle \lim_{n \to \infty} \left(1 + \frac{x}{n}\right)^n \right] = \displaystyle \lim_{n \to \infty} n \ln \left(1 + \frac{x}{n}\right)$

$\ln \left[ \displaystyle \lim_{n \to \infty} \left(1 + \frac{x}{n}\right)^n \right] = \displaystyle \lim_{n \to \infty} \frac{ \displaystyle \ln \left(1 + \frac{x}{n}\right)}{\displaystyle \frac{1}{n}}$

The right-hand side has the form $\infty/\infty$ as $n \to \infty$, and so we may use L’Hopital’s rule, differentiating both the numerator and the denominator with respect to $n$.

$\ln \left[ \displaystyle \lim_{n \to \infty} \left(1 + \frac{x}{n}\right)^n \right] = \displaystyle \lim_{n \to \infty} \frac{ \displaystyle \frac{1}{1 + \frac{x}{n}} \cdot \frac{-x}{n^2} }{\displaystyle \frac{-1}{n^2}}$

$\ln \left[ \displaystyle \lim_{n \to \infty} \left(1 + \frac{x}{n}\right)^n \right] = \displaystyle \lim_{n \to \infty} \displaystyle \frac{x}{1 + \frac{x}{n}}$

$\ln \left[ \displaystyle \lim_{n \to \infty} \left(1 + \frac{x}{n}\right)^n \right] = \displaystyle \frac{x}{1 + 0}$

$\ln \left[ \displaystyle \lim_{n \to \infty} \left(1 + \frac{x}{n}\right)^n \right] = x$

Applying the exponential function to both sides, we conclude that

$\displaystyle \lim_{n \to \infty} \left(1 + \frac{x}{n}\right)^n= e^x$

In an undergraduate probability class, the problem can be viewed as a special case of a Poisson distribution approximating a binomial distribution if there’s a large number of trials and a small probability of success.

The above calculation also justifies (in Algebra II and Precalculus) how the formula for continuous compound interest $A = Pe^{rt}$ can be derived from the formula for discrete compound interest $A = P \displaystyle \left( 1 + \frac{r}{n} \right)^{nt}$

All this to say, Euler knew what he was doing when he decided that $e$ was so important that it deserved to be named.