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 givesFor 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 . ThereforeThis is the minimum Dirichlet energy at fixed L2 norm on an interval, equivalently the sharp Wirtinger inequality for this interval.