You may also like

problem icon

Ball Bearings

If a is the radius of the axle, b the radius of each ball-bearing, and c the radius of the hub, why does the number of ball bearings n determine the ratio c/a? Find a formula for c/a in terms of n.

problem icon

Air Routes

Find the distance of the shortest air route at an altitude of 6000 metres between London and Cape Town given the latitudes and longitudes. A simple application of scalar products of vectors.

problem icon

Epidemic Modelling

Use the computer to model an epidemic. Try out public health policies to control the spread of the epidemic, to minimise the number of sick days and deaths.

Stirling Work

Stage: 5 Challenge Level: Challenge Level:2 Challenge Level:2

You are going to use a computer to work out the values of $\sqrt{n}$, $n^n$ and $e^{-n}$ for a few values of the whole number $n$.

Before you start, can you estimate values of $n$ beyond which each function is larger than $100$, $1\,000\, 000$ or $1\,000\, 000\,000\, 000$? It would be great if you could specify as tight a range as possible between which you know these values will be exceeded.

Try them out on a computer. How close were you?

Excel can cope with numbers up to about $10^{308}$ (to a precision of 16 places) What values of $n$ do you think will cause Excel to break down for each function. Were you correct?

For large n, the factorial function can be approximated very well with an expression of the following form:

$$n! \sim A n^{\pm n\pm 0.5} e^{\pm n}$$

Your challenge is to experiment using a calculator or spreadsheet to find the constant $A$ and whether or not each $\pm$ is $+$ or $-$

Warning: You will need to think about this task, as although the approximation gives a smaller and smaller percentage error as $n$ increases, the absolute error increases as $n$ increases!

When you find the correct form of the formula, can you numerically calculate some large factorials to 8 significant figures? How large a factorial will you be able to calculate?

You can now use this formula algebraically to perform calculations beyond the limit of the computer. For example, you can estimate the chance of getting $500$ heads if you toss a coin $1000$ times or (equivalently) the number of ways of choosing $500$ people from a group of $1000$ people.