INTERNATIONAL JOURNAL OF RESEARCH AND SCIENTIFIC INNOVATION (IJRSI)
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue IX September 2025
www.rsisinternational.org
Page 4591
Numerical Solution of Heat Equation by Variational Iteration
Method
Haziem M. Hazaimeh
Umm Al Quwain University
DOI: https://dx.doi.org/10.51244/IJRSI.2025.120800416
Received: 16 September 2025; Accepted: 24 September 2025; Published: 23 October 2025
ABSTRACT
In this article, we study the one-dimensional heat equation, which models the diffusion of heat through a
medium over time. To solve this equation numerically, we employ He’s Variational Iteration Method (VIM), a
semi-analytical technique particularly effective for problems where exact solutions are intractable. The VIM
relies on a correction functional that iteratively minimizes the equation’s residuals using a Lagrange multiplier.
By repeating this process until convergence is achieved, we obtain an approximate solution to the heat
equation.
Keywords: Heat equation, numerical solution, variational iteration method, Lagrange multiplier.
INTRODUCTION
The Variational Iteration Method (VIM) is a mathematical technique used to approximate solutions to
nonlinear ordinary and partial differential equations. The main idea from using VIM is to construct an iterative
series solution that converges to the exact solution of the given equation. It has been successfully applied in
various fields of science and engineering, including physics, mechanics, biology, and finance. Many authors
studied the VIM to solve linear and nonlinear ordinary and partial differential equations. For example, J.H. He
was the first author who introduced the VIM and in [1] He shown that for the approximation solution, the VIM
applicable to delay differential equations. In addition, He [2] proposed a new iteration technique to solve
autonomous ordinary differential systems. Also, He and Wu [3] reviewed the development in the use of VIM.
They said that VIM has been applied to various nonlinear problems. Lu [4] proved that the VIM is introduce to
solve a nonlinear equation of second-order boundary value problem. Sontakke, Shelke, and Shaikh [5] used
He’s VIM to obtain the approximation solutions of time fractional PDEs. Tatari and Dehghan [6] considered
He’s VIM for solving second order IVPs (initial value problems). They solved several PDEs by using this
approach. Wazwaz [7] used the VIM for analytic treatment of the linear and nonlinear ODEs in both cases
homogeneous and nonhomogeneous. Wazwaz [8] applied the VIM for solving linear and nonlinear equations
with variable coefficient.
In this paper, we consider the heat equation in one dimension in the form

 󰇛󰇜
where
󰇛

󰇜
temperature distribution,
thermal diffusivity, spatial coordinate, and time.
with the initial conditions
󰇛
󰇜
󰇛
󰇜
and the boundary condition
󰇛
󰇜
 .
In section 2, we will explain the VIM while in section 3 we analyzed the heat equation. In section 4, we
discussed an example and in section 5, the conclusion was summarized this article.
INTERNATIONAL JOURNAL OF RESEARCH AND SCIENTIFIC INNOVATION (IJRSI)
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue IX September 2025
www.rsisinternational.org
Page 4592
Variational Iteration Method
Consider the following differential equation
 
󰇛
󰇜
󰇛󰇜
where is a linear operator, is a nonlinear operator, and 󰇛󰇜 is an inhomogeneous term. The VIM
acknowledges the use of a correction functional for equation (2) as the following:

󰇛
󰇜
󰇛

󰇜
󰇟󰇛󰇜 󰇛󰇜
󰇛

󰇜
󰇠
󰇛󰇜
where denotes the Lagrange multiplier and
is restricted variation, satisfying,

To solve equation (3) using the Variational Iteration Method (VIM), we first determine the Lagrange multiplier
through integration by parts.
Analysis of Heat Equation
In this section, we present the solution of equation (1) using the Variational Iteration Method (VIM).
The approach requires construction of a correction functional of the form:

󰇛
󰇜
󰇛

󰇜
󰇛󰇜
󰇟󰇛
󰇜

󰇛
󰇜

󰇠
󰇛󰇜
where
is restricted variation, i.e.,

To determine the optimal Lagrange multiplier λ(s), we multiply the governing equation by a test function,
yielding:

󰇛
󰇜
󰇛

󰇜
󰇛󰇜
󰇟󰇛
󰇜
󰇛
󰇜

󰇠

but
then we have

󰇛
󰇜
󰇛
󰇜
󰇛󰇜
󰇛
󰇜

To evaluate the integral on the right-hand side, we apply integration by parts with:
󰇛
󰇜
󰇛
󰆒
󰇛
󰇜
󰇜

