High-accuracy pseudospectral scheme for fractional diffusion-wave problems based on cardinal functions Authors: Behzad Nemati Saray, Davron Aslonqulovich Juraev, Mohamed Abdalla, Rakib Efendiev, Yahya Almalki, Samad Ahdiaghdam Published: 2026 ABSTRACT Fractional diffusion-wave equations (FDWEs) are essential for modeling complex physical phenomena with memory and hereditary properties, such as anomalous diffusion and viscoelasticity, which classical integer-order models fail to capture accurately. In this paper, we introduce an efficient and high-accuracy pseudospectral scheme utilizing Legendre cardinal functions (LCFs) as basis functions to solve both second- and fourth-order FDWEs. By reformulating the governing equations into equivalent integral forms and developing direct matrix representations for the Caputo fractional derivative and fractional integral operators, we systematically transform the original problem into a solvable system of algebraic equations. Detailed convergence analysis and numerical experiments confirm that this method consistently achieves spectral convergence. A key novelty of this technique, and what significantly advances it beyond previous efforts in the literature, is its exploitation of the cardinal properties of LCFs to avoid numerical integral evaluations when computing basis coefficients entirely. Consequently, this approach dramatically reduces computational overhead while delivering superior accuracy and efficiency compared to existing finite difference and collocation methods. 1 Introduction Fractional differential equations (FDEs) have become a focal point of contemporary mathematical modeling due to their ability to capture complex physical phenomena exhibiting memory and hereditary properties. Among these, fractional diffusion-wave equations (FDWEs) are of particular importance, as they generalize the classical diffusion and wave equations by incorporating derivatives of non-integer order. These equations are applicable in various scientific and engineering fields, including viscoelasticity, anomalous diffusion, signal processing, and subsurface transport. Unlike integer-order models, which often oversimplify dynamic systems, fractional models provide a more accurate description of processes where the rate of change depends not only on the current state but also on the entire history of the system. Recent advances in the theory of fractional calculus have facilitated the development of new analytical and numerical methods to solve such problems. However, numerical treatment of fractional partial differential equations (PDEs) remains challenging due to their non-local nature and the computational complexity involved in approximating fractional operators. Most existing numerical schemes, such as finite difference or finite element methods, require fine discretization to achieve acceptable accuracy, often leading to large-scale algebraic systems and high computational costs. Furthermore, their convergence properties may deteriorate when applied to problems with high-order spatial derivatives or strong temporal singularities. Given the limitations of traditional approaches, there is a growing demand for more efficient and accurate numerical methods for solving FDWEs. Spectral and pseudospectral methods, known for their exponential convergence properties in solving smooth problems, offer a promising alternative. Among these, the use of Legendre cardinal functions (LCFs) stands out due to their interpolation properties, which eliminate the need for integral evaluations in the computation of basis coefficients. This work addresses a timely and important need in applied mathematics: the development of a computationally efficient and highly accurate scheme for solving second- and fourth-order FDWEs. Moreover, fractional models are increasingly used in real-world applications such as seismic wave simulation, heat conduction in heterogeneous materials, and bioengineering systems. Therefore, having a robust and generalizable numerical method that provides reliable solutions to FDWEs contributes directly to advances in modeling such phenomena, reinforcing the practical value and cross-disciplinary impact of this research. The scientific novelty of this work lies in the development of a high-accuracy pseudospectral method based on Legendre cardinal functions for solving both second- and fourth-order fractional diffusion-wave equations. Unlike traditional methods, the proposed approach introduces matrix representations of Caputo fractional derivatives and integrals, eliminating the need for numerical integration of basis coefficients. This significantly improves computational efficiency. Additionally, the method is applicable to a wide range of problems, provides spectral convergence, and offers greater accuracy compared to existing numerical schemes. Its flexibility and rigorous theoretical foundation mark a novel contribution to the numerical analysis of fractional partial differential equations. In recent years, fractional differential equations (FDEs) have emerged as powerful tools to model complex physical phenomena that cannot be adequately described by classical integer-order derivatives [1–5]. Due to their growing importance, FDEs have attracted significant research interest, leading to advancements in both theoretical development and numerical solutions. Various computational methods have been proposed to solve FDEs efficiently, including the implicit integration factor method [6], the Adomian decomposition method [7], and adaptive grid techniques to enhance numerical accuracy [8]. Wavelet-based methods [9–11] and B-spline collocation approaches [12,13] have also gained popularity for their flexibility in approximating solutions. Additionally, second-order accurate difference schemes [14], finite difference method [15], multistep schemes [16], the classical finite element method [17], compact difference scheme [18], collocation method [8, 19–22], Adaptive-grid technique [23], method of lines and the Petrov-Galerkin finite element-meshfree formulation [24] have been developed to address FDEs. Also, many other applications of fractional order problems can be found in [25–30]. The time-fractional diffusion-wave equation (FDWE) is a mathematical model describing a wide range of physical phenomena. It generalizes the classical diffusion-wave equation by replacing the second-order time derivative with a fractional derivative of order η, where (1<η≤2). This equation models mechanical, acoustic, and electromagnetic behaviors [31]. Furthermore, fourth-order spatial derivatives appear in wave propagation within beams and surface groove development, making the fourth-order FDWE a subject of extensive research [32]. This article builds upon previous foundational works related to ill-posed problems, spectral analysis, and boundary value problems. Specifically, it extends the regularization techniques and analytical approaches to Cauchy problems for elliptic systems developed in [33–36], where various methods for solving first-order elliptic systems in bounded and unbounded domains were proposed. The spectral framework applied in the present study is also influenced by the spectral analysis of non-self-adjoint differential operator pencils and branching structures explored in [37,38], providing a theoretical basis for operator behavior in complex domains. In addition, the treatment of wave equations and quantum systems in bounded domains, as discussed in [39], underpins the use of advanced differential formulations. Finally, the Fredholm properties of periodic and general boundary value problems examined in [40,41] inform the mathematical treatment of boundary conditions and ensure the robustness of the proposed numerical schemes. His study also draws upon recent advancements in numerical methods for differential equations. In particular, the modified Gauss quadrature techniques for solving initial-value problems for ODEs proposed by Ibrahimov and Imanova [42], as well as their approaches to increasing the accuracy of numerical solutions in applied problems [43], have been influential in shaping the discretization strategies and precision analysis adopted in this work. We consider a mathematical model defined over a rectangular domain in space and time, where the unknown function describes the dynamic behavior of a physical system. The evolution of this function is governed by a fractional time derivative of Caputo type, with the order of differentiation lying between one and two, capturing both memory effects and intermediate behavior between diffusion and wave propagation. The equation includes a second-order spatial derivative, representing the distribution of the quantity across space. Additionally, the system is influenced by a source function that varies in both spatial and temporal dimensions. To ensure a well-posed problem, we impose initial conditions, specifying the state and the initial rate of change of the function at the beginning of the time interval. We also enforce boundary conditions at the spatial endpoints, controlling the values of the solution along the edges of the spatial domain. This formulation is particularly relevant in applications involving anomalous transport, viscoelastic materials, or signal propagation in complex media. This work focuses on solving the second-order FDWE [44–48] with initial-boundary conditions and the fourth-order FDWE, with conditions where 0C𝒟tη indicates the Caputo derivative, 𝒟s=∂∂s, and η∈(1,2]. Here we assume that u and q are smooth and continuous functions. The Caputo fractional derivative in problems (4)-(4) models physical systems where the present state depends on the entire history of evolution, unlike classical integer-order models that capture only instantaneous change. This behavior appears in wave propagation through viscoelastic media, anomalous diffusion in porous or heterogeneous materials, and seismic and biological signal propagation. Therefore, fractional diffusion-wave equations allow capturing intermediate behavior between pure diffusion and classical wave dynamics, which cannot be accurately described by standard models. Various numerical approaches have been applied to solve such equations, including the spectral tau method [44], the implicit difference scheme [45], high-order compact finite difference methods [46,47], the finite difference scheme [48], a compact difference scheme [49, 50], collocation method [51], the separating variables [52] and the Sumudu transform method [53]. The pseudospectral method, a prominent member of the spectral method family, offers high accuracy in solving differential equations due to its interpolation-based approach. Unlike finite difference methods, which rely on local discretization, the pseudospectral scheme approximates solutions using collocation points. This method leverages orthogonal polynomials to achieve rapid convergence, particularly for problems with smooth solutions, and ensures high accuracy by minimizing residuals at collocation points. These advantages make it well-suited for complex problems, including high-dimensional and nonlinear equations [54]. Numerical approximation of FDWEs is challenging due to the non-local nature of fractional derivatives, often resulting in dense coefficient matrices and high computational complexity. To address these limitations, we introduce a pseudospectral scheme based on Legendre cardinal functions. Compared to finite-difference and finite-element methods, spectral techniques provide higher accuracy with fewer degrees of freedom for smooth solutions. Unlike existing spectral approaches that rely on operational matrices requiring numerical integration, the present method exploits cardinal functions to eliminate integral evaluations and produce direct matrix representations of fractional operators. This leads to a highly accurate and computationally efficient scheme that significantly improves performance over existing methods. The remainder of this paper is organized as follows: Section 2 introduces Legendre cardinal functions (LCFs) and their key properties, along with matrix representations of fractional integral and Caputo fractional derivative operators. Section 3 details the numerical scheme for solving FDWEs using the pseudospectral approach, including convergence analysis. Section 4 presents numerical experiments and results. Finally, Section 5 provides concluding remarks and summarizes the study’s key findings. 2 Legendre Cardinal functions The eigenfunctions of the Sturm-Liouville problem: Are known as Legendre polynomials. These polynomials are associated with eigenvalues λn=n(n+1), where n is a non-negative integer. A closed-form expression for these polynomials is given by: This formula, derived from Rodrigues’ representation, ensures Pn(1)=1. Additionally, Legendre polynomials satisfy the three-term recurrence relation: These polynomials are orthogonal with respect to the L2 inner product over [−1,1]. where δn,n ′ is the Kronecker delta function. To extend Legendre polynomials to an arbitrary domain [a,b], we apply the transformation: Since Legendre polynomial roots lack closed-form expressions, numerical methods such as eigenvalue techniques or iterative approaches are used. These roots are real, distinct, and lie within [−1,1]. The corresponding roots for shifted Legendre polynomials are computed as: Consider the set of nodes {sn}n=0N as the roots of PN+1. The corresponding Legendre cardinal functions are defined by: Another approach to defining these functions involves selecting a grid based on the extrema of the polynomial PN*(s), supplemented with the interval endpoints. This grid, known as the Lobatto grid, is described as: For nodes selected from the Lobatto grid, the Legendre cardinal functions take the form: To visualize the spatial distribution of these nodes, Fig 1 provides a geometric representation of the shifted Legendre and Lobatto grids on the domain [0,1]×[0,1]. Unlike uniform grids, these grids naturally cluster near the boundaries. This clustering is a fundamental geometric property that bounds the interpolation Lebesgue constant, ensuring the spectral accuracy and stability of the proposed scheme. Geometric representation of the shifted Legendre and Lobatto grids on the domain [0,1] ⁎ [0,1]. The fundamental property of these functions is that they are cardinal, i.e., This property ensures that an N degree polynomial precisely interpolates data at N + 1 given points. It follows from [8] that any function sampled at N + 1 locations can be represented as: where 𝒬N:L2[a,b]→ΠN[a,b] acts as a projection mapping, where it projects functions from the L2 space onto the space of polynomials of degree at most N, denoted by ΠN[a,b]. Given Ω=[a,b]×[0,τ], assume that ΠN2(Ω) denotes the space of polynomials of degree at most N in both s and t. Using Legendre cardinal functions, a two-dimensional function u(s,t)∈L2(Ω) can be approximated as: where the coefficients are computed by un,n ′=u(sn*,tn ′*). Now, consider the weight function: wα,β(s)=(1−s)α(1+s)β, for β>−1. By defining the transformed weight functions: we introduce the two-dimensional weight function: The function space 𝐁α,βm(Ω) is introduced as in [55], equipped with the norm and semi-norm: in which 𝐬=(s,t), α=(α1,α2), β=(β1,β2), and 𝐞j represents the unit vectors in each coordinate direction. Furthermore, we have Throughout, C denotes a generic positive constant, which may vary between equations. Theorem 1. [56, Theorem 8.6]. If u∈𝐁0,0m(Ω) and 2≤m≤N+1, then the error in the polynomial approximation satisfies: where kmax=max{τ,b−a}. 2.1 Matrix representation of the derivative operator This section introduces a framework for introducing a matrix that is used to represent the derivative operative based on LCFs. As established in the literature (see, e.g.,), the leading coefficient of PN+1(s) is given by Differentiating this polynomial yields where the coefficient ρN+1,k is given by Utilizing equations (13) and (15), one can write an alternative representation of the LCFs (6) and (7) as where σ=κN𝒟s(PN+1*(s))s=sn*, and σ=−4ρN+1,1Γ(2N−1)(N−2)(b−a)NΓ(N+1)𝒟s((1−s2)𝒟s(PN*(s)))s=sn*, for [6] and [7], respectively. Differentiating both sides of [16] results in If 𝒟s(cn(s)) is approximated in terms of LCFs cn(s), it follows that Combining equations (17) and (18) leads to Now, consider the vector function ΨN(s), whose elements are defined by Using this vector notation, the derivative operator can be expressed in matrix form as where the entries of matrix D∈ℝ(N+1)×(N+1) are specified by equation (19). 2.2 Matrix representation of the fractional integral operator To express the fractional integral operator (FIO) in matrix form, it is first necessary to reformulate the LCFs [56]. Specifically, we have where the coefficients are defined as As a result, the LCFs can also be expressed in an alternative form Now, two cases can be considered as follows: Case 1: If a = 0, utilizing the definition of the FIO [57], it follows that Case 1: If a = 0, utilizing the definition of the FIO [57], it follows that Using [23] and the reformulated expression in [8], it results that Using [23] and the reformulated expression in [8], it results that Case 2: If a≠0, then Case 2: If a≠0, then where B represents the Beta function, and 2 F1 denotes the hypergeometric function, as defined in [58]. Thus, from [8] and [25], it follows that where B represents the Beta function, and 2 F1 denotes the hypergeometric function, as defined in [58]. Thus, from [8] and [25], it follows that Having established these formulations, the matrix representation of the FIO based on LCFs is given by where the coefficients Iaη(cn)(sn′) are computed using equations (24) and (26). Consequently, the matrix Iη∈R(N+1)×(N+1) is introduced such that with elements defined by 2.3 Matrix representation of the Caputo fractional derivative operator Consider a fractional order η∈R+ and define ν=⌈η⌉, where ⌈·⌉ denotes the ceiling function. The Caputo fractional derivative (CFD) operator, denoted as aC𝒟sη, can be expressed in terms of the fractional integral operator as 𝔗aν−η𝒟ν when η∉N0. Our objective is to construct a matrix 𝒟η∈ℝ(N+1)×(N+1) that satisfies the following relation: By substituting 𝔗aν−η𝒟ν in place of aC𝒟sη, we obtain: Consequently, without requiring additional computations, the matrix representation of the CFD operator is derived as: 3 Proposed algorithm To establish our proposed numerical method, we combine Equations (4) and (4), leading to the general formulation: Using Lemma 2.22 from [57] and applying the fractional integral to both sides of Equation (34), we derive the corresponding integral equation: where 1<η≤2, and the function y(s,t) is given by y(s,t)=tDt(u)(s,0)+u(s,0). To construct the proposed numerical scheme, we approximate the function u(s,t) using Legendre cardinal functions, viz., Substituting this approximation into Equation (35) yields: where y~(s,t)=𝒬N(y)(s,t) and q~(s,t)=𝒬N(q)(s,t). In matrix form, this equation can be rewritten as: where U,Y,G∈ℝ(N+1)×(N+1), and can be obtained as: The proposed approach is based on the collocation method, which ensures that the approximate solution satisfies the given equation at selected collocation points. This requires minimizing the residual function rN(s,t) at those points, leading to: Selecting nodes {sn*}n=0N as collocation points and employing the matrix representation of the fractional integral and derivative operators, we derive the following system of linear equations: Consequently, this formulation results in the linear system ΓU=G. To apply the boundary conditions, they are enforced by modifying the system as follows: where Fi∈ℝN′+1,1=0,…,3 are given by: Finally, by vectorizing the matrices Γ, U, and G into Γ―, U―, and G―, respectively, the problem reduces to solving the system: This system is effectively solved with the linsolve function in MATLAB (version 2022) to obtain the unknown coefficients {un,n ′} for 0≤n, n′≤N. This finishes the development of our suggested numerical approach. Remark 1. The proposed scheme pre-assembles all operator matrices and stores them for reuse. The differentiation matrix D is formed by evaluating cardinal functions and their derivatives at grid points, which requires O(N2) operations. The fractional integral matrix Iη, computed using explicit expressions [24–26] also costs O(N2). The Caputo matrix Dη=DνIν−η is obtained via a matrix product with complexity O(N3), performed once. After assembly, the dominant cost is solving the resulting linear system of size (N + 1)2, scaling as O(N6) using direct solvers. Due to spectral convergence, relatively small N values yield high accuracy, making the overall method computationally competitive despite its algebraic scaling. 3.1 Convergence analysis This section aims to prove that the proposed method is convergence. To this end, the bound introduced in [57] for the FIO will be required. This bound is presented as In more abstract form, the linear system (42) can be written as Consider eN=u−u~. Thus, it is not difficult to obtain Rearrange Equation (44) and taking norm both sides leads to The results of Theorem 1 that Thus, we conclude that as N→∞, provided that u,q∈𝐁0,0m(Ω) and 2≤m≤N+1. 3.2 Stability-analysis This subsection focuses on establishing a stability bound for the proposed pseudospectral method. Recall the integral form of the semi-discrete problem (cf. [48–52]): where U(t)∈Rm is the spectral coefficient vector (m = (N + 1)2), Y(t) and G(t) are vectors determined by the initial data and the source term, and A∈ℝm×m is the spatial operator matrix obtained from the differentiation matrices. Proposition 1. Assume that ‖A‖≤M for some constant M≥0, where ∥·∥ denotes the induced 2–norm. Define Then the numerical solution of (46) satisfies where Eη,1 denotes the Mittag–Leffler function. In particular, the scheme is stable on [0,T]. Proof. Rearranging (46) yields and thus It follows from that Taking into account u(t)=sup0≤s≤t‖U(s)‖, we obtain Applying the fractional Grönwall inequality (see [59]) yields This final inequality formally establishes the stability of the proposed scheme. Numerical stability requires that the approximate solutions remain bounded and depend continuously on the problem’s given data. In this formulation, the maximum norm of the numerical solution, u(t), is strictly controlled by the term a(t), which contains both the initial conditions Y(t) and the source term G(τ). The amplification factor is governed by the Mittag-Leffler function Eη,1(MtηΓ(η)). Because the Mittag-Leffler function is continuous, finite, and monotonically increasing for any finite time interval t∈[0,T], the numerical solution U(t) cannot experience unbounded growth provided the initial data and source terms remain bounded. Consequently, the proposed pseudospectral method is unconditionally stable in time on the interval [0, T], under the sole spatial condition that the differentiation matrix 𝒜 has a bounded induced 2-norm (||A||≤M). 4 Numerical results Two numerical examples are provided to demonstrate the effectiveness of the presented method. To calculate numerical order of convergence, we fit the exponential model So, the slope b tells us the rate of exponential decay. To find b, we use least squares where e:=L2−error at the given time. While CPU time offers a practical measure of efficiency, it is inherently hardware-dependent. To provide a robust, machine-independent measure of computational performance, we also evaluated the condition number (κ) of the global collocation matrix Γ¯. For the test problems, the condition number grows at a manageable polynomial rate with respect to N, rather than exponentially. This bounded growth ensures that the linear system in Equation (41) remains well-conditioned and can be solved accurately using standard direct solvers without severe round-off error amplification, further confirming the numerical stability of the proposed LCFs approach. Example 4.1. Consider the following second-order FDWE: The exact solution is in which Eη,2 specifies the Mittag-Leffler function. For η=2, the exact solution is Tables 1 and 2 demonstrate the method’s convergence with the choice of Jacobi and Lobatto grids, and confirm the convergence analysis presented in the previous section. These tables also report the computational time. One can observe that the error decreases as the number of bases N increases. Table 3 compares the proposed scheme with the Jacobi collocation method [18]. The results demonstrate that the presented method achieves superior accuracy compared to the Jacobi collocation method. Notably, the proposed method requires lower computational costs due to the cardinality properties of the basis functions. To visually validate the theoretical convergence analysis, Fig 2 plots the L2 errors on a logarithmic scale against the number of basis functions N for both the Jacobi (left) and Lobatto (right) grids. The distinctly linear downward trend observed on these semi-logarithmic plots visually confirms the exponential decay of the error. This steep negative slope demonstrates that spectral convergence is consistently achieved across various fractional orders (η). Furthermore, Fig 3 illustrates the physical behavior of the approximate solution at the final time t = 1 for varying choices of the fractional order η. The graph clearly demonstrates a smooth transition in the system’s dynamic response; as the fractional order η→2, the intermediate fractional diffusion-wave profile continuously converges toward the classical, integer-order wave equation solution. This confirms that the proposed pseudospectral scheme accurately captures the physical memory effects parameterized by η. Using the L2- errors at t = 1, we obtain b≈−0.722 for Jacobi grid and b≈−0.651 for Lobatto grid. This indicates exponential decay O(e−0.722N) and O(e−0.651N) for Jacobi and Lobatto grid, respectively. This confirms spectral convergence, consistent with the theoretical estimate in Theorem 1. 10.1371/journal.pone.0353233.t001Table 1The L2 – errors evaluated on the Jacobi grid with different N across various times, taking η=1.5. t\N 681012140.1 1.026e−05 8.432e−08 3.744e−07 6.807e−08 2.640e−08 0.2 3.474e−06 7.398e−07 2.039e−07 1.300e−08 2.244e−08 0.3 4.977e−06 7.269e−07 6.150e−08 1.954e−08 1.452e−08 0.4 1.107e−06 9.409e−08 6.806e−08 2.857e−08 1.139e−08 0.5 3.947e−06 5.338e−07 1.071e−07 2.897e−08 9.444e−09 0.6 9.469e−07 6.130e−08 4.832e−08 2.017e−08 7.980e−09 0.7 2.950e−06 4.064e−07 3.316e−08 9.477e−09 6.950e−09 0.8 1.618e−06 2.878e−07 7.245e−08 4.000e−09 6.944e−09 0.9 3.278e−06 1.685e−08 8.075e−08 1.266e−08 4.539e−09 1.0 7.774e−06 1.144e−06 2.440e−07 6.940e−08 2.403e−08 CPU time0.2971.6415.48419.35947.531Condition number36.9258155.7334550.251916904239.2 The L2 – errors evaluated on the Jacobi grid with different N across various times, taking η=1.5. 10.1371/journal.pone.0353233.t002Table 2The L2 – errors evaluated on the Lobatto grid with different N across various times, taking η=1.5. t\N 681012140.1 5.613e−06 2.583e−06 6.340e−07 9.575e−08 1.009e−07 0.2 1.482e−05 2.096e−07 5.974e−07 8.573e−08 5.082e−08 0.3 8.662e−06 2.120e−06 3.535e−07 1.443e−09 3.990e−08 0.4 5.439e−06 1.022e−07 1.351e−07 8.191e−08 3.945e−08 0.5 1.073e−05 1.544e−06 3.427e−07 1.003e−07 3.596e−08 0.6 4.530e−06 1.098e−07 9.207e−08 5.692e−08 2.731e−08 0.7 4.823e−06 1.146e−06 1.820e−07 4.686e−10 1.867e−08 0.8 6.507e−06 5.672e−08 2.020e−07 2.760e−08 1.504e−08 0.9 1.498e−06 6.281e−07 1.247e−07 1.743e−08 1.621e−08 1.0 4.838e−08 1.584e−08 3.544e−09 9.009e−10 2.658e−10 CPU time0.2811.3294.81216.12543.000Condition number53.6772258.4571941.98652715.66607.5 The L2 – errors evaluated on the Lobatto grid with different N across various times, taking η=1.5. 10.1371/journal.pone.0353233.t003Table 3Maximum absolute errors comparison at t = 0.8 between the presented and the Jacobi collocation methods, taking N = 8 and various choices of η, for Example 4.1.Method η=916 η=1316 η=1516 Presented methodJacobi grid 2.892e−07 2.161e−07 4.708e−08 Lobatto grid 1.811e−07 1.092e−07 2.283e−08 Other MethodsJacobi collocation method [?] (α=β=0) 3.55e−7 3.08e−7 1.06e−7 (α=β=1/2) 3.39e−7 2.96e−7 1.20e−7 Maximum absolute errors comparison at t = 0.8 between the presented and the Jacobi collocation methods, taking N = 8 and various choices of η, for Example 4.1. The L2 errors on a logarithmic scale against the number of basis functions N for both the Jacobi (left) and Lobatto (right) grids. Approximate solution at the final time t = 1 for varying choices of the fractional order η. Example 4.2. Consider the following fourth-order FDWE, with conditions The exact solution is u(s,t)=es(tη+3+t) [48]. Tables 4 and 5 demonstrate the convergence of the proposed method for Jacobi and Lobatto grids, respectively, validating the theoretical convergence analysis. The CPU time is also provided. The results indicate that increasing the number of basis functions N reduces the error. Table 6 compares the proposed scheme with the finite difference method [8]. The results show that the proposed approach yields higher accuracy than the finite difference technique. Fig 4 further reinforces the robustness of the proposed scheme for fourth-order spatial derivatives by plotting the L2 error decay for Example 4.2. Similar to the second-order case, the semi-logarithmic plots for both Jacobi and Lobatto grids exhibit a strict linear decline as N increases. This indicates that the exploitation of the cardinal basis functions maintains high-order spectral accuracy and numerical stability even when dealing with the more stringent continuity requirements of fourth-order fractional diffusion-wave equations. Using the L2- errors at t = 1, we obtain b≈−1.155 for Jacobi grid and b≈−3.451 for Lobatto grid. This indicates exponential decay O(e−1.155N) and O(e−3.451N) for Jacobi and Lobatto grid, respectively. This confirms spectral convergence, consistent with the theoretical estimate in Theorem 1. 10.1371/journal.pone.0353233.t004Table 4The L2 – errors evaluated on the Jacobi grid with different N across various times, taking η=1.5. t\N 791113150.15.891e – 062.833e – 075.396e – 083.384e – 102.002e – 090.26.475e – 065.825e – 083.416e – 083.994e – 096.544e – 100.31.115e – 062.026e – 072.903e – 082.938e – 098.832e – 110.46.145e – 062.284e – 071.756e – 081.460e – 091.337e – 110.51.541e – 067.705e – 094.720e – 108.176e – 111.835e – 110.63.395e – 061.908e – 071.362e – 081.097e – 099.817e – 120.72.491e – 061.273e – 071.730e – 081.636e – 094.682e – 110.87.255e – 062.498e – 081.520e – 081.591e – 092.399e – 100.93.126e – 061.205e – 071.698e – 088.932e – 114.614e – 101.01.712e – 055.701e – 075.445e – 088.220e – 091.664e – 09CPU time0.2500.4691.2973.9388.922Condition number47.08153.88907.731769.203798.5 The L2 – errors evaluated on the Jacobi grid with different N across various times, taking η=1.5. 10.1371/journal.pone.0353233.t005Table 5The L2 – errors evaluated on the Lobatto grid with different N across various times, taking η=1.5. t\N 791113150.14.005e – 067.486e – 072.346e – 081.355e – 082.754e – 090.21.051e – 055.259e – 073.388e – 081.298e – 083.276e – 100.36.393e – 062.124e – 076.270e – 081.012e – 087.629e – 100.41.204e – 055.723e – 075.142e – 085.585e – 094.487e – 100.51.120e – 061.075e – 081.097e – 092.036e – 104.905e – 110.68.758e – 064.654e – 073.964e – 084.170e – 093.274e – 100.73.234e – 061.339e – 073.682e – 085.554e – 093.987e – 100.88.963e – 062.632e – 071.472e – 085.043e – 091.172e – 100.95.194e – 062.920e – 077.092e – 093.426e – 096.080e – 101.04.521e – 061.010e – 081.222e – 119.154e – 154.635e – 18CPU time0.1720.3911.2813.1097.890Condition number52.61161.02867.292801.487058.5 The L2 – errors evaluated on the Lobatto grid with different N across various times, taking η=1.5. 10.1371/journal.pone.0353233.t006Table 6Maximum absolute errors comparison at t = 1 between the presented and the finite difference methods, taking N = 8 and various choices of η, for Example 4.2.Method η=1.3 η=1.5 η=1.8 Presented methodJacobi grid3.078e – 063.516e – 061.924e – 06Lobatto grid2.054e – 062.038e – 061.982e – 06Other MethodsFinite difference method [?] τ=1/20 6.9679e – 42.2181e – 31.1377e – 2 τ=1/40 2.1513e – 47.8800e – 44.993e – 3 τ=1/80 6.6381e – 52.7933e – 42.1822e – 3 Maximum absolute errors comparison at t = 1 between the presented and the finite difference methods, taking N = 8 and various choices of η, for Example 4.2. The L2 errors obtained from using Jacobi grid% (left) and Lobatto grid (right) for Example 4.2. Example 4.3. Consider the following second-order FDWE The exact solution is u(s,t)=tρsin(πx). Because ρ−η<0, the Caputo derivative behaves like tρ−η and is singular at t = 0. Table 7 is tabulated to show the ability of the method for solving FDWE and illustrate the effect of the weak singularity. As we observe, because the assumed smoothness condition for the problem is violated here, the convergence speed is very slow. However, due to the concentration of Jacobian roots at the origin, the method has managed to solve this type of problem. To achieve better accuracy, we need to increase the number of roots, which will ultimately entail a high computational cost. 10.1371/journal.pone.0353233.t007Table 7L2- errors in Jacobi grid, taking η=15/8 and ρ=1.2, for Example 4.3.t = 0.3t = 0.5t = 0.7t = 0.9N = 16 2.56e−02 2.61e−02 1.56e−02 7.61e−05 N = 32 1.65e−02 1.68e−02 1.10e−02 4.18e−05 N = 64 6.26e−03 7.87e−03 7.81e−03 2.29e−05 L2- errors in Jacobi grid, taking η=15/8 and ρ=1.2, for Example 4.3. Comparison with existing methods Tables 3 and 6 compare the proposed pseudospectral method with representative existing techniques: the Jacobi collocation spectral method [44] and finite-difference schemes for fourth-order FDWEs [48]. For the test problems, the proposed method achieves lower maximum absolute errors at the same number of spatial basis functions N. The cardinal Legendre basis’s interpolation properties, which provide spectral-type convergence for smooth solutions, are directly responsible for this behavior. In terms of efficiency, the cardinal property of the basis functions eliminates the need for numerical integration when assembling fractional operator matrices. Consequently, operator matrices are assembled once and reused during computation, reducing assembly overhead compared with methods that compute operational matrices entry-by-entry via numerical quadrature. CPU times reported in Tables 1–6 confirm that the present approach is computationally competitive. We remark, however, that the principal advantage of our method is most pronounced for problems with smooth spatial dependence, where spectral accuracy reduces required spatial degrees of freedom. For problems exhibiting temporal singularities (e.g., weak initial-time singularity), temporal discretization must be carefully chosen (e.g., graded meshes or nonuniform time-stepping (See, e.g., [60,61]) to preserve convergence. 5 Conclusion This work introduces Legendre cardinal functions and presents a numerical scheme based on the pseudospectral method to solve second and fourth-order fractional diffusion-wave equations. Using Jacobi and Lobatto grids, the Legendre cardinal functions are constructed while satisfying the cardinality condition, a crucial property of such functions. To reduce computational load, matrix representations of the Caputo fractional derivative (CFD) and fractional integral operators are derived. The proposed scheme transforms the governing equations into corresponding integral equations and solves them using the pseudospectral method. Numerical experiments confirm the theoretical convergence analysis, demonstrating that the method provides highly accurate solutions. Comparisons with existing methods reveal that the proposed approach offers superior accuracy and computational efficiency. Another advantage of this method is its simplicity of implementation. The technique can be extended, with minor modifications, to solve a broad class of linear and nonlinear fractional differential equations, enhancing its applicability in mathematical modeling. It should be emphasized that the assumptions of smoothness in time near t = 0 made in Examples 1–2 may not hold in many realistic fractional‐order applications. When a weak singularity at the initial time is present, specialized time‐ discontinuations (graded, nonuniform, adaptive) are recommended. The present spectral spatial approach is compatible with such time‐stepping strategies and we plan to explore this in future work. Looking toward future research directions, we plan to extend the proposed Legendre cardinal function framework to address several existing challenges in fractional modeling. First, to mitigate the loss of spectral accuracy caused by weak singularities at the initial time—a common occurrence in realistic fractional-order applications—we intend to integrate our spatial pseudospectral scheme with advanced temporal discretizations, such as graded meshes and adaptive time-stepping algorithms. Second, we aim to generalize this approach to solve nonlinear fractional diffusion-wave equations and extend the mathematical formulation to handle two- and three-dimensional spatial domains. Finally, exploring the application of this method to variable-order fractional models presents a promising avenue, as these models are increasingly required to describe dynamic, time-varying memory effects in highly heterogeneous materials.