Trying to approximate a generic continuous function on with the Fourier trigonometric series of the form is in general not very fruitful. Here’s such an approximation to , with the sum over :
It’s better to make a linear change of variable: consider on the interval , and use the formula for the cosine series. This results in , which is approximated by the partial sum of its cosine Fourier series as follows.
But one can do much better with a different, nonlinear change of variable. Consider on the interval , and again use the formula for the cosine series. This results in , which is approximated by the partial sum of its cosine Fourier series as follows.
Yes, I can’t see any difference either: the error is less than .
The composition with cosine improves approximation because is naturally a periodic function, with no jumps or corners in its graph. Fourier series, which are periodic by nature, follow such functions more easily.
A practical implication of this approximation of is the Clenshaw-Curtis integration method. It can be expressed in one line:
The integral is approximated by summing , where are even-numbered cosine coefficients of . In the example with using just three coefficients yields
while the exact integral is .
At first this doesn’t look practical at all: after all, the Fourier coefficients are themselves found by integration. But since is so close to a trigonometric polynomial, one can sample it at equally spaced points and apply the Fast Fourier transform to the result, quickly obtaining many coefficients at once. This is what the Clenshaw-Curtis quadrature does (at least in principle, the practical implementation may streamline these steps.)
Pick two random numbers from the interval ; independent, uniformly distributed. Normalize them to have mean zero, which simply means subtracting their mean from each. Repeat many times. Plot the histogram of all numbers obtained in the process.
No surprise here. In effect this is the distribution of with independent and uniformly distributed over . The probability density function of is found via convolution, and the convolution of with itself is a triangular function.
Repeat the same with four numbers , again subtracting the mean. Now the distribution looks vaguely bell-shaped.
With ten numbers or more, the distribution is not so bell-shaped anymore: the top is too flat.
The mean now follows an approximately normal distribution, but the fact that it’s subtracted from uniformly distributed amounts to convolving the Gaussian with . Hence the flattened top.
What if we use the median instead of the mean? With two numbers there is no difference: the median is the same as the mean. With four there is.
That’s an odd-looking distribution, with convex curves on both sides of a pointy maximum. And with points it becomes even more strange.
k = 10
A = rand(200000,k)
A = A - median(A,'c').*.ones(1,k)
The closed disk of radius has area . But it happens to contain only points with integer coordinates. Here is a picture of one quarter of this disk.
The radius is somewhat notable is that the discrepancy of between the area and the number of integer points is unusually large. Here is the plot of the absolute value of the difference |area-points| as a function of integer radius . The curve in red is , which is an experimentally found upper bound for the discrepancy in this range of .
On the scale up to , the upper bound is , and the radii bumping against this bound are and . The exponent begins to resemble the conjectural in the Gauss circle problem.
Finally, over the interval the upper bound comes out as . The exponent looks good.
This little numerical experiment in Matlab involved using the convex hull function convhull on log-log scale. The function identifies the vertices of the convex hull, which is a polygon. I pick the side of the polygon lying over the midpoint of the range; this yields a linear upper bound for the set of points. On the normal scale, this line becomes a power function. Matlab code is given below; it’s divided into three logical steps.
Find the difference between area and the number of lattice points
a = 1000;
b = 3000;
R = a:b;
E = ;
for n = a:b
[X,Y] = meshgrid(1:n, 1:n);
pts = 4*n + 1 + 4*nnz(X.^2+Y.^2<=n^2);
E = [E, max(1,abs(pts - pi*n^2))];
Pick a suitable side of log-log convex hull
ix = convhull(log(R), log(E));
k = numel(ix);
k = k-1;
Plot the result and output the parameters of the upper bound
R1 = R(ix(k)); E1 = E(ix(k));
R2 = R(ix(k+1)); E2 = E(ix(k+1));
b = log(E1/E2)/log(R1/R2);
a = E1/R1^b;
plot(R, E, '.');
plot(R, a*R.^b , 'r-');
fprintf('a = %.3f, b = %.3f\n', a, b);
If one picks two real numbers from the interval (independent, uniformly distributed), their sum has the triangular distribution.
The sum of three such numbers has a differentiable probability density function:
And the density of is smoother still: the p.d.f. has two
As the number of summands increases, these distributions converge to normal if they are translated and scaled properly. But I am not going to do that. Let’s keep the number of summands to four at most.
The p.d.f. of is a piecewise polynomial of degree . Indeed, for the density is piecewise constant, and the formula
provides the inductive step.
For each , the translated copies of function form a partition of unity:
The integral recurrence relation gives an easy proof of this:
And here is the picture for the quadratic case:
A partition of unity can be used to approximate functions by piecewise polynomials: just multiply each partition element by the value of the function at the center of the corresponding interval, and add the results.
Doing this with amounts to piecewise linear interpolation: the original function is in blue, the weighted sum of hat functions in red.
With we get a smooth curve.
Unlike interpolating splines, this curve does not attempt to pass through the given points exactly. However, it has several advantages over interpolating splines:
Is easier to calculate; no linear system to solve;
Let be some norm on . The norm induces a metric, and the metric yields a notion of curve length: the supremum of sums of distances over partitions. The unit circle is a closed curve; how small can its length be under the norm?
For the Euclidean norm, the length of unit circle is . But it can be less than that: if is a regular hexagon, its length is exactly . Indeed, each of the sides of is a unit vector with respect to the norm defined by , being a parallel translate of a vector connecting the center to a vertex.
To show that cannot be beaten, suppose that is the unit circle for some norm. Fix a point . Draw the circle ; it will cross at some point . The points are vertices of a hexagon inscribed in . Since every side of the hexagon has length , the length of is at least .
It takes more effort to prove that the regular hexagon and its affine images, are the only unit circles of length ; a proof can be found in Geometry of Spheres in Normed Spaces by Juan Jorge Schäffer.
If a function is continuous, then its graph is closed. The converse is false: a counterexample is given by any extension of to the real line.
The Closed Graph Theorem of functional analysis states that a linear map between Banach spaces is continuous whenever its graph is closed. Although the literal extension to nonlinear maps fails, it’s worth noting that linear maps are either continuous or discontinuous everywhere. Hence, if one could show that a nonlinear map with a closed graph has at least one point of continuity, this would be a nonlinear version of the Closed Graph Theorem.
Here is an example of a function with a closed graph and an uncountable set of discontinuities. Let be a closed set with empty interior, and define
For a general function, the set of discontinuities is an set. When the graph is closed, we can say more: the set of discontinuities is closed. Indeed, suppose that a function is bounded in a neighborhood of but is not continuous at . Then there are two sequences and such that both sequences and converge but have different limits. Since at least one of these limits must be different from , the graph of is not closed. Conclusion: a function with a closed graph is continuous at if and only if it is bounded in a neighborhood of . In particular, the set of discontinuities is closed.
Furthermore, the set of discontinuities has empty interior. Indeed, suppose that is discontinuous at every point of a nontrivial closed interval . Let ; this is a closed bounded set, hence compact. Its projection onto the -axis is also compact, and this projection is exactly the set . Thus, is closed. The set has empty interior, since otherwise would be continuous at its interior points. Finally, , contradicting the Baire Category theorem.
Summary: for closed-graph functions on , the sets of discontinuity are precisely the closed sets with empty interior. In particular, every such function has a point of continuity. The proof works just as well for maps from to any metric space.
However, the above result does not extend to the setting of Banach spaces. Here is an example of a map on a Banach space such that whenever ; this property implies that the graph is closed, despite being discontinuous everywhere.
Let the space of all bounded functions with the supremum norm. Let be an enumeration of all rational numbers. Define the function separately on each subinterval , as
For any two distinct elements of there is a point and a number such that is strictly between and . According to the definition of this implies that the functions and take on different values at the point . Thus the norm of their difference is .
So much for Nonlinear Closed Graph Theorem. However, the space in the above example is nonseparable. Is there an nowhere continuous map between separable Banach spaces such that its graph is closed?
Adding 2015 Fellows changed a few things compared to 2014 rankings. UCLA and Rutgers rise from 2nd and 3rd to tie Berkeley for the first place. Syracuse loses nine places, dropping from #334(tie) to #343(tie).
1. Rutgers The State University of New Jersey New Brunswick: 34
In fact, it worked much better than I expected. Not only if of constant sign, but so are and . Indeed,
is always negative,
is always positive,
is always negative. The sign becomes less obvious with the fourth derivative,
because the triangle inequality isn’t conclusive now. But the amplitude of is , and .
So, it seems that is completely monotone, meaning that for all and for all . But we already saw that this sign pattern can break after many steps. So let’s check carefully.
Direct calculation yields the neat identity
With its help, the process of differentiating the function can be encoded as follows: , , then and . The presence of is disconcerting because the harmonic series diverges. But orthogonality helps: the added vector is orthogonal to .
The above example, rewritten as , corresponds to starting with . I calculated and plotted iterations: the points are joined by piecewise linear curve.
The total length of this curve is infinite, since the harmonic series diverges. The question is, does it stay within the unit disk? Let’s find out. By the above recursion,
Hence, the squared magnitude of will always be less than
with being . The infinite product evaluates to (explained here), and thus the polygonal spiral stays within the disk of radius . In conclusion,
where the trigonometric function has amplitude strictly less than . Since the expression on the right is positive, is completely monotone.
The plot was generated in Sage using the code below.
a,b,c,d = var('a b c d')
a = 0
b = 1/2
l = [(a,b)]
for k in range(1,10000):
c = a-b/k
d = b+a/k
a = c
b = d