Courses
Courses for Kids
Free study material
Offline Centres
More
Store Icon
Store

Stirling's Formula

Reviewed by:
ffImage
hightlight icon
highlight icon
highlight icon
share icon
copy icon
SearchIcon

Stirling Approximation

Stirling formula or Stirling approximation, named after Scottish Mathematician James Stirling, is a formula used to find the approximate value of large factorials (written n!; eg; 3! = 3 x 2 x 1) that make use of Mathematical constant e (the base of the natural logarithm) and π.

The Stirling formula offers the easiest way to calculate the factorial n! especially for a large positive integer n which is a very tedious task to calculate.


Stirling Approximation Formula

The factorial function n! Is approximated by the formula:

n! ~ 2πn(ne)n

Furthermore, for any positive integer, we have the limits

2π nⁿ⁺ 12 e⁻ⁿ ≤  n!  ≤ nⁿ⁺ 12 e⁻ⁿ


Stirling Interpolation Formula 

Statement:

 If...x₋₂, x₋₁, x₀, x₁, x₂ are given as a set observation with a common difference n and let y₋₂, y₋₁, y₀, y₁, y₂ are their corresponding values where y = f(x) be the given function, then 

yₚ = yₒ + p (Δy0Δy12) + P22! Δ2y₋₁ + (p(p21)3! (Δ3y1+Δ3y22) p2(p21)4!) Δ4y₋₂   

Here, p = xx0h


Proof: 

Stirling interpolation formula will be obtained by taking the average of Gauss Forward difference formula and Gauss Backward difference formula.


Gauss Forward Difference Formula is Given as:

yₚ = yₒ + pΔyₒ + p(p1)2! Δ2y₋₁ + p(p+1)(p1)3! Δ3y₋₁ p(p1)(p+1)(p2)4! + Δ4y₋₂+ …..


Gauss Backward Difference Formula is Given as:

yₚ = yₒ + pΔy₋₁ + p(p1)2! Δ2y₋₁ + p(p+1)(p1)3! Δ3y₋₂ p(p1)(p+1)(p2)4! + Δ4y₋₂+ …..

Now, stirling formulas is given as 

Gauss Forward Difference Formula + Gauss Backward Difference Formula2

yₚ = yₒ + p

yₚ = yₒ + p (Δy0Δy12) + P22! Δ2y₋₁ + p(p21)3! (Δ3y1Δ3y22) p2(p21)4! Δ4y₋₂


Stirling Formula Example

1. Find the Factorial 11 Using the Stirling  Formula.


Solution:

Using the Stirling Formula  - 2π nⁿ⁺ 12 e⁻ⁿ 

We have:


11! = 2π 11¹¹⁺ 12 x e⁻¹¹ = 39615625.05

Therefore, the value of factorial 11 = 39615625.05


2. Calculate the Solution Using the Stirling Formula


x

f(x)

20

49225

25

48316

30

47236

35

45926

40

44306


x = 28


Solution:

The table for the values of x and y


x

20

25

30

35

40

y

49225

48316

47236

45926

44036


Stirling methods to determine the solution.

h = 25 - 20 = 5

Considering x₀ = 30 and p = xx0h = x305 

The difference table is given below:


x

p = x305

y

Δy

Δ²y

Δ³y

Δ⁴y

20

-2

49225








-909




25

-2

48316


-171






-1080


-59


30

0

47236


-230


-21




-1310


-80


35

1

45926


-310






-1620




40

2

44306






x = 28

p =  xx0h28305 = 0.4

y₀ = 47236, Δy₀ = -1310, Δ2y₋₁ = - 230  Δ3y₋₁ = - 80, Δ4y₋₁= - 21

Stirling formula is given as:

yₚ = yₒ + p (Δy0Δy12) + P22! Δ2y₋₁ + p(p21)3! (Δ3y1Δ3y22) p2(p21)4! Δ4y₋₂

y0.4 =  47236 + (-0.4) . (13101080)2 + (0.16)2 . (-230) + (0.4)(0.161)6 + (80+59)2 + (0.16)(0.161)24 . (-21)

y0.4 = 47236 + 478 - 18.4 - 3.892 + 0.1176

y0.4 = 47691.8256

Therefore, the solution of Stirling interpolation is 

y(28) = 47691.8256

FAQs on Stirling's Formula

1. When to Use the Stirling Interpolation Formula?

Stirling interpolation formula can be used when:

  • The value of p lies between - ½ and ½ 

  • Stirling formula can also be used outside this range , but the accuracy of the calculated value will be less.

  • It provides the best approximation for the range -¼ < q < ¼ 

2. What are the Pros and Cons of the Stirling Formula?

The main benefit of the Stirling formula is that it minimizes much quicker than other difference formulas hence considering the first few numbers of terms itself will be the better approximation whereas the disadvantage of the Stirling formula is that it will be applicable only when there is a uniform difference between any two consecutive x.

3. What Does Interpolation Mean?

Interpolation is the process of estimating unknown values that lie between the known values. The Stirling interpolation formula is used to determine the value of a function at an intermediate point within the range of a discrete set of known data points.