Previous Article in Journal
A Penalty Approach for Solving Generalized Absolute Value Equations
Previous Article in Special Issue
Diversity and Semiconvergents in Pythagorean Tuning
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Reconstruction of Piecewise Smooth Functions Based on Fourier Extension

School of Mathematics and Statistics, Shandong University of Technology, Zibo 255049, China
*
Authors to whom correspondence should be addressed.
Axioms 2025, 14(7), 489; https://doi.org/10.3390/axioms14070489
Submission received: 28 April 2025 / Revised: 20 June 2025 / Accepted: 20 June 2025 / Published: 23 June 2025
(This article belongs to the Special Issue Applied Mathematics and Numerical Analysis: Theory and Applications)

Abstract

This paper proposes a hierarchical Fourier extension framework for the accurate reconstruction of piecewise smooth functions with mixed-order singularities. To address key challenges in spectral approximation–namely boundary-induced artifacts, instability in edge detection, and loss of accuracy near discontinuities–the method integrates three main components: (1) boundary-focused Fourier extensions that isolate endpoint effects while preserving internal structures; (2) a multi-stage edge detection strategy combining spectral mollifiers and coordinate transformations to identify discontinuities in function values and their derivatives; (3) adaptive domain partitioning followed by localized Fourier extensions to retain spectral accuracy on smooth segments. Numerical results demonstrate near machine-precision accuracy (∼10−14–10−15) with significantly improved stability and performance over traditional global methods.

1. Introduction

The reconstruction of piecewise smooth functions, characterized by their composition of multiple smooth segments, which are separated by discontinuities or singularities, is a critical challenge in computational mathematics and engineering. These functions frequently arise in diverse applications such as solutions to nonlinear hyperbolic partial differential equations (e.g., shock waves), physical fields with abrupt transitions (e.g., temperature or stress discontinuities), and signal processing [1,2,3]. The inherent non-smoothness of such functions poses significant hurdles for traditional global approximation methods like polynomial expansions or Fourier series. Classical results, such as Bernstein’s theorem, highlight the limitations of polynomial approximations for non-smooth functions, where convergence rates degrade near singularities [4]. Furthermore, the Gibbs phenomenon–persistent oscillations near discontinuities–compromises both numerical stability and accuracy, necessitating advanced techniques tailored to address these challenges [5].
Recent developments in approximation theory have sought to address these challenges through innovative localized and nonlinear approaches. Early foundational work by Gelb and Gottlieb [6] proposed mitigating Gibbs phenomena by strategically “stitching” analytic functions across non-overlapping subdomains while leveraging Fourier coefficients for approximation, though their approach left room for enhanced oscillation suppression. Subsequent progress emerged through Geer and Banerjee’s [7] introduction of a periodic basis function family with embedded discontinuities, which is theoretically proven to achieve exponential convergence rates in the maximum norm for approximating piecewise smooth functions. This framework demonstrated how tailored basis systems could fundamentally improve reconstruction accuracy near singularities. Another innovative direction involves piecewise polynomial approximations, such as Treffthen’s recursive detection of singularities to construct segmented Chebyshev interpolants, which avoid global oscillations by adaptively partitioning the domain [8]. Similarly, Eckhoff’s algebraic method identifies jump discontinuities by solving linear systems to recover both the locations and magnitudes of singularities [9]. Akansha’s recent breakthrough [10] introduced the Piecewise Padé-Chebyshev (PiPC) method: a nonlinear rational approximation technique that partitions the domain I : = [ a , b ] into N subintervals, each independently approximated through localized Padé-Chebyshev interpolants. Crucially, PiPC eliminates the need for explicit singularity localization while maintaining spectral accuracy, as its adaptive partitioning inherently captures discontinuities through rational function flexibility.
Fourier extension has emerged as a pivotal technique in computational mathematics for approximating non-periodic functions while mitigating the Gibbs phenomenon. The core idea of Fourier extension lies in artificially extending a non-periodic function defined on an interval [ 1 , 1 ] to a larger periodic domain [ T , T ] ( T > 1 ) , thereby enabling efficient Fourier-based approximation [11]. This approach transforms the problem into a frame approximation, where the extended function is represented as a truncated Fourier series on the enlarged domain. However, this formulation introduces significant challenges, primarily due to the ill-conditioned nature of the associated least-squares systems and oscillations in the extended region [12]. Early advancements in Fourier extension focused on stabilizing these ill-posed systems through regularization techniques. Boyd’s introduction of Truncated Singular Value Decomposition (TSVD) marked a critical step that enabled stable solutions by discarding singular vectors corresponding to negligible singular values [13]. Since then, many researchers have achieved significant results in the field of Fourier extension [14,15,16]. A persistent issue in Fourier extension has been the emergence of oscillations in the extended region. Recent work by Zhao et al. addresses this through a weighted generalized inverse framework. By reformulating the extension as a compact operator equation and introducing weighted norms to enforce coefficient decay, the method shifts the approximation target from minimizing the Euclidean norm of coefficients to a smoother, oscillation-reducing solution [17].
Edge detection in Fourier data is a well-established challenge in spectral methods [18,19]. A fundamental limitation of existing Fourier-based edge detection techniques lies in the inherent discontinuity of domain boundaries within Fourier representations. This discontinuity introduces spurious “edges” and obstructs the precise identification of internal singularities genuinely associated with derivatives. Crucially, even low-order derivative discontinuities significantly degrade the approximation accuracy of piecewise functions. While a Fourier extension appears intuitively promising for mitigating boundary singularities, its direct application to non-smooth function data proves problematic: the intrinsic singularities amplify the Fourier extension coefficients dramatically [20]. From the perspective of compact operator equations, this phenomenon arises from substantial data “errors” [17]. Consequently, global extension approaches analogous to [11] fail to reliably extract accurate edge information through Fourier coefficients.
In prior work [21], one of the present authors developed a boundary-driven Fourier extension method that circumvents internal singularity interference by computing extensions using data near the two endpoints of the interval. This paper adapts this methodology to the approximation of piecewise smooth functions. The proposed framework proceeds hierarchically:
  • Initial Extension: Compute boundary extensions for the global interval using data near the two endpoints.
  • Singularity Identification: Detect intrinsic function discontinuities via Fourier-coefficient-based edge detection.
  • Domain Partitioning: Subdivide the interval at identified non-smooth points, yielding sub-intervals with at least first-order differentiability.
  • Recursive Refinement: For each sub-interval, repeat boundary-driven extensions and employ Fourier-transform differentiation properties to detect first-order derivative edges. Iteratively apply this process to resolve second-order derivative edges.
