Take . It vanishes at both endpoints. Its odd periodic extension is continuously differentiable across the joins, whereas its even extension has corners because and are nonzero.
Two integrations by parts, with , give
The Fourier coefficients are therefore
The Fourier sine series has a uniform absolute tail , and each of its partial sums satisfies both zero boundary values exactly. The Fourier cosine series has an absolute tail bound ; at its omitted even-index Fourier coefficients have the same sign and yield an error of order . This verifies a strictly faster uniform error bound for the sine approximation in this example.
For a nonzero integer , direct integration gives
whereas . The product-to-sum formulas
therefore establish Fourier orthogonality: for positive integers ,
Here is the Kronecker delta. In particular the constant function is orthogonal to every nonconstant sine and cosine in this system. Integrating the given Fourier series, then multiplying it by or and integrating, isolates its Fourier coefficients. Using the permitted interchange of the sum and integral gives
If is an even function, then is an odd function, while is an even function. Thus
The Fourier series consequently reduces to a Fourier cosine series.
The Fourier cosine series and Fourier sine series use the respective forms
Their Fourier coefficients, obtained from Fourier orthogonality, are
In particular the constant term is . The Fourier cosine series is the Fourier series of the even extension , made -periodic. The Fourier sine series is the Fourier series of the odd extension, equal to for and for , again made -periodic.
The truncated Fourier cosine series gives the better approximation on the closed interval, in the senses of uniform convergence and the asymptotic L2 norm error. To make the comparison precise, let and retain the frequencies , with the constant term also included in .
The cosine Fourier coefficients are . In fact, absolute convergence gives the uniform tail bound
For the Fourier sine series, every Fourier partial sum satisfies . Thus
so there is no uniform convergence to on the closed interval. Its odd extension has jump discontinuities, producing the Gibbs phenomenon near the endpoints; its Fourier coefficients decrease only like .
The advantage persists in the L2 norm, which ignores individual endpoint values. By Parseval's identity and Fourier orthogonality,
The nonzero odd cosine coefficients and both parity classes of sine coefficients also give matching lower bounds of these orders by comparison with the corresponding p-series. Hence their L2 norm errors decrease respectively like and . This is a comparison of approximation quality in specified norms, not a claim that one finite sum has smaller error at every individual interior point.
For the Fourier cosine series, integration by parts gives
and, for ,
Only odd Fourier harmonics remain, so
For the Fourier sine series, another integration by parts gives
Consequently
At and , the Fourier sine series instead has value zero.
To describe the requested graphs precisely, take congruent to modulo . The Fourier cosine series converges to the continuous triangular periodic extension
Its minima occur at the even multiples of , with value , and its maxima at the odd multiples, with value . The Fourier sine series converges to
The jump discontinuities at even multiples of go from to ; those at odd multiples go from to . Each jump is assigned its midpoint, zero, by the Fourier series.
Figure 1.
Limits of the Fourier cosine series and Fourier sine series of on
. Details.
Take . This function is not a polynomial: it is nonzero and satisfies , whereas a nonzero polynomial cannot satisfy that identity, since taking two derivatives reduces its degree or gives zero.
By Fourier orthogonality, the Fourier sine series consists of the single term . Thus every truncation with is exact, including at the endpoints. In contrast, using the product-to-sum trigonometric identity in its Fourier cosine coefficients gives
For example, follows by integrating the two resulting sine terms. Therefore the Fourier cosine series is
Every finite cosine truncation omits infinitely many nonzero Fourier coefficients, so Parseval's identity gives it strictly positive squared L2 norm error. The one-term sine representation has zero error in both the L2 norm and the supremum norm, proving the requested advantage.
Set in Laplace's equation. Separation of variables gives
The Sturm-Liouville problem in has the constant mode with , and the eigenfunctions with , . Indeed, integration by parts makes nonnegative; for the first Neumann boundary condition removes the sine term and the second requires to be an integer. For , both derivative conditions make constant.
Expand the top data using a Fourier cosine series:
The constant coefficient is
For , the constant part has zero integral against , and two integrations by parts give
Since the bottom value is zero, a convenient factor depending on for the nonconstant modes is , which vanishes at . Its value at is . The zero mode is linear in , so matching both constant boundary values gives
To obtain exactly the paper's form, use the hyperbolic-function identity
Thus
Each product of hyperbolic sine or hyperbolic cosine with has . The zero mode is also a harmonic function. On , the factor lies between zero and one. Since converges, the Weierstrass M-test gives uniform convergence on the closed rectangle. The series therefore gives zero at the bottom and the continuous Fourier cosine series of at the top, including its endpoints. On compact subsets with , the factors decay exponentially with , justifying termwise partial derivatives. In particular on both open vertical edges because every differentiated cosine factor vanishes there. The solution has finite Dirichlet energy: Fourier orthogonality gives the th nonconstant mode's energy as , whose sum is finite. Here is the hyperbolic cotangent. Thus a proves uniqueness in that class.
There is a corner compatibility condition for mixed boundary data in the printed wording. The top data have , but the paper writes even at . The series solves the interior equation and all the open-edge boundary conditions; the literal derivative condition at is incompatible with the top data. A function differentiable in along the top edge would necessarily have . Hence it cannot simultaneously satisfy the printed zero derivative at that corner, and there is no solution with all those literal corner requirements. The standard interpretation of this mixed boundary condition imposes the Neumann boundary condition on the open sides and the Dirichlet boundary condition continuously on the horizontal edges. Differentiating the series term by term on the top edge would be invalid at this corner; the uniform convergence of the undifferentiated series does not license that operation.
Using the usual piecewise smooth interpretation of the derivative hypothesis, Dirichlet's theorem on Fourier series gives the average of the two one-sided limits of the appropriate periodic extension. The even extension is continuous at and at the identified endpoints , so the Fourier cosine series converges to
For the odd extension, the one-sided limits at zero are and , while at the periodic one-sided limits are and . Hence the Fourier sine series converges to
At an endpoint this equals precisely when is zero there. One can also see the zero endpoint values directly: every partial sum consists of sines that vanish at both endpoints.
For the Fourier cosine series, first take the even extension on , and then its -periodic extension. Evenness eliminates the sine terms. With the constant term written as , the Fourier coefficients and series are
For the Fourier sine series, take the odd extension for and for , and extend with period . Values assigned at isolated endpoints do not change the Fourier coefficients. Oddness eliminates the constant and cosine terms, leaving
Both formulas follow by orthogonality on and the parity of the extensions.
The truncated Fourier cosine series gives the better approximation over the whole closed interval. Its Fourier coefficients obey , so absolute convergence and the tail bound
give uniform convergence. The even periodic extension is continuous; its slope changes only cause corners.
By contrast . The odd periodic extension has a jump at , giving slower coefficient decay and the Gibbs phenomenon near that endpoint. Every truncated Fourier sine series satisfies , so
It therefore cannot converge uniformly to on , although it converges at every point of . This comparison concerns approximation across the interval; it does not assert that the cosine truncation has smaller error at every individual interior point for every .
The Fourier cosine series converges to the continuous even -periodic extension. If represents modulo , its value is
It has value zero at , rises linearly with distance from these points until height , and then stays flat until the next descending ramp. Thus the sketch on has minima at , and plateaux centred at the odd multiples of . Its large partial sums round the corners and closely follow the whole graph.
The Fourier sine series converges, away from the odd multiples of , to the odd -periodic extension
At every odd multiple of its value is zero, the midpoint of the jump from to . At even multiples of it passes continuously through zero. Thus on every interval it has a negative plateau, a rising linear segment through , and a positive plateau. The jump size is .
Figure 1.
Periodic limits and 60-term Fourier partial sums
. Details.
The blue curves are the partial sums through . The open endpoint circles and filled zero dots in the lower panel distinguish the one-sided limits from the value of the Fourier sine series at each jump. Near these jumps the partial sums exhibit the Gibbs phenomenon: the oscillations become concentrated in narrower regions as the number of terms grows, while their limiting overshoot remains about times the jump, here about .
Put . The constant Fourier coefficient is
For , integration by parts gives
The terms cancel. Thus
This Fourier cosine series has when is divisible by four, when , and when is odd.
Similarly,
Therefore
The Fourier sine series also equals at zero, but has value zero at , where .
Write . The transient satisfies the heat equation and homogeneous mixed boundary conditions
The left condition is a Neumann boundary condition and the right one a Dirichlet boundary condition. Separation of variables, , gives
The condition removes the sine term. The condition then selects
There is no nonzero mode with , because a linear satisfying both conditions is zero. There is no growing mode either: integration by parts gives , so every nonzero mode has .
These Sturm-Liouville eigenfunctions have orthogonality and squared norm
Expand the initial transient in this half-integer Fourier cosine series. Its coefficients are
The integration formula follows by integration by parts; the cosine at the endpoint is zero. Thus the half-integer cosine expansion of a linear profile gives
At the Fourier series reproduces everywhere, including the endpoints; its coefficient decay gives uniform convergence. For every the exponential factors allow termwise differentiation and verify the heat equation and both boundary conditions. The sudden switch-on of nonzero heat flux is incompatible with the spatial derivative of the constant initial temperature at the corner . Accordingly, the positive-time boundary derivative must not be inferred by differentiating the initial Fourier series term by term at that corner.
Evenness removes every sine coefficient. In the period-two Fourier cosine series convention , the constant coefficient is . Integration by parts gives
Thus the Fourier cosine series of a triangular wave is
The periodic function is continuous and piecewise smooth, so the Dirichlet-Jordan convergence theorem gives its value at every point. The summable absolute coefficient bound also gives uniform convergence by the Weierstrass M-test.
Assume , so the squared-error integral is finite. Write
At a minimum, differentiating with respect to each coefficient gives
By Fourier orthogonality, the constant has squared norm , each nonconstant cosine has squared norm , and all distinct modes are orthogonal. Thus
These are exactly the Fourier coefficients of the Fourier cosine series of the even function. To check that the stationary choice is a unique global minimum, perturb the coefficients by . The residual is orthogonal to every fitted mode, so the cross terms vanish and
with equality only when every perturbation is zero. The truncated series is the orthogonal projection onto a finite-dimensional subspace spanned by the constant and the first cosine modes.
The function is even, so each product with a sine is an odd function and all the Fourier coefficients vanish. Its constant coefficient is
For , part (a) gives the remaining Fourier coefficients:
Consequently the Fourier cosine series is
The periodic extension is continuous, including at , and piecewise continuously differentiable. Thus the Fourier series equals everywhere. Its coefficients are also bounded in magnitude by a constant times , which gives absolute convergence.
With constant positive thermal diffusivity , no internal heat source and one spatial coordinate, the heat equation is
Separation of variables makes each spatial mode decay by . The endpoint conditions determine whether the initial triangular profile is expanded in a Fourier sine series or a Fourier cosine series.
Figure 1.
The same triangular initial temperature with cooled and insulated ends
. Original heat-equation solutions for several dimensionless times. Fixed zero-temperature ends cool the bar to zero; insulated ends preserve its initial mean and approach a uniform temperature. Details.
For , both the constraint and endpoint values hold, the extremal equation has , and direct integration gives .
For any admissible function, its derivative has Fourier cosine series coefficients and zero constant coefficient. This follows by integration by parts: , and . Thus the Parseval identity gives
For finite sums the same identity follows directly from the cosine product formula in the hint; the identity justifies the general case. Equality holds only if for all , and normalization then fixes . Therefore
This is the minimum Dirichlet energy at fixed L2 norm on an interval, equivalently the sharp Wirtinger inequality for this interval.
Put and
This polynomial is a harmonic function: . Also , and . Thus satisfies Laplace's equation with homogeneous Neumann boundary conditions on both side walls and the bottom. Its Fourier cosine series consequently has the form
The surface condition becomes , where
For a nonzero forcing frequency away from the natural frequencies, the coefficients of the oscillating-wall forcing of a rectangular tank are
Here in the definition of . In fact for , since . The zero-mode coefficient ensures that the mean surface elevation is in complex amplitude, exactly the first-order volume conservation adjustment to the moving wall.