Showing posts with label limits. Show all posts
Showing posts with label limits. Show all posts

Wednesday, 21 January 2026

An Interesting Limit

Here is a report generated by Gemini Pro based on the content of this video. I found the video moved a little too quickly at times and the author read out every mathematical expression symbol by symbol which wasn't really necessary and it didn't aid comprehension. It's useful to be able to take the content of the video and put into a report that can be read at your leisure. If you want to tweak the LaTeX code, you can do so easily and I've done that below for a few of expressions.

The Limit of the nth Root: An Exploration of Euler's Sequence

At first glance, the limit of the sequence involving factorials and powers can seem intuitive, but as with many problems in analysis, the "obvious" answer can be misleading. This report dismantles the problem of finding the limit of the nth root of n factorial divided by n to the power of n. Following the path likely walked by Leonhard Euler, we move from discrete sequences to continuous calculus to find a beautiful truth connecting factorials, limits, and Euler’s number, e.

1. The Sequence and Intuition

We begin by defining our sequence \( a_n \):

$$ a_n = \frac{n!}{n^n} $$

Intuitively, the denominator \( n^n \) grows much faster than the numerator \( n! \), suggesting that the terms drop toward zero. To prove this rigorously, we employ the Ratio Test. We investigate the ratio of consecutive terms:

$$ \frac{a_{n+1}}{a_n} = \frac{(n+1)!}{(n+1)^{n+1}} \cdot \frac{n^n}{n!} $$

Simplifying the factorials (\( (n+1)! = (n+1)n! \)) and regrouping terms gives:

$$ \frac{a_{n+1}}{a_n} = \frac{(n+1) \cdot n^n}{(n+1)^{n+1}} = \frac{n^n}{(n+1)^n} = \left( \frac{n}{n+1} \right)^n $$

This expression can be rewritten to reveal a fundamental definition of Euler's number:

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

Since \( \dfrac{1}{e} \approx 0.3679 \) is strictly less than 1, the Ratio Test confirms that the sequence converges to 0.

2. The Main Problem: The nth Root

Establishing that the base sequence goes to 0 is just the preamble. The true challenge is finding the limit of the nth root of this sequence:

$$ L = \lim_{n \to \infty} \sqrt[n]{a_n} = \lim_{n \to \infty} \left( \frac{n!}{n^n} \right)^{\frac{1}{n}} $$

Since the base approaches 0 and the exponent \( \frac{1}{n} \) also approaches 0, we are facing the indeterminate form \( 0^0 \). To resolve this, we use the natural logarithm to transform the product into a sum, bridging the gap between discrete algebra and integral calculus.

3. From Logarithms to Riemann Sums

Let \( y = \sqrt[ \uproot{4} n]{a_n} \). Taking the natural log of the limit allows us to work with sums:

$$ \ln(L) = \lim_{n \to \infty} \ln \left( \left( \frac{n!}{n^n} \right)^{\frac{1}{n}} \right) = \lim_{n \to \infty} \frac{1}{n} \ln \left( \frac{n!}{n^n} \right) $$

Using logarithm rules, we expand the term inside:

$$ \ln \left( \frac{n!}{n^n} \right) = \ln(n!) - \ln(n^n) = \sum_{k=1}^{n} \ln(k) - n \ln(n) $$

We can cleverly rewrite \( n \ln(n) \) as a sum of \( n \) identical terms: \( \displaystyle \sum_{k=1}^{n} \ln(n) \). Substituting this back into our limit equation gives:

$$ \ln(L) = \lim_{n \to \infty} \frac{1}{n} \left( \sum_{k=1}^{n} \ln(k) - \sum_{k=1}^{n} \ln(n) \right) = \lim_{n \to \infty} \frac{1}{n} \sum_{k=1}^{n} \left( \ln(k) - \ln(n) \right) $$

Combining the logs, we arrive at a recognizable form:

$$ \ln(L) = \lim_{n \to \infty} \frac{1}{n} \sum_{k=1}^{n} \ln \left( \frac{k}{n} \right) $$

This structure—a sum of function values multiplied by a small width \( \frac{1}{n} \) is precisely the definition of a Riemann Sum on the interval \([0, 1]\). As \( n \to \infty \), the sum converges to a definite integral:


$$ \ln(L) = \int_{0}^{1} \ln(x) \, dx $$

4. Evaluating the Integral

We now evaluate the improper integral of \( \ln(x) \) from 0 to 1. Using integration by parts (where \( u = \ln(x) \) and \( dv = dx \)), we get:

$$ \int \ln(x) \, dx = x \ln(x) - x $$

We evaluate the definite integral by taking the limit as the lower bound approaches 0:

$$ \Bigl[ x \ln(x) - x \Bigr]_0^1 = (1 \ln(1) - 1) - \lim_{a \to 0^+} (a \ln(a) - a) $$

We know \( \ln(1) = 0 \), so the first term is \( -1 \). For the limit \( \lim_{a \to 0^+} a \ln(a) \), we use L'Hôpital's rule, which shows that this term vanishes to 0. Thus:

