Comparative Analysis of Finite Difference Method and Neural Network Models for Solving the One-Dimensional Heat Equal
DOI:
https://doi.org/10.5281/zenodo.17411006Keywords:
Heat Equation, Finite Difference Method (FDM), Neural Network (NN), Data-Driven ModelingAbstract
This study explores the capability of a simple feedforward neural network (NN) to approximate the one-dimensional heat equation traditionally solved by the Finite Difference Method (FDM). Using data generated from a stable FTCS scheme, the NN was trained to map spatial–temporal inputs (x, t) to temperature outputs u(x, t). The model achieved a mean squared error of 4.6×10⁻⁵, accurately reproducing the FDM temperature distribution with minor deviations near the boundary at x = 1. While the NN’s inference time (0.827 s) exceeded that of FDM (0.018 s), it demonstrated strong generalization and reusability across finer grids, suggesting potential scalability for high-dimensional and real-time applications. The findings indicate that even a basic data-driven NN can closely emulate classical numerical solvers, bridging conventional and machine-learning-based approaches to partial differential equations. Future work will extend the model to higher-dimensional PDEs and incorporate physics-informed neural networks (PINNs) for improved boundary precision and physical consistency.
References
Esposito, S. (2023). Reconstructing the early history of the theory of heat through Fourier’s experiments. European Journal of Physics, 44(5), 055101.
Raissi, M., Perdikaris, P., & Karniadakis, G. E. (2019). Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. Journal of Computational Physics, 378, 686–707.
Blechschmidt, J., & Ernst, O. G. (2021). Three ways to solve partial differential equations with neural networks—A review. arXiv preprint arXiv:2102.11802.
LeVeque, R. J. (2007). Finite difference methods for ordinary and partial differential equations: Steady-state and time-dependent problems. SIAM. https://dl.acm.org/citation.cfm?id=1355322
Brunton, S. L., & Kutz, J. N. (2024). Promising directions of machine learning for partial differential equations. Nature Computational Science, 4(7), 483–494.
Jalili, D., Jang, S., Jadidi, M., Giustini, G., Keshmiri, A., & Mahmoudi, Y. (2023). Physics-informed neural networks for heat transfer prediction in two-phase flows. International Journal of Heat and Mass Transfer, 221, 125089. https://doi.org/10.1016/j.ijheatmasstransfer.2023.125089
Yuan, L., Ni, Y., Deng, X., & Hao, S. (2022). A-PINN: Auxiliary physics-informed neural networks for forward and inverse problems of nonlinear integro-differential equations. Journal of Computational Physics, 462, 111260. https://doi.org/10.1016/j.jcp.2022.111260
Pan, N., Ye, X., Xia, P., & Zhang, G. (2024). The temperature field prediction and estimation of Ti–Al alloy twin-wire plasma arc additive manufacturing using a one-dimensional convolution neural network. Applied Sciences, 14(2), 661. https://doi.org/10.3390/app14020661
Nikolaienko, T., Patel, H., Panda, A., Joshi, S. M., Jaso, S., & Kalyanaraman, K. (2024). Physics-informed neural networks need a physicist to be accurate: The case of mass and heat transport in Fischer–Tropsch catalyst particles. arXiv preprint arXiv:2411.10048. https://doi.org/10.48550/arxiv.2411.10048
Hundiwale, A., Gaikwad, L., & Joshi, S. (2024). Journal of Heat and Mass Transfer Research. Journal of Heat and Mass Transfer Research, 12(1), 61–72.
Liang, S., & Yang, H. (2025). Finite expression method for solving high-dimensional partial differential equations. Journal of Machine Learning Research, 26(138), 1–31.
Diehl, P., Brandt, S. R., Morris, M., Gupta, N., & Kaiser, H. (2023). Benchmarking the parallel 1D heat equation solver in Chapel, Charm++, C++, HPX, Go, Julia, Python, Rust, Swift, and Java. arXiv preprint arXiv:2307.01117. https://doi.org/10.48550/arxiv.2307.01117
Raissi, M., Perdikaris, P., & Karniadakis, G. E. (2019). Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. Journal of Computational Physics, 378, 686–707. https://doi.org/10.1016/j.jcp.2018.10.045
Prince, S. J. (2023). Understanding deep learning. MIT Press.
Arendt, W., & Urban, K. (2023). Partial differential equations: An introduction to analytical and numerical methods (Vol. 294). Springer Nature.
Goodfellow, I., Bengio, Y., & Courville, A. (2016). Deep learning. MIT Press.
Pérez, M. (2022, July). An investigation of ADAM: A stochastic optimization method. In Proceedings of the 39th International Conference on Machine Learning (pp. 17–23). Baltimore, MD, USA.
Mishra, S., & Molinaro, R. (2023). Estimates on the generalization error of physics-informed neural networks for approximating PDEs. IMA Journal of Numerical Analysis, 43(1), 1–43.
Lu, J., Shen, Z., Yang, H., & Zhang, S. (2021). Deep network approximation for smooth functions. SIAM Journal on Mathematical Analysis, 53(5), 5465–5506. https://doi.org/10.1137/20m134695x
Mitra, P., Haghshenas, M., Santo, N. D., Daly, C., & Schmidt, D. P. (2023). Improving CFD simulations by local machine-learned correction. arXiv preprint arXiv:2305.00114. https://doi.org/10.48550/arxiv.2305.00114
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Ziyang Zhang

This work is licensed under a Creative Commons Attribution 4.0 International License.