This hierarchical approach systematically disentangles boundary artifacts from true derivative singularities, enabling progressive recovery of edge information across multiple differentiation orders. The core innovation of this approach lies in its recursive boundary-driven structure and localized processing strategy, which–when combined–offer a novel paradigm not previously realized in the spectral methods literature. Traditional Fourier-based techniques rely heavily on global information, making them susceptible to instability and loss of accuracy when dealing with localized non-smooth behavior [6,17]. In contrast, the present method confines Fourier extensions to data near the endpoints and recursively applies this process on adaptively partitioned subdomains, enabling precise isolation and recovery of singular features at multiple derivative levels.
Compared to classical global extension or filtering strategies, the proposed framework offers several distinctive advantages:
  • Decoupling of boundary and interior singularities: By restricting initial extensions to the domain boundaries, the method prevents interior discontinuities from contaminating the Fourier coefficients, thereby cleanly separating boundary-induced artifacts from true edges.
  • Hierarchical recovery of derivative discontinuities: Leveraging the analytic differentiation properties of the Fourier transform, the method systematically detects discontinuities in successive derivatives, enabling a structured and complete characterization of non-smooth behavior.
  • Simultaneous stability and accuracy: By limiting the region of Fourier extension and employing local reconstruction, the method significantly reduces the amplification of singularities in the spectral coefficients, ensuring numerical stability and high approximation accuracy.
This framework not only provides a new direction for handling non-smooth functions in Fourier spectral methods but also establishes a foundation for the accurate and stable numerical solution of differential equations with discontinuous or singular data. The combination of spectral accuracy with localized refinement opens new possibilities for robust edge-aware spectral algorithms across a broad range of applications.
The remainder of this paper is organized as follows. In Section 2, we reformulate the Fourier extension problem, analyze the properties of piecewise smooth functions in the Sobolev space, and provide a preliminary estimate of the error. In Section 3, we discuss the method for piecewise smooth reconstruction based on uniform sampling. Section 4 verifies the effectiveness of the proposed method through numerical experiments. Finally, in Section 5, we summarize the research content of this paper and propose further discussions.

2. Fourier Extension Method Based on Boundary Interval Data