$$ \ln(L) = -1 - 0 = -1 $$

Conclusion

We have found that the natural logarithm of the limit is \( -1 \). To find the original limit \( L \), we simply exponentiate both sides:

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

We have proven that while the sequence \( \dfrac{n!}{n^n} \) collapses to zero, its geometric mean—the nth root—stabilizes at exactly 1 over e. This problem serves as an elegant bridge connecting basic sequence properties, the definition of e, and the power of integral calculus.

Friday, 30 April 2021

Odd Deficient Numbers

I've written about deficient numbers in an eponymous post on January 28th 2018 and in which I mentioned, for the first time in my postings, the ratio between the sum of the divisors of a number and the number itself viz. \( \displaystyle \frac{\sigma_1(n)}{n} \).

In that post, I didn't refer to the ratio by its name of abundancy but in later posts I explored the concept of abundancy in more detail. Here are links to posts in which it was discussed:

The last two posts, as can be noted, are relatively recent. Today, in turning 26325 days old, I encountered a reference to abundancy once again. Specifically in the context of OEIS A188597:


 A188597

Odd deficient numbers whose abundancy is closer to 2 than any smaller odd deficient number.


My diurnal age is a member of this sequence which runs:
1, 3, 9, 15, 45, 105, 315, 1155, 26325, 33705, 449295, 1805475, 10240425, 13800465, 16029405, 16286445, 21003885, 32062485, 132701205, 594397485, 815634435, 29169504045, 40833636525, 295612416135, 636988686495, 660733931655, 724387847085, 740099543085, 1707894294975, 4439852974095, 7454198513685

 Figure 1 shows the progression:


Figure 1

Not surprisingly, all these numbers are highly composite, despite all being deficient. This can be seen in Figure 2 where a table of factorisation and number of divisors is presented.


Figure 2

There are a number of related sequences, one of them is OEIS A171929. 


 A171929

Odd numbers whose abundancy is closer to 2 than any smaller odd number.


Here the numbers need only to odd and can be abundant or deficient. Figure 3 shows the abundancy and its absolute difference from 2.


Figure 3

Another related sequence is OEIS A188263:


 A188263



Odd abundant numbers whose abundancy is closer to 2 than any smaller odd abundant number.

 
In this sequence, all the numbers are abundant and thus their abundancy is greater than 2. Figure 4 shows a table of the initial numbers and their abundancies.


Figure 4

It's interesting to consider the idea that the limit of the abundancy of these sorts of odd abundant and odd deficient numbers is actually 2 as their abundancy can be as close to 2 as desired. 

Tuesday, 30 March 2021

Analysis of an Interesting Graph

In my last post I evaluated the integral of the function:$$y= \frac{\sin(\ln x)}{\ln x}$$ between 0 and 1 and arrived at a value of \( \frac{\pi}{4} \) using Feyman's technique. In this post, I want to look at the function more closely in terms of its turning points and intercepts on the \(x\) axis. Figure 1 shows the behaviour of the graph in the region between 0 and 1.



Figure 1: created using GeoGebra

Clearly there is a small negative area that will reduce the largely positive area slightly but the figure of \( \frac{\pi}{4} \approx \) 0.785398163397448 looks pretty right. Clearly, the graph cuts the \(x\) axis around 0.4 but what about further out along the \(x\) axis? Figure 2 shows the graph of the function in the range from 0 to 100:


Figure 2: created using Wolfram Alpha

Figure 3 shows a slightly different view. 


Figure 3: created using Wolfram Alpha

Let's look at the graph in the range from 0 to 1000. Figure 4 shows this:

Figure 4: created using Wolfram Alpha

To see what's going on with these intercepts on the \(x\) axis we just need to set the function equal to zero. Let's do this and solve the resulting equation:$$
\begin{align} \frac{\sin(\ln x)}{\ln x}&=0\\
\implies \sin(\ln x)&=0 \text{ provided that } \ln x \neq 0\\
\implies \ln x &=n\pi \text{ where }n \in \mathbb{Z} \text{ and } n \neq 0\\
\therefore x&=e^{\ \pi \ n} \text{ with } n \neq 0
\end{align}$$Thus we begin to see what's going on:
  • The intercept in Figure 1 corresponds to \(n=-1\) and \(e^{-\pi} \approx 0.04 \)
  • The intercept in Figure 2 corresponds to \(n=1\) and \(e^{\pi} \approx 23.14 \)
  • The intercept in Figure 4 corresponds to \(n=2\) and \(e^{2\pi} \approx 535.49 \)
Clearly as \(n\) grows larger, the values of \(e^{\ \pi \ n}\) become very large and the intercepts more and more spread out along the number line. Similarly as -\(n\) grows larger negatively, the values of \(e^{\ -\pi \ n}\) become very small and the intercepts closer and closer together.

