Finding the value of for is equivalent to seeking a positive number whose square yields : . In other words, the solution to .
We can find by solving . It is by mere inspection. can also be obtained by solving , again, by mere inspection. But ‘mere inspection’ can only go so far. For Example, what is ?
Method for finding the square root of a positive real number date back to the acient Greek and Babylonian eras. Heron’s algorithm, also known as the Babylonian method, is an algorithm named after the – century Greek mathematician Hero of Alexandria, It proceeds as follows:
Begin with an arbitrary positive starting value .
Let be the average of and
Repeat step 2 until the desired accuracy is achieved.
This post offers an analysis of Heron’s algorithm. Our aim is a better understanding of the algorithm through mathematics.
Let us begin by arbitrarily choosing a number . If , then is , and we have guessed the exact value of the square root. Otherwise, we are in one of the following cases:
Both cases indicate that lies somewhere between and .
Let us define as the relative error of approximating by :
The closer is to , the better is as an approximation of .
Let be the mid-point of and :
and, the relative error of approximating ,
i.e., lies between and .
We can generate more values in stages by
Consequently, we can prove that
Assume when ,
Since (11) implies
(10) and (13) together implies
It follows that
(15) indicates that the error is cut at least in half at each stage after the first.
Therefore, we will reach a stage that
It can be shown that
Assume when k = p,
From (17) and (18), we see that eventually, the error decreases at an exponential rate.
Illustrated below is a script that implements the Heron’s Algorithm:
a - the positive number whose square root we are seeking
x0 - the initial guess
eps - the desired accuracy
square_root(a, x0, eps) := block(
if abs(xk^2-a) < eps then return(xk),
Suppose we want to find and start with . Fig. 2 shows the Heron’s algorithm in action.
The stages of a two stage rocket have initial masses and respectively and carry a payload of mass . Both stages have equal structure factors and equal relative exhaust speeds. If the rocket mass, , is fixed, show that the condition for maximal final speed is
Find the optimal ratio when .
According to multi-stage rocket’s flight equation (see “Viva Rocketry! Part 2“), the final speed of a two stage rocket is
Let , we have
Differentiate with respect to gives
It follows that implies
That is, . i.e.,
It is the condition for an extreme value of . Specifically, the condition to attain a maximum (see Exercise-2)
When , solving
yields two pairs:
Only (3) is valid (see Exercise-1)
The entire process is captured in Fig. 2.
Exercise-1 Given , prove:
Exercise-2 From (1), prove the extreme value attained under (2) is a maximum.
The above optimization problem is solved using calculus (see “Viva Rocketry! Part 2“). However, there is an alternative that requires only high school mathematics with the help of a Computer Algebra System (CAS). This non-calculus approach places more emphasis on problem solving through mathematical thinking, as all symbolic calculations are carried out by the CAS (e.g., see Fig. 2). It also makes a range of interesting problems readily tackled with minimum mathematical prerequisites.
The fact that
is a monotonic increasing function
(1) can be written as
for gives if .
Hence, (1) is a quadratic equation. For it to have solution, its discriminant must be nonnegative, i.e.,
If , (3) is a quadratic equation.
Solving (3) yields two solutions
and, the solution to (2) is
We prove that (4) is true by showing (5) is false:
It can be written as
Since (see Exercise 1) and,
solve (7) for yields
It follows that for .
Consequently, is a negative quantity. i.e.,
which tells that (5) is false.
Hence, when , the global maximum is .
Solving for :
attains maximum at .
In fact, attains maxima at even when , as shown below:
Solving for , we have
Only is valid (see Exercise-2),
Solve quadratic equation for yields
The coefficient of in is , a negative quantity (see Exercise-3).
The implication is that is a negative quantity when .