In this section, we review the Fourier extension algorithm using boundary interval data initially presented in [21]. To address the sensitivity of edge detection to extension area smoothness, we incorporate the weighted generalized inverse matrix from [17] into our boundary extension computation. This integration introduces key modifications to the original formulation in [21].
Let f : [ 0 , 1 ] R be a function sampled at equidistant nodes:
t = M , = 0 , 1 , , M .
For boundary extension, we first let m Δ N + be the number of boundary interval nodes. Given an extension parameter T Δ > 1 , define
L Δ = 2 × T Δ × ( m Δ 1 ) , h = 2 π L Δ , s j = ( j 1 ) h , j = 1 , 2 , , L Δ ,
where · is the rounding symbol. The extension function g is constructed through boundary value mapping:
g ( s j ) = f ( t M m Δ + j ) , j J Δ , 1 , f ( t j L Δ / 2 1 ) , j J Δ , 2 ,
with index sets:
J Δ , 1 = { 1 , 2 , , m Δ } , J Δ , 2 = { L Δ 2 + 1 , L Δ 2 + 2 , , L Δ 2 + m Δ } .
Let the sampling ratio γ 1 determine the spectral resolution:
n Δ = m Δ γ .
Define the weight function and basis functions:
ρ k = e | k | 4 1 2 , ϕ k ( s ) = 1 L Δ e i k s , ψ k ( s ) = 1 ρ k ϕ k ( s ) , k = n Δ , , n Δ .
Construct the system matrix F ˜ γ , N Δ T C 2 m Δ × ( 2 n Δ + 1 )
F ˜ γ , N Δ T , k = ψ k ( s ) , 1 m Δ , ψ k ( s L Δ 2 + m Δ ) , m Δ < 2 m Δ
and the observation vector ( g ) C 2 m Δ × 1
( g ) = 1 m Δ g ( s ) , 1 m Δ , 1 m Δ g ( s m Δ + L Δ 2 ) , m Δ < 2 m Δ .
The truncated singular value decomposition (TSVD) solves:
F ˜ γ , N Δ T c = g ,
yielding the regularized solution:
c ϵ = σ i > ϵ u i T g σ i v i ,
where ϵ serves as the regularization parameter and { σ i , u i , v i } denotes the singular system of matrix F ˜ γ , N Δ T .
The extended function g c ( s ) is then obtained as follows:
g c ( s ) = k = n Δ n Δ c k ϵ ψ k ( s ) .
Finally, we construct the periodic extension f c with period P = 1 + λ , where
λ = T Δ 1 × ( m Δ 1 ) M
defined over [ 0 , P ) by
f c ( t ) = f ( t ) , 0 M , g c ( s m Δ + M ) , l > M .
Figure 1 illustrates the computational workflow for the non-smooth function f ( t ) = | t 1 / 2 | , defined on the interval [ 0 , 1 ] . Notably, while the function contains a singularity at 1 / 2 , the boundary interval data utilized in constructing g c deliberately excludes this critical point. This strategic exclusion ensures numerically stable extension results, as evidenced by the computed solution. The incorporation of the weighting factor ρ k further guarantees a smooth extended profile in the reconstructed function. Leveraging the inherent differentiation properties of Fourier analysis combined with subsequent edge detection techniques, our method achieves precise localization of the singularity at 1 / 2 .
Remark 1.
Regarding the proposed algorithm, two critical implementation notes require emphasis:
  • Weight Simplification: Given the intentionally limited spectral resolution ( n Δ M ) employed in our extension framework, the weighting coefficients ρ k can be unified through the standard form (2). This represents a significant simplification compared to the multi-stage weighting mechanism proposed in [17], while maintaining equivalent regularization effectiveness for small-scale systems.
  • Parameter Selection: Reference [21] conducted a large amount of empirical research on the parameters involved and provided specific configuration recommendations. We adopt these parameters from [21] without revisiting the detailed analysis: γ = 1 , m Δ = 25 , T Δ = 6 .

3. Edge Detection of Functions and Their Derivatives