󰇛
󰇜

󰇛
󰇜
This yields the following result:

󰇛

󰇜
󰇛

󰇜

󰇛
󰇜
󰇛󰇜

󰇛
󰇜
󰇛

󰇜

󰇛
󰇜
󰇛󰇜

󰇛
󰇜
󰇛

󰇜

which implies that the stationary conditions are

󰇛
󰇜

󰇛
󰇜



󰇛
󰇜


INTERNATIONAL JOURNAL OF RESEARCH AND SCIENTIFIC INNOVATION (IJRSI)
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue IX September 2025
www.rsisinternational.org
Page 4593
By solving the above equations, the Lagrange multipliers
󰇛
󰇜
 and the iteration formula is

󰇛
󰇜
󰇛
󰇜
󰇟󰇛
󰇜
󰇛
󰇜

󰇠
󰇛󰇜
First Iteration
󰇛
󰇜
󰇛
󰇜
󰇛

󰇜
󰇟󰇛
󰇜
󰇛
󰇜

󰇠

If we assume that
󰇛
󰇜
󰇛
󰇜
then we have:
󰇛
󰇜
󰇛
󰇜

󰆒󰆒
󰇛
󰇜
Thus:
󰇛
󰇜
󰇛
󰇜
󰇟

󰆒󰆒
󰇛
󰇜󰇠

󰇛
󰇜

󰆒󰆒
󰇛
󰇜
Second Iteration
󰇛
󰇜
󰇛
󰇜
󰇛
󰇜
󰇟󰇛
󰇜
󰇛
󰇜

󰇠

But
󰇛
󰇜
󰇛
󰇜

󰆒󰆒
󰇛
󰇜
then we compute:
󰇛
󰇜

󰆒󰆒
󰇛
󰇜
󰇛
󰇜

󰆒󰆒
󰇛
󰇜

󰇛󰇜
󰇛
󰇜
Thus:
󰇛
󰇜
󰇛
󰇜

󰆒󰆒
󰇛
󰇜
󰇣

󰆒󰆒
󰇛
󰇜
󰇡
󰆒󰆒
󰇛
󰇜

󰇛
󰇜
󰇛
󰇜
󰇢
󰇤

󰇛
󰇜

󰆒󰆒
󰇛
󰇜


󰇛󰇜
󰇛󰇜
Third Iteration
󰇛
󰇜
󰇛

󰇜
󰇛
󰇜
󰇟󰇛
󰇜
󰇛
󰇜

󰇠

But
󰇛
󰇜
󰇛
󰇜

󰆒󰆒
󰇛
󰇜


󰇛󰇜
󰇛󰇜then we compute:
󰇛
󰇜

󰆒󰆒
󰇛
󰇜

󰇛
󰇜
󰇛󰇜
󰇛
󰇜

󰆒󰆒
󰇛
󰇜

󰇛󰇜
󰇛
󰇜
Thus:
󰇛
󰇜
󰇛
󰇜

󰆒󰆒
󰇛
󰇜
󰇣

󰆒󰆒
󰇛
󰇜
󰇡
󰆒󰆒
󰇛
󰇜

󰇛
󰇜
󰇛
󰇜
󰇢
󰇤

󰇛
󰇜

󰆒󰆒
󰇛
󰇜


󰇛󰇜
󰇛󰇜
Continuing this process leads to the th iteration as follows:
INTERNATIONAL JOURNAL OF RESEARCH AND SCIENTIFIC INNOVATION (IJRSI)
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue IX September 2025
www.rsisinternational.org
Page 4594
󰇛

󰇜
󰇛
󰇜


󰇛󰇜


Taking we obtain the exact solution:
󰇛
󰇜
󰇛
󰇜


󰇛󰇜


Examples
Example 4.1: Let
󰇛
󰇜
󰇡

󰇢 then
󰆒󰆒
󰇛
󰇜
󰇡
󰇢
󰇡

󰇢
󰇛
󰇜
󰇛
󰇜
󰇡
󰇢
󰇡

󰇢

󰇛
󰇜
󰇛
󰇜
󰇡
󰇢
󰇡

󰇢
The solution becomes:
󰇛
󰇜
󰇡

󰇢
󰇩
󰇡
󰇢
󰇡
󰇢
󰇡
󰇢
󰇪
󰇛󰇜
The above equation (6) matches the known analytic solution.
Example 4.2: Let
󰇛
󰇜
󰇡

󰇢 then
󰆒󰆒
󰇛
󰇜
󰇡
󰇢
󰇡

