1. Introduction
The classical heat equation [
1,
2] shows how heat conduction is distributed in a rod, or each region over a given time. It is of fundamental importance in diverse scientific fields. In mathematics, it is used in the prototypical parabolic partial differential equation (PDE). In probability theory, the heat equation relates to the study of Brownian motion via the Fokker–Planck equation. In financial mathematics, it is used to solve the Black–Scholes PDE. The diffusion equation, a more general version of the heat equation, arises in connection with the study of chemical diffusion and other related processes.
The stochastic heat equation (SHE) is also a mathematical model that characterizes the distribution of heat in a medium over time, influenced by random fluctuations or noise. Unlike the classical heat equation, which is deterministic, the stochastic version includes a random forcing term, representing the inherent uncertainties in real-world systems, such as thermal noise. Moreover, these stochastic terms are essential for capturing the effects of randomness, which are important in various physical and mathematical systems, such as those affected by thermal fluctuations or other unpredictable forces. The stochastic heat equation combines aspects of partial differential equations with stochastic processes and provides an important tool in different fields like engineering, physics, finance, and biology [
3]. The inclusion of the stochastic term makes solving the stochastic partial differential equations analytically much more complex. Therefore, numerical algorithms will be necessary to investigate their approximate solutions such as the ten non-polynomial cubic-spline (TNPCS) method [
4,
5], the Chebyshev wavelets with the Galerkin method [
6], the Legendre polynomials together with the operational-matrix of integration [
7], the finite difference approximation combined with the stochastic exponential method [
8,
9], spectral stochastic methods [
10], quadratic spline approach [
11], homotopy analysis method [
12,
13], Pickard method [
13], finite difference (FD) and finite element methods [
14,
15], Tau FD approach [
16], collocation method [
17], collocation-Galerkin method [
18], etc.
The compact finite difference (CFD) method is widely used to solve some types of the differential equations by converting them to a system of equations and solving it by the matrix inversion or any other methods [
19,
20]. Recently, instead of using the classical CFD schemes directly, a fast discrete Fourier transforms (FDFT) has been applied to the CFD schemes to construct new representations for the first-order, and higher-order derivatives. The FDFT method is applied, in the form of sine transforms, to the 4th-order or 6th-order CFD approach to approximate the second derivatives and used them to solve some types of the differential equations like Helmholtz equation [
21], and Poisson equation [
22,
23,
24]. On the contrary, it faces a real problem when trying to approximate the odd derivatives and as a result, it cannot be used for the differential equations that contain any odd derivatives. Following numerous attempts, we have managed to resolve this situation by using another form of the FDFT based on exponential transforms [
25]. This combination between the sine and exponential transforms has been established in this study to solve the following two forms of the one-dimensional SHE as defined in [
5,
6] as:
or,
where
is the unknown function,
,
,
and
are arbitrary constants. Also,
is the Gaussian white-noise which represents a generalized derivative of the Wiener process
with zero expectation and variance
Definition 1 (Wiener process) [26]. In mathematics, Brownian motion is also often called the Wiener process, and it is a continuous-time stochastic process characterized by the following: Zero initial value:
;
Independent increments: the change
is independent of the past;
Normal distribution of increments:
;
With probability one,
is continuous but not differentiable.
Our paper is organized as follows: The compact finite difference approach and the fast discrete Fourier transforms are introduced in
Section 2 and
Section 3. In
Section 4, we show how to apply the proposed technique for the one-dimensional SHE.
Section 5 provides the approximate solutions of the presented two cases. Finally, the conclusion is illustrated in
Section 6.
2. Compact Finite Difference Scheme
Within this section, the 6th-order compact finite difference (CFD) algorithm is investigated for the first and the second order derivatives, respectively. To begin firstly, consider we have a uniform grid with subintervals, where is the space step and .
Secondly, the general formula of CFD approach for the 1st derivative, by using five internal nodes, can be defined as [
21,
22,
23,
24,
25]:
where
,
and
are the constants to be determined. Applying Taylor’s approximations to Equation (3), we get the 4th order CFD approximation when
and
. The 6th order CFD approximation is obtained at
,
and
. Thus, 6th order CFD scheme for
is:
Thirdly, the general formula of CFD approach for the 2nd derivative is defined as [
21,
22,
23,
24,
25]:
where
,
and
are the constants to be determined. Applying Taylor’s approximations to Equation (5), hence the 4th order CFD approximation can be achieved when
and
. Also, the 6th-order CFD approximation is given at
,
and
. Thus, 6th order CFD scheme for
is:
3. Structure of CFD Scheme Based on Fast Discrete Fourier Transforms
In this context, the fast discrete Fourier transforms (FDFT) are applied to the CFD schemes discussed in
Section 2, to derive new representations for the first and the second order derivatives. For this purpose, we need to construct a uniform mesh with
nodes,
where
is the space step,
,
and
. Also, taking into consideration the 6th order CFD Equations (4) and (5), then
The one-dimensional (1D) discrete sine transforms (DST) for
and its inverse for
are given as in [
21,
22,
24] as follows:
Applying (9) to Equation (8) leads to
Since the discrete sine transform failed to determine an approximation for
using Equation (7). Thus, we need to define another formula of discrete Fourier transform to achieve this approximation, which can be obtained by using the discrete exponential transforms (DET) defined as:
Applying (12) to Equation (7) leads to
Since
,
, and
, then
since the expression
exists in both sides of the above equation, then by expanding it and comparing the terms at each value of
. Hence, the next formula can be used to represent the above equation at any value of
:
4. Numerical Approximations of the Stochastic Heat Equations
In this section, we show how to use the fast discrete sine and exponential transforms to solve the two given formulas of the stochastic heat equations in one dimension. To begin, consider
, where
is the time step, and
. Also, assume that
,
,
,
and
; then, Equations (1) and (2) can be written as:
or,
Then, by using the finite difference (FD),
and
can be represented numerically for
and
as:
, and
. In addition, applying the Crank–Nicolson (CN) method to Equations (15) and (16),
or,
Assume that
and
.
Then, Equations (17) and (18) can be reduced to the following forms
or,
In addition, by discretizing Equations (19) and (20), we obtain
or,
Utilizing the inverse-Fourier transform for Equations (21) and (22),
or,
Now, applying the approximations of
and
from Equations (19) and (22) into Equations (23) and (24), we have
or,
Equations (19) and (20) can be solved by the following fast algorithm
for , and
:
To obtain the solution of the given SHEs (1) and (2), it is essential to apply a variety of Wiener process samples. As a result, the above iterative fast algorithm should be executed times, as detailed below:
Firstly, obtain
:
Secondly, obtain
:
Thirdly, obtain
for type I SHE:
Similarly, for type II SHE:
Finally, the solution of the SHES (1.1) or (1.2) is:
The above iterative scheme of Equations (32)– (36) can be solved for and , and the same procedure can be performed for . Hence, we can obtain the expectation and the variance of the solution-sequences for the given stochastic heat Equations (1) and (2).
5. Numerical Results
Figure 1,
Figure 2,
Figure 3,
Figure 4,
Figure 5 and
Figure 6 illustrate the expectation and the variance for three stochastic heat equations of the form specified in Equation (1), using parameters set to
,
, and utilizing about 2000 samples of
. These figures clearly show the behaviour of the solutions, capturing both expected values and the associated variances under the influence of noise.
Figure 7,
Figure 8,
Figure 9,
Figure 10 and
Figure 11 extend this analysis to two stochastic heat equations characterized by Equation (2), with parameters set to
and
, and utilizing about 2000 samples of
. The visual representation of these results emphasizes the robustness of our method in handling stochastic variability.
Table 1,
Table 2,
Table 3 and
Table 4 provide a detailed comparison of the numerical results generated using the STNPCS [
4,
5,
27] technique and the Fourier transform [
28,
29,
30]. These tables quantitatively demonstrate that our proposed method significantly reduces computational time and effort. Specifically, the FDFT method consistently outperformed the STNPCS technique in terms of processing speed while maintaining a high level of accuracy.
One of the key advantages of the suggested method is its stability in the presence of increased noise. As the number of samples from the noise term rises, our approach remains reliable and produces consistent results across all five problems analysed. This stability is crucial for practical applications, where uncertainty is inherent.
Overall, the present data indicate that the FDFT algorithm is not only faster and more efficient but also enhances the reliability of numerical solutions for stochastic heat equations. This underscores the method’s potential for broader application in complex systems requiring real-time or high-frequency computations. All calculations were performed using Mathematica 12.1, ensuring a robust computational environment for our analysis.
Problem 1. Consider the 1D SHE [
5,
31]
is: Figure 1 showed the mean of solutions for Problem 1, while
Figure 2 illustrated a very small variance of solutions given by FDFT and STNPCS methods which indicated that the solutions using FDFT are more accurate. Also, a comparison of solutions between different methods is given in
Table 1.
Problem 2. Consider the 1D SHE [
5,
31]
is: The mean of solutions for Problem 2 is obtained by the present technique and visualized in
Figure 3. The FDFT and STNPCS methods introduced its solutions in
Table 2, and an
variance of solutions in
Figure 4.
Problem 3. Consider the 1D SHE [
5,
31]
is: The mean of solutions for Problem 3 is given by the proposed method in
Table 3 and visualized in
Figure 5. Also, an
variance of solutions is shown in
Figure 6.
Problem 4. Consider the 1D SHE [
6]
is:
and its exact solution for is: .
For
, the FDFT method gave the solution of the deterministic heat equation in Problem 4 with an
absolute error as shown in
Table 5 and
Figure 7. Furthermore, the mean and the variance of solutions are given in
Table 4 and
Figure 8 and
Figure 9 for
.
Problem 5. Consider the 1D SHE [
6]
is:and its exact solution for is: .
The present method obtained the solution of the deterministic heat equation in Problem 5 with an
absolute error as visualized in
Table 6 and
Figure 10 for
, Furthermore, the mean of solutions for
is shown in
Figure 11.
In our study, the deterministic components exhibit a higher convergence rate compared to the stochastic components. This difference is attributed to the inherent complexity introduced by the stochastic term, which involves the Wiener process. For the deterministic part, the numerical method leverages the sixth-order CFD scheme, which ensures a high-order accuracy for smooth components of the solution. The convergence analysis confirms that the deterministic components converge with an expected order of .
In contrast, the stochastic component introduces randomness, which leads to increased variability and slower convergence. The discretization of the stochastic term relies on the Crank–Nicolson approach, combined with FDFT for efficient computation. The stochastic component is governed by the white noise and as noted in the simulations, converges at a rate consistent with , as influenced by the interplay between the noise and numerical scheme.
These differences are visually evident in
Figure 2,
Figure 4 and
Figure 6, where the variance associated with the stochastic component is more prominent. This highlights the trade-off between the accuracy of deterministic and stochastic contributions, a factor intrinsic to solving stochastic differential equations.
6. Conclusions
In conclusion, compact finite difference (CFD) methods are widely employed to obtain the solution of various types of partial differential equations by discretizing them into systems of linear equations, which are typically solved through matrix inversion—a process that can be time-consuming, particularly for larger systems. This work introduces an innovative algorithm based on the sixth-order CFD approach, specifically designed for solving stochastic heat equations. By utilizing fast discrete Fourier transforms (FDFT) instead of traditional matrix inversion, our approach significantly enhances computational efficiency and effectiveness.
The importance of this method lies not only in its speed but also in its versatility, as the FDFT can be readily adapted for higher-dimensional problems. This capability opens new avenues for exploration, positioning our algorithm as a valuable tool in the numerical analysis of complex systems.
Looking ahead, we aim to extend our method to encompass fractional stochastic heat equations, which are vital for modelling processes exhibiting memory effects. Additionally, we plan to investigate its application within fuzzy environments, where uncertainty plays a critical role. These future directions will enhance the robustness and applicability of our method, further contributing to advancements in computational techniques for solving stochastic partial differential equations.
The fast discrete Fourier transform can be extended extend to solve the two-dimensional (2D) problems as follows:
Firstly, the 6th order CFD scheme of Equation (8) in 2D, are obtained:
Secondly, the 2D discrete sine transform for
and its inverse for
are defined as follows:
Applying (45) to Equation (43) leads to
Similarly, applying (45) to Equation (44) and after simplifications, we have
Also, the fast discrete Fourier transform can be extended extend to solve the three-dimensional (3D) problems as follows:
Firstly, the 6th order CFD scheme of Equation (8) in 3D, are obtained:
Secondly, the 3D discrete sine transform for
and its inverse for
are defined as follows:
Applying (52) to Equations (49)– (51), and after simplifications, we obtain
Author Contributions
A.G.K.: Conceptualization, supervision, investigation, validation, mathematical, writing original draft and formal analysis. M.S.S.: Mathematical analysis, investigation, validation, formal analysis, parameter estimation, optimal control, sensitivity analysis, cost effectiveness, writing original draft, writing review and editing. D.A.H.: Investigation and validation. A.F.F.: Formal analysis, investigation, Literature review, review and editing. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Data Availability Statement
No Data included in this article.
Acknowledgments
This study is supported via funding from Prince Sattam bin Abdulaziz University project number (PSAU/2024/R/1446).
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Hassan Khabir, M. Cubic B-spline Collocation Method for One-Dimensional Heat Equation. Pure Appl. Math. J. 2017, 6, 51. [Google Scholar] [CrossRef]
- Iqbal, M.; Zainuddin, N.; Daud, H.; Kanan, R.; Jusoh, R.; Ullah, A.; Khan, I.K. Numerical Solution of Heat Equation using Modified Cubic B-spline Collocation Method. J. Adv. Res. Numer. Heat Transf. 2024, 20, 23–35. [Google Scholar] [CrossRef]
- Da Prato, G.Z.J. Stochastic Equations in Infinite Dimensions, 2nd ed.; Cambridge University Press: Cambridge, UK, 2014. [Google Scholar]
- Hammad, D.A.; Semary, M.S.; Khattab, A.G. Ten non-polynomial cubic splines for some classes of Fredholm integral equations. Ain Shams Eng. J. 2022, 13, 101666. [Google Scholar] [CrossRef]
- Fareed, A.F.; Khattab, A.G.; Semary, M.S. A novel stochastic ten non-polynomial cubic splines method for heat equations with noise term. Partial Differ. Equ. Appl. Math. 2024, 10, 100677. [Google Scholar] [CrossRef]
- Heydari, M.H.; Hooshmandasl, M.R.; Barid Loghmani, G.; Cattani, C. Wavelets Galerkin method for solving stochastic heat equation. Int. J. Comput. Math. 2016, 93, 1579–1596. [Google Scholar] [CrossRef]
- Uma, D.; Jafari, H.; Raja Balachandar, S.; Venkatesh, S.G. An Approximation Method for Stochastic Heat Equation Driven by White Noise. Int. J. Appl. Comput. Math. 2022, 8, 274. [Google Scholar] [CrossRef]
- Anton, R.; Cohen, D.; Quer-Sardanyons, L. A fully discrete approximation of the one-dimensional stochastic heat equation. IMA J. Numer. Anal. 2020, 40, 247–284. [Google Scholar] [CrossRef]
- Fareed, A.F.; Semary, M.S.; Hassan, H.N. Two semi-analytical approaches to approximate the solution of stochastic ordinary differential equations with two enormous engineering applications. Alex. Eng. J. 2022, 61, 11935–11945. [Google Scholar] [CrossRef]
- Nouy, A. Recent developments in spectral stochastic methods for the numerical solution of stochastic partial differential equations. Arch. Comput. Methods Eng. 2009, 16, 251–285. [Google Scholar] [CrossRef]
- Moghaddam, B.P.; Mostaghim, Z.S.; Pantelous, A.A.; Machado, J.A.T. An integro quadratic spline-based scheme for solving nonlinear fractional stochastic differential equations with constant time delay. Commun. Nonlinear Sci. Numer. Simul. 2021, 92, 105475. [Google Scholar] [CrossRef]
- Hamed, M.; El-Twail, M.A.; El-Desouky, B.; El-Beltagy, M.A. Solution of Nonlinear Stochastic Langevin’s Equation Using WHEP, Pickard and HPM Methods. Appl. Math. 2014, 5, 398–412. [Google Scholar] [CrossRef]
- El-Tawil, M.A.; Fareed, A.F. Solution of Stochastic Cubic and Quintic Nonlinear Diffusion Equation Using WHEP, Pickard and HPM Methods. Open J. Discret. Math. 2011, 1, 6–21. [Google Scholar] [CrossRef]
- Gerencsér, M.; Gyöngy, I. Finite Difference Schemes for Stochastic Partial Differential Equations in Sobolev Spaces. Appl. Math. Optim. 2015, 72, 77–100. [Google Scholar] [CrossRef]
- Boulakia, M.; Genadot, A.; Thieullen, M. Simulation of SPDEs for Excitable Media Using Finite Elements. J. Sci. Comput. 2015, 65, 171–195. [Google Scholar] [CrossRef]
- Youssri, Y.H.; Muttardi, M.M. A Mingled Tau-Finite Difference Method for Stochastic First-Order Partial Differential Equations. Int. J. Appl. Comput. Math. 2023, 9, 14. [Google Scholar] [CrossRef]
- Babaei, A.; Jafari, H.; Banihashemi, S. A collocation approach for solving time-fractional stochastic heat equation driven by an additive noise. Symmetry 2020, 12, 904. [Google Scholar] [CrossRef]
- Masti, I.; Sayevand, K. On collocation-Galerkin method and fractional B-spline functions for a class of stochastic fractional integro-differential equations. Math. Comput. Simul. 2024, 216, 263–287. [Google Scholar] [CrossRef]
- Hammad, D.A.; El-Azab, M.S. A 2N order compact finite difference method for solving the generalized regularized long wave (GRLW) equation. Appl. Math. Comput. 2015, 253, 248–261. [Google Scholar] [CrossRef]
- Hammad, D.A.; El-Azab, M.S. 2N order compact finite difference scheme with collocation method for solving the generalized Burger’s-Huxley and Burger’s-Fisher equations. Appl. Math. Comput. 2015, 258, 296–311. [Google Scholar] [CrossRef]
- Biazar, J.; Asayesh, R. An efficient high-order compact finite difference method for the Helmholtz equation. Comput. Methods Differ. Equ. 2020, 8, 553–563. [Google Scholar] [CrossRef]
- Wang, H.; Zhang, Y.; Ma, X.; Qiu, J.; Liang, Y. An efficient implementation of fourth-order compact finite difference scheme for Poisson equation with Dirichlet boundary conditions. Comput. Math. Appl. 2016, 71, 1843–1860. [Google Scholar] [CrossRef]
- Hosseinverdi, S.; Fasel, H.F. A fourth-order accurate compact difference scheme for solving the three-dimensional poisson equation with arbitrary boundaries. In AIAA Scitech 2020 Forum; American Institute of Aeronautics and Astronautics Inc., AIAA: Reston, VA, USA, 2020; Volume 1, Part F. [Google Scholar] [CrossRef]
- Gatiso, A.H.; Belachew, M.T.; Wolle, G.A. Sixth-order compact finite difference scheme with discrete sine transform for solving Poisson equations with Dirichlet boundary conditions. Results Appl. Math. 2021, 10, 100148. [Google Scholar] [CrossRef]
- Liao, F.; Zhang, L.-M. High accuracy split-step finite difference method for Schrödinger-KdV equations. Commun. Theor. Phys. 2018, 70, 413. [Google Scholar] [CrossRef]
- Särkkä, S.; Solin, A. Applied Stochastic Differential Equations; Cambridge University Press: Cambridge, UK, 2019. [Google Scholar] [CrossRef]
- Hammad, D.A.; Semary, M.S.; Khattab, A.G. Parametric quintic spline for time fractional Burger’s and coupled Burgers’ equations. Fixed Point Theory Algorithms Sci. Eng. 2023, 2023, 9. [Google Scholar] [CrossRef]
- Fang, L.; Ma, L.; Ding, S.; Zhao, D. Finite-time stabilization for a class of high-order stochastic nonlinear systems with an output constraint. Appl. Math. Comput. 2019, 358, 63–79. [Google Scholar] [CrossRef]
- Chen, W.; Fu, Z.; Grafakos, L.; Wu, Y. Fractional Fourier transforms on Lp and applications. Appl. Comput. Harmon. Anal. 2021, 55, 71–96. [Google Scholar] [CrossRef]
- Yang, Y.; Wu, Q.; Jhang, S.T.; Kang, Q. Approximation Theorems Associated with Multidimensional Fractional Fourier Transform and Applications in Laplace and Heat Equations. Fractal Fract. 2022, 6, 625. [Google Scholar] [CrossRef]
- Roozbahani, M.M.; Aminikhah, H.; Tahmasebi, M. Numerical multi-scaling method to solve the linear stochastic partial differential equations. Comput. Appl. Math. 2018, 37, 5527–5541. [Google Scholar] [CrossRef]
| 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. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).