Let h be a piecewise smooth function defined on the interval [ 0 , 1 ] , which possesses a finite number of jump discontinuities located at points a k , for k = 1 , , K . The associated jump function [ h ] captures these discontinuities and is defined as
[ h ] ( t ) : = h ( t + ) h ( t ) , t [ 0 , 1 ] ,
where h ( t + ) and h ( t ) denote the right and left limits of h at t, respectively.
Suppose that h admits a Fourier expansion of the form
h ( t ) = k = h ^ k e 2 π i k t ,
where h ^ k are the Fourier coefficients. To detect edges (i.e., locations of discontinuities), we employ a mollified version of the derivative of the truncated Fourier series, as proposed in [22]:
T N , σ λ h ( t ) = 2 π i k = N N k ω ^ λ ( k ) h ^ k e 2 π i k t ,
where the mollification is achieved by a smooth spectral filter defined through the Gaussian window
ω λ ( t ) : = ω ( λ t ) , with ω ( t ) = e π 2 t 2 ,
and the regularization parameter λ = λ N is set as N / log N to balance convergence and localization.
This operator T N , σ λ possesses the key property of uniform convergence to the jump function:
lim N T N , σ λ h ( t ) = [ h ] ( t ) , uniformly on [ 0 , 1 ] .
While this methodology, particularly when combined with coordinate transformations, is effective for detecting edge information in functions defined on finite intervals, additional care must be taken in the non-periodic setting. Specifically, the endpoints of the interval [ 0 , 1 ] introduce artificial discontinuities when the function is extended periodically. Consequently, if a derivative of the function contains a discontinuity within the interior of the interval, such an edge may be obscured or misidentified by direct application of the Fourier-based method. This limitation is illustrated in Figure 2.
Figure 3a presents the original piecewise-defined function
f ( t ) = cos ( π t ) , 0 t 1 2 , π t π 2 , 1 2 < t 1 ,
along with its direct periodic extension. Due to this extension, the endpoints t = 0 and t = 1 exhibit artificial zero-order jumps. In Figure 3b, we attempt to detect third-order edge features by directly substituting h ^ k = ( i ξ ) 3 f ^ k into Equation (7). The result indicates that the true third-order edge at t = 1 / 2 is difficult to resolve due to the contamination by endpoint effects.
To overcome this limitation, we perform a Fourier continuation procedure to generate a smooth periodic extension f c ( t ) , as shown in Figure 3c. This extension eliminates spurious discontinuities and permits the accurate application of spectral differentiation. Figure 3d displays the result of applying the edge detection operator to the third derivative f c ( 3 ) ( t ) , successfully isolating the true high-order discontinuity.
Based on the above analysis and demonstration, we propose the following systematic procedure for detecting discontinuities in the k-th derivative of a function defined on a finite interval:
  • Fourier Extension: Construct a smooth periodic extension h c of the original function h using the method described in Section 2, thereby mitigating artificial endpoint effects.
  • Spectral Differentiation: Compute the k-th derivative in the frequency domain via the Fourier differentiation property: h c ( k ) ^ = ( 2 π i k ) k h ^ k .
  • Edge Detection: Apply the mollified edge detection operator in Equation (7) to the differentiated function, optionally combined with a coordinate transformation for better localization.
This framework enables robust and accurate identification of derivative discontinuities—often indicative of features such as curvature or inflection points—in a wide class of piecewise smooth, non-periodic functions.

4. Reconstruction of Piecewise Smooth Functions with k-Order Discontinuities

Let F : [ a , b ] R be a piecewise C r -smooth function, meaning that on each subinterval of a partition, F is r-times continuously differentiable. We assume that the k-th derivatives of F (for k = 0 , 1 , , r ) exhibit jump discontinuities at a set of points { a j } j = 0 J , where a = a 0 < a 1 < < a J = b .
Suppose we are given discrete samples of F on a uniform grid { x i } i = 0 N defined by
x i = a + i h , with h = b a N .
Initially, we assume that the discontinuity locations { a j } align with the sampling grid, i.e., { a j } { x i } . If this assumption does not hold, the edge positions can be iteratively refined via adaptive grid refinement around the initially detected discontinuities.
Our goal is to reconstruct F with high accuracy, particularly near discontinuities. The reconstruction begins by detecting the locations of the discontinuities { a j } using the following multi-stage procedure:
  • Initialization: Set the initial edge set as D = { a , b } .
  • For each derivative order  k = 0 , 1 , , r , perform the following:
    • Local Approximation: On each subinterval defined by the current partition D, compute a Fourier extension of F using the method described in Section 2, incorporating coordinate transformations to handle non-periodic domains.
    • Edge Detection: Compute the k-th derivative of the extended function and apply the edge detection Formula (7) (with appropriate coordinate adjustments) to identify potential jump discontinuities in the k-th derivative.
    • Update: Incorporate the newly detected edges into D, ensuring that the list remains sorted.