󰇢
󰇛
󰇜
󰇛
󰇜
󰇡
󰇢
󰇡

󰇢

󰇛
󰇜
󰇛
󰇜
󰇡
󰇢
󰇡

󰇢
The solution becomes:
󰇛
󰇜
󰇡

󰇢
󰇩
󰇡
󰇢
󰇡
󰇢
󰇡
󰇢
󰇪
󰇛󰇜
The above equation (7) matches the known analytic solution.
Comprehensive Analysis, Broader Applications, and Future Directions
This study has demonstrated the fundamental applicability of the Variational Iteration Method (VIM) to the
one-dimensional, linear heat equation with constant boundary conditions. To solidify the claims of VIM's
superiority in terms of efficiency and accuracy, and to establish its broader utility in computational heat
transfer, the following extensions are proposed.
Rigorous Error Analysis and Benchmarking
A critical step towards validating any numerical method is a thorough comparison against known analytical
solutions.
Example Implementation: Consider the standard heat equation problem:


INTERNATIONAL JOURNAL OF RESEARCH AND SCIENTIFIC INNOVATION (IJRSI)
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue IX September 2025
www.rsisinternational.org
Page 4595
with initial conditions
󰇛
󰇜
󰇛

󰇜 and boundary conditions
󰇛

󰇜
󰇛

󰇜
 We know that the
exact solution is

󰇛
󰇜
󰇛

󰇜
󰇡

󰇢
Computational Efficiency: A table comparing the computational time and accuracy of VIM against classical
methods (Finite Difference Method (FDM) and Finite Element Method (FEM)) for achieving a similar error
tolerance 󰇛 

󰇜 would be highly persuasive.
Table Proposal
Method
Spatial Nodes
Time
Steps
CPU Time (s)
FDM (Explicit)
100
1000
0.15
FDM (Implicit)
100
1000
0.25
FEM
100
1000
0.45
VIM (n=5)
NA
NA
0.02
This would strongly support the claim that VIM can achieve high accuracy with minimal computational cost.
Open Problems and Future Directions:
Theoretical Analysis: A rigorous mathematical investigation into the convergence and stability of VIM for
nonlinear partial differential equations remains an open challenge.
Coupling with Other Phenomena: Future work could explore coupled systems, such as thermo-elasticity
(heat transfer coupled with structural deformation) or porous media flow (heat and mass transfer).
Algorithm Optimization: Research into optimizing the Lagrange multiplier identification for complex
problems or developing a computerized algebra system to automate the VIM algorithm would be highly
valuable for widespread adoption.
CONCLUSION
In this paper, we employ the Variational Iteration Method (VIM) to obtain numerical solutions for the one-
dimensional heat equation. To demonstrate the method's effectiveness, we present illustrative examples that
compare our approximations with exact solutions. The results confirm that VIM provides accurate
approximations to the exact solutions. A key advantage of this method is its ability to yield analytical
approximations for nonlinear equations without requiring linearization or discretization.
REFERENCES
1. He, J. (1997). Variational iteration method for delay differential equations. Communications in
Nonlinear Science and Numerical Simulation, 2(4), 235-236.
2. He, J. H. (2000). Variational iteration method for autonomous ordinary differential systems. Applied
mathematics and computation, 114(2-3), 115-123.
3. He, J. H., & Wu, X. H. (2007). Variational iteration method: new development and
applications. Computers & Mathematics with Applications, 54(7-8), 881-894.
4. Lu, J. (2007). Variational iteration method for solving a nonlinear system of second-order boundary
value problems. Computers & Mathematics with Applications, 54(7-8), 1133-1138.
5. Sontakke, B. R., Shelke, A. S., & Shaikh, A. S. (2019). Solution of non-linear fractional differential
equations by variational iteration method and applications. Far East J. Math. Sci, 110(1), 113-129.
INTERNATIONAL JOURNAL OF RESEARCH AND SCIENTIFIC INNOVATION (IJRSI)
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue IX September 2025
www.rsisinternational.org
Page 4596
6. Tatari, M., & Dehghan, M. (2007). On the convergence of He's variational iteration method. Journal of
Computational and Applied Mathematics, 207(1), 121-128.
7. Wazwaz, A. M. (2009). The variational iteration method for analytic treatment for linear and nonlinear
ODEs. Applied Mathematics and Computation, 212(1), 120-134.
8. Wazwaz, A. M. (2014). The variational iteration method for solving linear and nonlinear ODEs and
scientific models with variable coefficients. Central European Journal of Engineering, 4, 64-71.