1. Introduction
1.1. The history
Stirling’s formula, which is an important approximated tool for factorials and was introduced by James Stirling, who is a famous Scottish mathematician. This approximation gives a high efficient way to estimate factorials n! The positive number of variables that make it a good fit (the factorial of a positive integer n) using logarithmic and exponential functions. Because of its precise approximation for large values of n, the formula is widely used in many mathematic fields like probability theory and statistics.
The original form of Stirling’s formula was introduced in Stirling’s1730 treatise Methodus Differentialis, which use a logarithmic estimate for n!
After that, this first result was improved to formula with higher- order correction terms, which makes a more accurate estimate for factorials
The addition of the
The appearance of Stirling’s approximation was closely related to two mathematical advances during the 18th century: logarithmic theory developments and the Gamma function introduction,which expand factorial operations to non-integer values. Euler played an important role by his investigations of the Gamma function, with Gauss later providing more accurate and precise mathematical foundations for these asymptotic expressions.
During the derivation process, Wallis's infinite product expression was used. Stirling's innovative method constructed a continuous form, revealing an unexpected relationship between discrete factorial operations and transcendental numbers. This relationship astonished the mathematicians of that time. This breakthrough demonstrated the significant characteristics of mathematics in the Enlightenment era, namely the profound connection between continuous analysis and discrete mathematics.
In the 19th and 20th centuries, the application scope of this formula expanded significantly, covering various fields such as information theory, computational complexity analysis, statistical mechanics (especially in Boltzmann's entropy formula), and so on. Even today, this formula remains an important tool in asymptotic analysis, focusing on improving the accuracy of error estimation and conducting more extensive expansions.
1.2. Overview
Stirling’s formula serves as an approximation approach for factorials when the numbers involved become large. Although de Moivre was the first person who introduced a similar idea, the formula is more commonly relating to Stirling.Instead of relying on precise calculations, this method offers a practical way to make approximation to factorials, which proves useful in areas such as combinatorics, statistical mechanics, and probability. In this paper, we not only explore the derivation of Stirling’s formula but also reveal the connection between Stirling’s formula and the Fourier transform.
2. Derivation
2.1. Background knowledge
2.1.1. Proof of integral convergence
The Gamma function is defined by the integral:bounded above:
If x> 0
Notice that
By comparison
STEP2
When t is large,
Precise: Maclaurin serves for
Pick n large enough : n ≥x + 1
Hence
2.1.2. Γ(x) characterization
Γ(x) is uniquely characterized by: for x > 0
(1) Γ(1) =1 (2) Γ(x + 1) = x Γ(x) (3) Γ(x) is log convex
2.1.3. Proof of γ(x)
Proof of (1):
Through the definition of the Gamma function, we have:
Since 1 −1 =0, this simplifies to:
Since
This is a standard integral, which evaluates to:
Thus, we conclude:
Γ(1)=1
Proof of (2):
Let x∈C with Re(x)> 0.The Gamma function is defined by:
Γ(x) =
We aim to prove the recurrence relation:
Γ(x + 1) = x Γ(x)
We begin by writing:
Γ(x + 1) =
Apply integration by parts. Let:
Then:
We now analyze the boundary word
As t→∞:
As
Therefore:
Thus:
Proof of (3)
The first step in establishing log-convexity is to calculate the derivatives of
[DiGamma and TriGamma Functions] The logarithmic derivative of the Gamma function which is known as the diGamma function ψ(x), and its derivative, the triGamma function ψ′(x), are given by:
Using the integral definition of Γ(x),we can express these derivatives as:
This gives us the following expressions:
The non-negativity of ψ′(x) follows from the Cauchy-Schwarz inequality. Consider the inner product space of measurable functions on (0,∞) with weight function
Letting f(t) = lnt , g(t) =1, the Cauchy-Schwarz inequality show:
Which translates to:
Dividing both sides by
ψ′(x)≥0
Since
2.2. Derivation of stirling’s formula
Rearrange and multiply by n
let
whereµ(x) is an error term and
We’d like f(x) to satisfy 2) and 3), because then it would have to be a multiple of Γ(x)! Let’s calculate:
Take in:
Let g(x) =RHS
To establish it is convex , we have to find an upper bound.
If
It means these series converge
So with this choice of µ(x), the function
So we want to prove the function
,where
is log convex. We have
We want to show that ln f(x) is convex.
Since the second derivative is 0, the total of the convex functions is convex (because the latter is defined by convexity).
1. –x is convex, as its second derivative is 0.
2. For
The second derivative is:
3.µ(x) is the sum of translates of g(x),so it is convex if g(x) is convex. Proof that g′′(x)>0 for x>0 Let
Using the product rule:
Compute the derivative:
Thus:
Differentiate g′(x):
The first term is:
For the second term,use the quotient rule:
Expand the numerator:
Thus:
Now combine the terms:
Simplify:
For all x> 0:
so:
Thus it is log convex
But this means Γ(x) must be a multiple of f(x):
so we have to compute α
By calculus.We find the maximum value at x = n by
Inflections points at
Because the shape of
So we change of variable
n! is equal to n!
2.3. Theorem (stirling’s formula)
For x>0:
2.4. Stirling’s approximation
When n is large:
3. Fourier transform
3.1. Fourier transform of xz−1e−x and relation to the Gamma function
3.1.1. Corrected derivation
There is no direct correlation between the function
Here is the revised derivation:
3.1.2. Fourier transform of f(x)
The single-sided Fourier transform of f(x) is:
3.1.3. Simplification
Combine the exponential terms:
3.1.4. Connection to the Gamma function
Recognize this as a Gamma function with a modified parameter:
3.1.5. Double integral interpretation
To directly write a double integral(if required),relate the Gamma function and Fourth Fourier Transform:
However, this is merely symbolic; the rigorous result is given by the closed-form expression
4. Derivation of the complex fourier series
The Fourier series’ complicated exponential form,
4.1. Trigonometric fourier series
A periodic function f(t) which has period T can be written in the form:
Where
4.2. Complex exponential conversion
Using the formula of Euler’s, which
4.3. Combining terms
Substitute the exponential forms in to the trigonometric series:
Combine coefficients into
The final complex Fourier series becomes:
With coefficients:
Assuming that the fundamental frequency is
(1)
Where the coefficients
(2)
4.3.1. Extension to non-periodic functions
In the case of non-periodic functions, we consider them as the limiting case of periodic functions with
(3)
Let
Using the period-frequency relationship
(3')
Rearranging constants and simplifying:
(4)
As
The discrete summation in Equation(4) transforms into a continuous Riemann integral:
(5)
Thus,
4.4. Gamma function and its fourier transform
4.4.1. Relationship between exponential frequency modulated signal and Gamma function
An exponential frequency modulated (FM) signal can be stated as follows:
Where the phase
The Fourier transform of an exponentially frequency modulated signal can be used in some circumstances to include integrals of the form:
Which can be expressed using the Gamma function. The Gamma function is defined as:
For
4.5. Fourier transform of the Gamma function
We test the integral in order to calculate its Fourier transform:
Combining the exponential terms:
4.6. Variable substitution
Using the substitution
4.6.1. Detailed substitution steps
Assume that
4.7. Asymptotic behavior for large z
For large z, Stirling’s approximation provides:
5. Application in signal processing
5.1. Power-law decay in signals
The Fourier transform
For instance,in viscoelastic materials,this describes stress relaxation with a memory kernel proportional to
5.1.1. Example1: polymer melts (natural rubber)
For polyisoprene rubber,stress relaxation under step strain follows:
5.1.2. Example2: automotive rubber dampers
Stress relaxation in car suspension components follows:
Where
5.1.3. Example3: chewing gum viscoelasticity
Experimental measurements show:
Matching the model when
5.2. Communication systems
In order to improve the anti-interference ability and integrity of the signal, EFM signals are adopted in wireless communication. According to [4], in mobile communications, frequency modulated signals improve spectral efficiency and may reduce the impact of multi-path fading.
5.3. Radar systems
Radar systems use RFW (RF) wave forms to enhance target detection and resolution. This paper discusses the application of frequency-modulated continuous wave (FMCW) radar through [5], which often uses exponentially chirped signals to achieve better range resolution and clutter suppression.
5.4. Biomedical signal processing
In biomedical engineering, EFM signals are applied in medical imaging and neural signal analysis. Study [6] explores the use of frequency-modulated signals in functional magnetic resonance imaging (fMRI) to improve brain activity mapping.
References
[1]. Bagley, R.L., & Torvik, P.J.(1983).Fractional calculus—a different approach to the analysis of viscoelastically damped structures.AIAA Journal, 21(5), 741-748.
[2]. Metzler, R., Schick, W., Kilian, H. G., & Nonnenmacher, T.F.(1994). Generalized viscoelastic models: Their fractional equations with solutions. The Journal of Chemical Physics, 103(16), 7180-7186.
[3]. Stankovic, J., & Pajic-Lijakovic, I.(2020).Chewing gum rheology: Power-lawrelaxationandtime-temperaturesuperposition.Food Hydrocolloids, 102, 105591.
[4]. J.G.Proakis and M.Salehi, Digital Communications, 5thed., McGraw-Hill, 2007.
[5]. M.I. Skolnik, Radar Handbook, 3rded., McGraw-Hill, 2008.
[6]. A.Metin and C.Glover, "Frequency Modulated fMRI Signal Analysis, "NeuroImage, vol.150, pp.120-135, 2017.
Cite this article
Ni,W.;Ye,R.;Yu,R. (2025). Stirling’s Formula: Derivation and Applications. Applied and Computational Engineering,174,46-60.
Data availability
The datasets used and/or analyzed during the current study will be available from the authors upon reasonable request.
Disclaimer/Publisher's Note
The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of EWA Publishing and/or the editor(s). EWA Publishing and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
About volume
Volume title: Proceedings of CONF-CDS 2025 Symposium: Data Visualization Methods for Evaluatio
© 2024 by the author(s). Licensee EWA Publishing, Oxford, UK. This article is an open access article distributed under the terms and
conditions of the Creative Commons Attribution (CC BY) license. Authors who
publish this series agree to the following terms:
1. Authors retain copyright and grant the series right of first publication with the work simultaneously licensed under a Creative Commons
Attribution License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this
series.
2. Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the series's published
version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial
publication in this series.
3. Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and
during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See
Open access policy for details).
References
[1]. Bagley, R.L., & Torvik, P.J.(1983).Fractional calculus—a different approach to the analysis of viscoelastically damped structures.AIAA Journal, 21(5), 741-748.
[2]. Metzler, R., Schick, W., Kilian, H. G., & Nonnenmacher, T.F.(1994). Generalized viscoelastic models: Their fractional equations with solutions. The Journal of Chemical Physics, 103(16), 7180-7186.
[3]. Stankovic, J., & Pajic-Lijakovic, I.(2020).Chewing gum rheology: Power-lawrelaxationandtime-temperaturesuperposition.Food Hydrocolloids, 102, 105591.
[4]. J.G.Proakis and M.Salehi, Digital Communications, 5thed., McGraw-Hill, 2007.
[5]. M.I. Skolnik, Radar Handbook, 3rded., McGraw-Hill, 2008.
[6]. A.Metin and C.Glover, "Frequency Modulated fMRI Signal Analysis, "NeuroImage, vol.150, pp.120-135, 2017.