After completing the edge detection process, the domain [ a , b ] is partitioned into J subintervals I j = [ a j 1 , a j ] for j = 1 , 2 , , J . We define the restriction of F on each subinterval as follows:
F j ( x ) = F ( x ) , x I j , j = 1 , 2 , , J .
To facilitate the use of Fourier extensions on each subinterval, we introduce a normalized variable t [ 0 , 1 ] via the affine mapping:
f j ( t ) = F j ( a j 1 + r j t ) , where r j = a j a j 1 .
For each normalized function f j ( t ) , we compute its Fourier extension approximation ( f j ) c ( t ) using the techniques in Section 2. The global approximation Q J ϵ F of the function F is then assembled from the local approximations:
Q J ϵ F ( x ) : = ( f j ) c x a j 1 r j , x I j , j = 1 , 2 , , J .
As shown in Figure 2a, when Fourier extension is directly applied over the entire domain for approximation, the overall accuracy is compromised due to the presence of singularities, and the desired level of precision cannot be achieved (The regions where the error approaches machine precision correspond to the locations of the given data points). However, by accurately detecting the edge at t = 1 / 2 and applying local Fourier extensions (Figure 2b), the reconstruction quality improves substantially. This demonstrates the effectiveness of incorporating edge information into the reconstruction pipeline.

5. Numerical Tests

To validate the effectiveness and versatility of the proposed reconstruction method, we first present three numerical experiments involving piecewise smooth functions with different types of singularities. Unless otherwise specified, all tests share the following settings:
  • Error metric: The approximation error is measured as the maximum pointwise difference on a refined evaluation grid, which is 10 times denser than the construction grid.
  • Parameters: Regularization parameter ϵ = 10 14 ; domain [ a , b ] = [ 1 , 1 ] ; initial sampling grid with N = 512 points.

5.1. Example 1: First-Order Derivative Discontinuities

We consider a piecewise linear-quadratic function with discontinuities in the first derivative:
F ( x ) = 2 x + 1 , 1 x 0.5 , x + 0.5 , 0.5 < x 0 , 0.5 , 0 < x 0.5 , 2 x 2 , 0.5 < x 1 .
All internal discontinuities are of first-order (i.e., jumps in F ). The reconstruction procedure proceeds as follows:
  • Figure 4a displays the Fourier extension of F over the entire domain.
  • Figure 4b shows the successful detection of all first-order derivative jumps.
  • Figure 4c illustrates the reconstructed function on subintervals using localized Fourier extensions.
  • Figure 4d confirms that the maximum error is close to machine precision (∼10−14).
Evaluation: This example demonstrates that the proposed method achieves high-accuracy reconstruction for functions with multiple first-order singularities. The precision is comparable to Fourier extension performance on globally smooth functions.

5.2. Example 2: Second-Order Derivative Discontinuities

Consider the function:
F ( x ) = sin ( π x ) , 1 x 0.5 , 1 , 0.5 < x 0.5 , 2 x 3 1.5 x 0.5 , 0.5 < x 1 .
Here, the discontinuities appear in the second derivative F . The reconstruction process is as follows:
  • Figure 5a shows the global extension of F.
  • Figure 5b illustrates successful detection of second-order singularities.
  • Figure 5c shows the reconstruction based on segmented intervals.
  • Figure 5d confirms a final reconstruction error near 10 14 .
Evaluation: This test case demonstrates the method’s robustness in handling higher-order singularities. Even when discontinuities are not directly visible in the function but only appear in its second derivative, the algorithm accurately detects and localizes them, ensuring high-fidelity reconstruction.

5.3. Example 3: Mixed-Type Singularities

In this example, we test the method on a function that combines singularities of different orders:
F ( x ) = 1 , 1 x 0.5 , sin ( π x ) , 0.5 < x 0 , x 2 , 0 < x 0.5 , x , 0.5 < x 1 .
The singularities are
  • A function jump at x = 0.5 ;
  • A first-order derivative discontinuity at x = 0 ;
  • A second-order derivative discontinuity at x = 0.5 .
Evaluation: This example highlights the strength of the proposed multi-stage edge-detection scheme. By successively isolating discontinuities of decreasing smoothness, the method successfully classifies and localizes mixed singularities, enabling accurate segmentation and near-machine-precision reconstruction across the domain (Figure 6).

5.4. Summary of Results

Across all three examples, the proposed method consistently delivers
  • Accurate and automatic detection of edge locations at various smoothness levels;
  • Efficient reconstruction using localized Fourier extensions with error bounded by O ( ϵ ) ;
  • Robust performance for both isolated and compound singularity structures.
These experiments demonstrate that the method is well-suited for practical applications involving piecewise smooth signals, offering both high fidelity and computational stability.
Finally, we give a simple example of solving a differential equation to demonstrate the potential application value of the method when the problem contains singularities.

5.5. Example 4: Apply the Method to Solve Differential Equation