What about the turning points of the graph? To explore this we need to find the first derivative of the function. We find:$$
\begin{align}
\frac{d}{dx} \left (\frac{\sin(\ln x)}{\ln x} \right )&=\frac{\ln x \cos(\ln x)-\sin(\ln x)}{x \ln^2 x}\\
\implies \ln x \cos(\ln x)-\sin(\ln x)&=0 \text{ provided } x \ln^2 x \neq 0
\end{align}$$A partial solution to this is offered by Wolfram Alpha but the computation times out so only three solutions are shown. See Figure 5:


Figure 5: from Wolfram Alpha

From these results we can see the local minimum of \(x \approx 0.01\) in Figure 1 and the local maximum of x=1 in Figure 3. Some further results can be obtained from Wolfram Alpha simply by asking for turning points. These are shown in Figure 6.


Figure 6: from Wolfram Alpha

These results are most interesting because we can see a maximum value of around 0.049 when \(x=0\) but a minimum value of around -0.058 when \(x=0\)! Clearly, the function should be undefined at \(x=0\) even though a limit of 0 seems to exist. The issue of the limit is an interesting one which I may take up in a subsequent post but for the time being that's probably enough for the graph.

Tuesday, 16 June 2020

Solving Linear Recurrences

This article follows on from my previous post of June 10th 2020 titled Fibonacci-like Sequences. I owe a debt of gratitude to Niloufar Shafiei who has posted an excellent PDF about solving linear recurrence relations. He treats both linear homogeneous recurrences and linear non-homogeneous recurrences but it is only the former that I'll concern myself with in this post.

With a linear recurrence, each term of a sequence is a linear function of earlier
terms in the sequence. An example would be:$$a_n=a_{n-1}+a_{n-2}+1$$However, this is not homogenous, because the last term, 1, does not involve an earlier term of the sequence. An example of a linear homogenous recurrence would be:$$a_n=a_{n-1}+2a_{n-2} \text{ with }a_0=1 \text{ and }a_1=5$$This corresponds to the quadratic:$$x^2=x+2 \text{ so that }x^2-x-2 = (x-2)(x+1)$$This equals 0 when \(x=2\) or \(x=-1\).

The PDF referred to earlier shows that the \(n\)-th term can be written in a form that is a linear combination of the two solutions:$$ \alpha_1(2^n)+\alpha_2(-1)^n \text{ where } \alpha_1 \text{ and } \alpha_2 \text{ are constants to be determined}$$The values of \(\alpha_1 \text{ and } \alpha_2 \) can be determined from the initial conditions. When we substitute for \(n=0\) and \(n=1\), this means that:$$\alpha_1+\alpha_2=1 \text{ and } 2 \alpha_1-\alpha_2=5$$Solving this pair of equations, we find \( \alpha_1=2\) and \( \alpha_2=-1\) and thus \(a_n\) can be written as:$$a_n=2^{n+1}-(-1)^n \text{ for } n \ge 0$$The dominant term of course is \(2^n\) and so:$$\lim_{n -> \infty}\frac{a_{n+1}}{a_n}=2$$The first ten terms of this sequence are (SageMathCell permalink):

1, 5, 7, 17, 31, 65, 127, 257, 511, 1025, 2047, 4097

If the quadratic associated with the recurrence relation has a repeated root, then a slightly different approach is required. For example, let's consider the recurrence:$$a_n=6a_{n-1}-9a_{n-2} \text{ with } a_0=1 \text{ and } a_1=9$$The quadratic that arises is:$$x^2=6x-9 \text{ or } x^2-6x+9=(x-3)^2$$The repeated root here is \(x=3\) and Niloufar Shafiei in his PDF shows that in this case, the solution is:$$\alpha_1(3)^n+\alpha_2 n(3)^n \text{ or } 3^n(\alpha_1+\alpha_2n)$$Again, we get two equation in two unknowns and in this case, after applying the initial conditions, the solution is \(\alpha_1=1\) and \(\alpha_2=2\). Thus \(a_n\) can be written as:$$a_n=3^n(1+2n) \text{ for } n \ge 0$$The dominant term is \(3^n\) and so:$$\lim_{n -> \infty}\frac{a_{n+1}}{a_n}=3$$The first ten elements of the sequence are (SageMathCell permalink):

1, 9, 45, 189, 729, 2673, 9477, 32805, 111537, 373977, 1240029, 4074381

So this is the essential idea. Niloufar Shafiei in his PDF has plenty more examples that are easy to understand and well-presented. There is a lot more to delve into regarding recurrence equations and I'm sure I'll be writing more about them in the future.

Tuesday, 30 August 2016

Unusual Function

While investigating the problem of finding the ratio between radius and height that provides the minimum surface area for a fixed volume, I made a mistake and ended up with what turned out to be an usual function. Stripped of such extraneous constants, this is the function that I discovered:
The unusual behaviour that it has is that it is discontinuous and undefined at x=0 and yet it has limits of 1 and -1 respectively as x --> 0 from the positive and negative directions. Here is what WolframAlpha turned up:

Furthermore, my mobile version of WolframAlpha shows the step-by-step solutions to the derivation of the limit:

So there we have it and I obviously have to brush up on l'Hôpital's rule which I certainly remember from the old days but the details completely elude me now.