Rosenbrock’s Banana Function
In mathematical optimization, Rosenbrock’s Banana Function is a non-convex function used as a test problem for optimization algorithms.
This function is often used to test performance of optimization algorithms. The global minimum is inside a long, narrow, parabolic shaped flat valley. To find the valley is trivial, however to converge to the global minimum is difficult.
It is defined by
f(x, y) = (1 – x)^2 + 100(y – x^2)^2
It has a global minimum at (x, y) = (1, 1) where f(x, y) = 0. A different coefficient of the second term is sometimes given, but this does not affect the position of the global minimum.
Rosenbrock 's Banana Function
Prandtl-Glauert Singularity
![]()
The Prandtl-Glauert singularity (sometimes referred to as a “vapor cone”), is the point at which a sudden drop in air pressure occurs, and is generally accepted as the cause of the visible condensation cloud that often surrounds an aircraft traveling at transonic speeds, though there remains some debate. It is an example of a mathematical singularity in aerodynamics. One view of this phenomenon is that it exhibits the effect of compressibility and the so-called “N-wave”. The N-wave is the time variant pressure profile seen by a static observer when a sonic compression wave passes. The overall three-dimensional shock wave is in the form of a cone with its apex at the supersonic aircraft. This wave follows the aircraft. The pressure profile of the wave is composed of a leading compression component (the initial upward stroke of the “N”), followed by a pressure descent forming a rarefaction of the air (the downward diagonal of the “N”), followed by a return to the normal ambient pressure (the final upward stroke of the “N”). The rarefaction may be thought of as the “rebounding” of the compression due to inertial effects.
Prandtl-Glauert singularity – Wikipedia, the free encyclopedia
EKG Sequence
I overheard two nerds in the computer lab talking about a recent contest to generate the first N terms of this function in the shortest time possible.

The EKG sequence is the integer sequence having 1 as its first term, 2 as its second, and with each succeeding term being the smallest number not already used that shares a factor with the preceding term. This results in the sequence 1, 2, 4, 6, 3, 9, 12, 8, 10, 5, 15, … (Sloane’s A064413). When plotted as a connect-the-dots plot (left figure), the sequence looks somewhat like an electrocardiogram (abbreviated “EKG” in medical circles), so this sequence became known as the EKG sequence. Lagarias et al. have computed the first 10 million terms of the sequence. Every term appears exactly once in this sequence, and the primes occur in increasing order.
code computer-science linux mathematics open source original-content
by Layne
3 comments
Integer Square-root Function
While browsing the Linux kernel source this morning at work, I stumbled upon this little gem. As you may already know, kernel code can’t use any floating-point calculations, since the state of the Floating Point Unit (FPU) isn’t saved during context switches to kernel-space. This function computes the integer square root of the provided integer. It returns the largest integer less than or equal to the true square root of the input number. Code and sample output provided after the break.
more »
Matlab Upazila

Matlab is an Upazila of Chandpur District in the Division of Chittagong, Bangladesh.
Matlab is located at 23.3500° N 90.7083° E . It has 76,266 registered housing units and a total land area 409.22 km².
Matlab Upazila – Wikipedia, the free encyclopedia
Erdős Number
The Erdős number, honoring the late Hungarian mathematician Paul Erdős, one of the most prolific writers of mathematical papers, is a way of describing the “collaborative distance”, in regard to mathematical papers, between an author and Erdős.
Erdős wrote around 1,500 mathematical articles in his lifetime, mostly co-written. He had 511 direct collaborators; these are the people with Erdős number 1. The people who have collaborated with them (but not with Erdős himself) have an Erdős number of 2 (8,162 people as of 2007), those who have collaborated with people who have an Erdős number of 2 (but not with Erdős or anyone with an Erdős number of 1) have an Erdős number of 3, and so forth.
Erdős numbers have been a part of the folklore of mathematicians throughout the world for many years. Amongst all working mathematicians at the turn of the millennium who have a finite Erdős number, the numbers range up to 15, the median is 5, the average Erdős number is 4.65; and almost everyone with a finite Erdős number has a number less than 8.
Given that Erdős died in 1996 and no works of his remain to be published, it is no longer possible for a person to be newly assigned an Erdős number of 1. Likewise, when everybody with an Erdős number of 1 passes on, it will be impossible for a new person to obtain an Erdős number of 2, and so on. As a result of this drift, the mean Erdős number of living people must increase over time.
code coding computer-science geek geometry link mathematics original-content
by Layne
leave a comment
Distance Calculation using Latitude and Longitude
Because of the near-spherical shape of the Earth, technically an oblate spheroid, calculating an accurate distance between two points requires the use of spherical geometry and trigonometric math functions. However, you can calculate an approximate distance using much simpler math functions. For many applications the approximate distance calculations provide sufficient accuracy with much less computational complexity.
Distance Calculation using Latitude and Longitude
There are a number of different approximations to calculate the surface-distance on a sphere using latitude & longitude coordinates. For my personal edification, I’m going to do some sample calculations for the distance between New York City (40°43′N 74°00′W) and Los Angeles (34°03′N 118°15′W), as well as between Eau Claire, WI (44°48′53″N 91°29′34″W) and Minneapolis, MN (44°58′48.36″N 93°15′6.72″W).
I’m going to convert to strictly degrees right away to ease the calculations:
Eau Claire: 44.8147°N 91.4928°W
Minneapolis: 44.8833°N 93.2519°W
New York City: 40.7167°N 74°W
Los Angeles: 34.05°N 118.25°W
-
Basic Math: This method only uses addition, subtraction, and multiplication, and is a basic application of Pythagoras’ theorem, a^2 + b^2 = c^2.
Approximate distance in miles = sqrt(x * x + y * y)
where y = 69.1 * (lat2 - lat1)
and x = 53.0 * (lon2 - lon1)
By this method, the distance from Eau Claire to Minneapolis is 93.3527 miles, and the distance from NYC to LA is 2390.0656 miles. -
Basic Math plus Trig: Add in a cosine term, and things get better:
Approximate distance in miles = sqrt(x * x + y * y)
where y = 69.1 * (lat2 - lat1)
and x = 69.1 * (lon2 - lon1) * cos(lat1/57.3)
By this method, the distance from Eau Claire to Minneapolis is 86.2617 miles, and the distance from NYC to LA is 2575.0506. -
Great Circle Distance Formula: Using real spherical coordinates, this formula will give us the ‘perfect’ answer, to the accuracy of our input numbers:
Distance in miles = 3963.0 * arctan[sqrt(1-x^2)/x]
where
x = [sin(lat1/57.2958) * sin(lat2/57.2958)] + [cos(lat1/57.2958) * cos(lat2/57.2958) * cos(lon2/57.2958 - lon1/57.2958)]
By this method, the distance from Eau Claire to Minneapolis is 86.3905 miles, and the distance from NYC to LA is 2448.8690 miles.
Source Webpage: Distance Calculation using Latitude and Longitude
See Also:
electrical-engineering link mathematics science wikipedia
by Layne
leave a comment
Oliver Heaviside
“Oliver Heaviside (May 18, 1850 – February 3, 1925) was a self-taught English electrical engineer, mathematician, and physicist who adapted complex numbers to the study of electrical circuits, developed techniques for applying Laplace transforms to the solution of differential equations, reformulated Maxwell’s field equations in terms of electric and magnetic forces and energy flux, and independently co-formulated vector analysis. Although at odds with the scientific establishment for most of his life, Heaviside changed the face of mathematics and science for years to come.”
The Heaviside step function, u(t), is pretty important when working with linear systems, and is how I came across this article.