In this example we consider the following differential equation:
u x x = | x | , 1 < x < 1 , u ( ± 1 ) = 0 .
It is a Poisson equation, with solution
u = | x | 3 1 6 .
For the above differential equation, we can first construct the Fourier extension approximation of the source term | x | and identify the singular point 0. Then, we can construct the approximate solution piecewise and use the corresponding relationship between the Fourier coefficients, the boundary condition u ( ± 1 ) = 0 , and the continuity conditions
u ( 0 + ) = u ( 0 ) , u ( 0 + ) = u ( 0 )
to determine the final solution. Figure 7 shows the approximation error of the numerical solution. It can be seen that for differential equations containing singular points, the new method can also achieve spectral accuracy.

6. Computational Complexity and Comparison with Gegenbauer Reconstruction

6.1. Computational Complexity of the Proposed Method

The proposed reconstruction method involves three main stages:
  • Initial Fourier extension over the full domain.
  • Iterative edge detection to identify discontinuity points and classify their orders.
  • Segment-wise reconstruction via local Fourier extensions on smooth subintervals.
Let N denote the total number of sampling points, and let K be the number of detected singularities. The complexity of each component is estimated as follows:
  • Fourier extension (global and local): For smooth intervals of size N j N / K , computing a Fourier extension using FFT-based methods costs O ( N j log N j ) . Summing over all intervals yields O ( N log ( N / K ) ) .
  • Edge detection: Assuming d iterative detection stages (e.g., for jumps in F, F , and F ), the detection cost is O ( d N log N ) , leveraging FFT-based derivative filters.
  • Interval assembly: The segmentation and global reconstruction require O ( N ) operations.
Total computational cost is thus
O ( d N log N ) ,
assuming K and d remain small relative to N.

6.2. Comparison with Gegenbauer Reconstruction

Gegenbauer reconstruction is a classical method for recovering piecewise smooth functions from global spectral data by suppressing the Gibbs phenomenon. It generally consists of
  • Edge detection (using Fourier-based indicators or concentration kernels);
  • Gegenbauer polynomial expansion on smooth subintervals;
  • Coefficient computation via projection or least-squares.

6.2.1. Complexity Comparison

The following applies in the Gegenbauer reconstruction:
  • Edge detection: Similar to our method, typically O ( N log N ) .
  • Expansion cost: Each interval requires computing M Gegenbauer coefficients, costing O ( M 2 ) . With K subintervals, the total cost is O ( K M 2 ) .
  • Since M often grows with N to maintain accuracy, the overall complexity can approach O ( N 2 ) in practice.

6.2.2. Qualitative Comparison

Both methods aim to achieve high-order or spectral accuracy for functions with discontinuities. The proposed method offers several practical advantages:
  • It is highly adaptive, requiring minimal parameter tuning.
  • The FFT-based implementation leads to quasi-linear computational complexity.
  • It performs well even for functions with multiple and mixed-order singularities.
By contrast, while the Gegenbauer approach is theoretically elegant and achieves high accuracy when properly configured, it can be computationally expensive and sensitive to parameter choices (Table 1).

7. Conclusions

This paper introduces a novel Fourier extension-based framework for the high-accuracy reconstruction of piecewise smooth functions. Our approach addresses three core challenges in the spectral approximation of functions with discontinuities:
  • Boundary Singularity Resolution. By constructing tailored Fourier extensions that span the domain boundaries, we effectively eliminate artificial discontinuities (i.e., “natural breakpoints”) at the endpoints. This preprocessing step is essential for the accurate spectral detection of internal derivative jumps.
  • Stable Edge Detection. The extension process uses only data near the domain boundaries, isolating the edge treatment from internal irregularities. This localization ensures that edge information in the derivative spectra is accurately retained without interference, leading to numerically stable and reliable detection of singularities.
  • Adaptive Segmentation and Local Reconstruction. After edge detection, the domain is adaptively partitioned into smooth subintervals. On each segment, high-fidelity Fourier extensions are computed independently. This strategy integrates precise singularity localization with the exponential convergence properties of spectral methods on smooth domains.
Comprehensive numerical experiments validate the proposed method’s ability to achieve machine-level accuracy (up to 10 14 to 10 15 ) even in the presence of mixed-order singularities, including jump discontinuities in the function itself and its first and second derivatives.
The method demonstrates robust performance in scenarios that require
  • Simultaneous handling of multiple, heterogeneous discontinuities;
  • High local resolution near singular points;
  • Uniform accuracy across discontinuity scales and types.
Future research will focus on extending the method to higher-dimensional domains, with particular attention to given applications in the numerical solutions of partial differential equations involving moving or evolving discontinuities.

Author Contributions

Methodology, Z.Z.; writing—original draft preparation, X.L. and X.J.; writing—review and editing, X.J. and Z.Z.; funding acquisition, Z.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research is funded by the Shandong University of Technology Doctoral Start-up Fund (No. 419047).

Data Availability Statement

Data sharing is not applicable as no datasets were generated or analyzed during the current study.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Cockburn, B.; Shu, C.W.; Johnson, C.; Tadmor, E.; Shu, C.W. Essentially Non-Oscillatory and Weighted Essentially Non-Oscillatory Schemes for Hyperbolic Conservation Laws; Springer: Berlin/Heidelberg, Germany, 1998. [Google Scholar]
  2. Simpson, D.J.W. Bifurcations in Piecewise-Smooth Continuous Systems; World Scientific: Singapore, 2010; Volume 70. [Google Scholar]
  3. Zhang, D.; Liang, J. Graph-based transform for 2D piecewise smooth signals with random discontinuity locations. IEEE Trans. Image Process. 2017, 26, 1679–1693. [Google Scholar] [CrossRef] [PubMed]
  4. Nürnberger, G. Approximation by Spline Functions; Springer: Berlin/Heidelberg, Germany, 1989. [Google Scholar]
  5. Adcock, B.; Hansen, A.C. Stable reconstructions in Hilbert spaces and the resolution of the Gibbs phenomenon. Appl. Comput. Harmon. Anal. 2012, 32, 357–388. [Google Scholar] [CrossRef]
  6. Gelb, A.; Gottlieb, D. The resolution of the Gibbs phenomenon for “spliced” functions in one and two dimensions. Comput. Math. Appl. 1997, 33, 35–58. [Google Scholar] [CrossRef]
  7. Geer, J.; Banerjee, N.S. Exponentially accurate approximations to piece-wise smooth periodic functions. J. Sci. Comput. 1997, 12, 253–287. [Google Scholar] [CrossRef]
  8. Boyd, J.P. Chebyshev and Fourier Spectral Methods, 2nd ed.; Dover Publications: New York, NY, USA, 2001. [Google Scholar]
  9. Eckhoff, K.S. Accurate and efficient reconstruction of discontinuous functions from truncated series expansions. Math. Comput. 1993, 61, 745–763. [Google Scholar] [CrossRef]
  10. Akansha, S. Piecewise nonlinear approximation for non-smooth functions. Results Appl. Math. 2024, 23, 100491. [Google Scholar] [CrossRef]
  11. Huybrechs, D. On the Fourier extension of nonperiodic functions. SIAM J. Numer. Anal. 2010, 47, 4326–4355. [Google Scholar] [CrossRef]
  12. Adcock, B.; Huybrechs, D.; Martín-Vaquero, J. On the numerical stability of Fourier extensions. Found. Comput. Math. 2014, 14, 635–687. [Google Scholar] [CrossRef]
  13. Boyd, J.P. A comparison of numerical algorithms for Fourier extension of the first, second, and third kinds. J. Comput. Phys. 2002, 178, 118–160. [Google Scholar] [CrossRef]
  14. Matthysen, R.; Huybrechs, D. Function approximation on arbitrary domains using Fourier extension frames. SIAM J. Numer. Anal. 2018, 56, 1360–1385. [Google Scholar] [CrossRef]
  15. Adcock, B.; Huybrechs, D. On the resolution power of Fourier extensions for oscillatory functions. J. Comput. Appl. Math. 2014, 260, 312–336. [Google Scholar] [CrossRef]
  16. Levin, D. Reconstruction of piecewise smooth multivariate functions from Fourier data. Axioms 2020, 9, 88. [Google Scholar] [CrossRef]
  17. Zhao, Z.; Wang, Y.; Yagola, A.G.; Li, X. A New Approach for Fourier Extension Based on Weighted Generalized Inverse. arXiv 2025, arXiv:2501.16096. [Google Scholar]
  18. Gelb, A.; Tadmor, E. Detection of edges in spectral data. Appl. Comput. Harmon. Anal. 1999, 7, 101–135. [Google Scholar] [CrossRef]
  19. Martinez, A.; Gelb, A.; Gutierrez, A. Edge detection from non-uniform Fourier data using the convolutional gridding algorithm. J. Sci. Comput. 2014, 61, 490–512. [Google Scholar] [CrossRef]
  20. Adcock, B.; Seifi, M. Frame approximation with bounded coefficients. Adv. Comput. Math. 2021, 47, 4. [Google Scholar] [CrossRef]
  21. Zhao, Z.; Wang, Y.; Yagola, A.G. Fast Algorithms for Fourier extension based on boundary interval data. arXiv 2024, arXiv:2409.04265. [Google Scholar]
  22. Cochran, D.; Gelb, A.; Wang, Y. Edge detection from truncated Fourier data using spectral mollifiers. Adv. Comput. Math. 2013, 38, 737–762. [Google Scholar] [CrossRef]
Figure 1. Calculation process for f ( t ) = | t 1 2 | ( M = 128 , m Δ = 12 , γ = 1 , T Δ = 6 ).
Figure 1. Calculation process for f ( t ) = | t 1 2 | ( M = 128 , m Δ = 12 , γ = 1 , T Δ = 6 ).
Axioms 14 00489 g001
Figure 2. Comparison of reconstruction errors for the function f ( t ) defined in (8), using N = 128 sampling points. (a) illustrates the limitations of directly applying Fourier extensions over the entire domain without considering discontinuities. In contrast, (b) demonstrates significant improvement after segmenting the domain at the detected discontinuity and applying local reconstructions. (a) Direct Fourier extension reconstruction without edge information. (b) Reconstruction after incorporating detected edge at t = 1 2 .
Figure 2. Comparison of reconstruction errors for the function f ( t ) defined in (8), using N = 128 sampling points. (a) illustrates the limitations of directly applying Fourier extensions over the entire domain without considering discontinuities. In contrast, (b) demonstrates significant improvement after segmenting the domain at the detected discontinuity and applying local reconstructions. (a) Direct Fourier extension reconstruction without edge information. (b) Reconstruction after incorporating detected edge at t = 1 2 .
Axioms 14 00489 g002
Figure 3. Demonstration of detecting third-order edge information in f ( 3 ) ( t ) . (a) The original function and its direct periodic extension. (b) Edge detection using ( i ξ ) 3 f ^ k . (c) f c ( t ) : Fourier extension of the original function. (d) Edge detection using f c ( 3 ) ( t ) .
Figure 3. Demonstration of detecting third-order edge information in f ( 3 ) ( t ) . (a) The original function and its direct periodic extension. (b) Edge detection using ( i ξ ) 3 f ^ k . (c) f c ( t ) : Fourier extension of the original function. (d) Edge detection using f c ( 3 ) ( t ) .
Axioms 14 00489 g003
Figure 4. Numerical results for Example 1: first-order discontinuities.
Figure 4. Numerical results for Example 1: first-order discontinuities.
Axioms 14 00489 g004
Figure 5. Numerical results for Example 2: second-order derivative discontinuities.
Figure 5. Numerical results for Example 2: second-order derivative discontinuities.
Axioms 14 00489 g005
Figure 6. Numerical results for Example 3: mixed singularities of different orders.
Figure 6. Numerical results for Example 3: mixed singularities of different orders.
Axioms 14 00489 g006
Figure 7. Approximation error of example 4.
Figure 7. Approximation error of example 4.
Axioms 14 00489 g007
Table 1. Comparison between the proposed method and Gegenbauer reconstruction.
Table 1. Comparison between the proposed method and Gegenbauer reconstruction.
AspectProposed Fourier Extension MethodGegenbauer Reconstruction
Edge detectionIterative Fourier-based filters (multi-order)Typically single-stage, Fourier-based
Basis for reconstructionLocal Fourier extensions on smooth subintervalsGegenbauer polynomials
Computational complexity O ( N log N ) O ( K M 2 )
Parameter tuningFully adaptiveRequires choice of M, λ
Handling mixed singularitiesRobust via recursive detectionLimited; may require manual case handling
AccuracySpectral (∼10−14 observed)Spectral if parameters are optimal
Ease of implementationModerate (FFT, segmentation)More complex (special functions, tuning)
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Li, X.; Zhao, Z.; Jia, X. Reconstruction of Piecewise Smooth Functions Based on Fourier Extension. Axioms 2025, 14, 489. https://doi.org/10.3390/axioms14070489

AMA Style

Li X, Zhao Z, Jia X. Reconstruction of Piecewise Smooth Functions Based on Fourier Extension. Axioms. 2025; 14(7):489. https://doi.org/10.3390/axioms14070489

Chicago/Turabian Style

Li, Xusheng, Zhenyu Zhao, and Xianzheng Jia. 2025. "Reconstruction of Piecewise Smooth Functions Based on Fourier Extension" Axioms 14, no. 7: 489. https://doi.org/10.3390/axioms14070489

APA Style

Li, X., Zhao, Z., & Jia, X. (2025). Reconstruction of Piecewise Smooth Functions Based on Fourier Extension. Axioms, 14(7), 489. https://doi.org/10.3390/axioms14070489

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Article metric data becomes available approximately 24 hours after publication online.
Back to TopTop