International Journal of Analysis and Applications Volume 19, Number 5 (2021), 660-673 URL: https://doi.org/10.28924/2291-8639 DOI: 10.28924/2291-8639-19-2021-660 EXPLICIT AND IMPLICIT CRANDALL’S SCHEME FOR THE HEAT EQUATION WITH NONLOCAL NONLINEAR CONDITIONS BENSAID SOUAD1, DEHILIS SOFIANE2,∗, BOUZIANI ABDELFATAH2 1Institute of Veterinary Sciences, University of Constantine I, Constantine, 25000, Algeria 2Department of Mathematics and Informatics. Larbi Ben M’Hidi University, Oum El Bouaghi, 04001, Algeria ∗Corresponding author: dehilissofiane@yahoo.fr Abstract. In this paper, explicit and implicit Crandall’s formulas are applied for finding the solution of the one-dimensional heat equation with nonlinear nonlocal boundary conditions. The integrals in the boundary equations are approximated by the composite Simpson quadrature rule. Here nonlinear terms are approximated by Richtmyer’s linearization method. Finally, some numerical examples are given to show the effectiveness of the proposed method. 1. Introduction This paper is concerned with the numerical solution of the heat equation (1.1) ∂u ∂t − ∂2u ∂x2 = f (x,t) , 0 < x < 1, 0 < t ≤ T, with the initial condition (1.2) u (x, 0) = ϕ (x) , 0 < x < 1, and the nonlinear nonlocal boundary conditions (1.3) u (0, t) = ∫ 1 0 p (x,t) uγ (x,t) dx + E (t) , 0 < t ≤ T, Received May 4th, 2020; accepted May 21st, 2020; published August 2nd, 2021. 2010 Mathematics Subject Classification. 35K58, 65L12. Key words and phrases. nonlocal nonlinear conditions; explicit Crandall’s scheme (ECS); implicit Crandall’s scheme (ICS). ©2021 Authors retain the copyrights of their papers, and all open access articles are distributed under the terms of the Creative Commons Attribution License. 660 https://doi.org/10.28924/2291-8639 https://doi.org/10.28924/2291-8639-19-2021-660 Int. J. Anal. Appl. 19 (5) (2021) 661 (1.4) u (1, t) = ∫ 1 0 q (x,t) uγ (x,t) dx + G (t) , 0 < t ≤ T, where f, ϕ, p, q, G and E are known functions, u (x,t) is unknown function to be determined. This kind of nonlocal boundary-value problem ( with γ = 1) occur in many fields of science and engineering, especially in thermoelasticity [7, 8, 10] thermodynamics [9], heat conduction [5, 6, 17, 28]. A lot of effort has been devoted in the past few years to the study of parabolic initial-boundary value problems which involve nonlocal boundary conditions of the type : u (0, t) = ∫ 1 0 p (x,t) u (x,t) dx + E (t) , 0 < t ≤ T, u (1, t) = ∫ 1 0 q (x,t) u (x,t) dx + G (t) , 0 < t ≤ T, the numerical solution has been considered in several papers [1, 2, 4, 11–13, 15, 16, 18, 19, 21–24, 26–28] . Much less effort is given to the problem with nonlocal nonlinear type boundary conditions (3) and (4). Recently, [3] proposed the implicit difference scheme for the solution of the heat equation with nonlinear nonlocal boundary condition. Therefore this work is aimed at producing a very efficient techniques for solving the heat equation with nonlinear nonlocal boundary condition. The paper is organized as follows. The explicit and implicit Crandall’s methods are employed for solving the one-dimensional heat equation with nonlinear nonlocal boundary value problem (1.1)-(1.4) in Section 2 and Section 3, respectively. To support our findings, we present results of numerical experiments in Section 4. The conclusion is given in Section 5. In [29], the authors consider to solve one-dimensional diffusion equation with nonlinear nonlocal boundary conditions (1.1)-(1.4), by using the Forward time centered space (FTCS-NNC), Dufort–Frankel scheme (DFS- NNC), Backward time centered space (BTCS-NNC), Crank-Nicholson method (CNM-NNC). Crandall’s formulas In order to describe our method, we introduce the following notation. First, we take a positive integers N and M. We divide the intervals [0, 1] and [0,T] into M and N subintervals of equal lengths h = 1/M and k = T/N, respectively. By uni , we denote the approximation to u at the i th grid-point and nth time step. The Grid point (xi, tn) are given by xi = ih, i = 0, 1, 2, . . . , M, tn = nk, n = 0, 1, 2, . . . , N. The notations uni , f n i , p n i , q n i , E n and Gn are used for the finite difference approximations of u(xi, tn), f(xi, tn), p(xi, tn), q(xi, tn), E(tn) and G(tn), respectively. If we consider the modified equivalent equation of the Crandall’s formula, the scheme shown in [20]. This scheme for the equation (1.1) can be written as: Int. J. Anal. Appl. 19 (5) (2021) 662 (1.5) un+1i −u n i k − [( 1 2 + 1 12r ) uni+1 − 2u n i + u n i−1 h2 + ( 1 2 − 1 12r ) un+1i+1 − 2u n+1 i + u n+1 i−1 h2 ] = c00f n+1 i−1 + c01f n+1 i + c00f n+1 i+1 + c10f n i−1 + c11f n i + c10f n i+1, for i = 1, 2, ...,M −1, n = 0, 1, ...,N, and r = k/h2, where c00, c01, c10, c11 are coefficient to be determined . By using Taylor series in (1.5), we obtain the local truncation error : −(2c00 + c01 + 2c10 + c11 − 1) f + 1 12 [ −6 ( 2c00 + 2c10 − 1 12 ) fxx − 6 (4c00 + 2c01 − 1) rft] h2 + O(h4). In order to achieve the fourth order, it is necessary that coefficients c00, c01, c10, c11 would satisfy conditions 2c00 + c01 + 2c10 + c11 − 1 = 0, 2c00 + 2c10 − 1 6 = 0, 4c00 + 2c01 − 1 = 0. We have chosen c00 = 1 12 , c10 = 0, c01 = 1 3 and c11 = 1 2 in our computation. After some rearrangement, the equation (1.5) becomes : (1.6) (1 − 6r)un+1i−1 + (10 + 12r)u n+1 i + (1 − 6r)u n+1 i+1 = (1 + 6r)uni−1 + (10 − 12r)u n i + (1 + 6r)u n i+1 +12k ( 1 12 fn+1i−1 + 1 3 fn+1i + 1 12 fn+1i+1 + 1 2 fni ) , for i = 1, 2, ...,M − 1, n = 0, 1, ...,N. 2. The Explicit Crandall’s Scheme (ECS) If r = 1 6 , the Crandall’s scheme (1.6) becomes explicite : (2.1) 12un+1i = 2u n i−1 + 8u n i + 2u n i+1 +12k ( 1 12 fn+1i−1 + 1 3 fn+1i + 1 12 fn+1i+1 + 1 2 fni ) , This scheme can be written as: (2.2) un+1i = 1 6 uni−1 + 2 3 uni + 1 6 uni+1 +k ( 1 12 fn+1i−1 + 1 3 fn+1i + 1 12 fn+1i+1 + 1 2 fni ) Int. J. Anal. Appl. 19 (5) (2021) 663 for i = 1, 2, ...,M − 1, n = 0, 1, ...,N. We still have to determinates two unknowns u0 and uM+1, for this we approximate integrals in (1.3) and (1.4) numerically by the composite Simpson quadrature formula (We have chosen this approximation since it is of the same, fourth-order of accuracy in space as the methods used for the interior part of the problem) which requires M to be even. Letting M = 2m, yields (2.3) un+10 = u ( 0, tn+1 ) = ∫ 1 0 p ( x,tn+1 ) u ( x,tn+1 ) dx = h 3 ( pn+10 ( un+10 )γ + 4 ∑M/2 i=1 p n+1 2i−1 ( un+12i−1 )γ +2 ∑M/2−1 i=1 p n+1 2i ( un+12i )γ + pn+1M ( un+1M )γ) + En+1 + o(h4), (2.4) un+1M = u ( 1, tn+1 ) = ∫ 1 0 q ( x,tn+1 ) u ( x,tn+1 ) dx = h 3 ( qn+10 ( un+10 )γ + 4 ∑M/2 i=1 q n+1 2i−1 ( un+12i−1 )γ +2 ∑M/2−1 i=1 q n+1 2i ( un+12i )γ + qn+1M ( un+1M )γ) + Gn+1 + o(h4). Thus, we can write (2.5) 3un+10 −hp n+1 0 (u n+1 0 ) γ −hpn+1M (u n+1 M ) γ = 4 ∑M/2 i=1 p n+1 2i−1(u n+1 2i−1t) γ + 2 ∑M/2−1 i=1 p n+1 2i (u n+1 2i ) γ + 3En+1, (2.6) −hqn+10 (u n+1 0 ) γ + 3un+1M −hq n+1 M (u n+1 M ) γ = 4 ∑M/2 i=1 p n+1 2i−1(u n+1 2i−1t) γ + 2 ∑M/2−1 i=1 p n+1 2i (u n+1 2i ) γ + 3Gn+1. By applying the Taylor’s expansion ( un+1i )γ = (uni ) γ + k ((uni )t) γ + .... = (uni ) γ + kγ (uni ) γ−1 ( un+1i −u n i k ) + ... = (uni ) γ + γ (uni ) γ−1 ( un+1i −u n i ) + ... Hence to terms of order k, (2.7) ( un+1i )γ ≈ γ (uni ) γ−1 ( un+1i ) + (1 −γ) (uni ) γ , a result which replace the non-linear unknown ( un+1i )γ by approximation linear in un+1i (the Richtmyer’s linearization method [25]). Substituting (2.7) for i = 0 and i = M in (2.4) and (2.5), we have (2.8) ( 3 −hγpn+10 (u n 0 ) γ−1 ) un+10 −hp n+1 M γ(u n M ) γ−1un+1M = 4 ∑M/2 i=1 p n+1 2i−1(u n+1 2i−1t) γ + 2 ∑M/2−1 i=1 p n+1 2i (u n+1 2i ) γ +h(1 −γ)pn+10 (u n 0 ) γ + h(1 −γ)pn+1M (u n M ) γ + 3En+1, Int. J. Anal. Appl. 19 (5) (2021) 664 (2.9) −hqn+10 γ(u n 0 ) γ−1un+10 + (3 −hγq n+1 M (u n M ) γ−1)un+1M = 4 ∑M/2 i=1 p n+1 2i−1(u n+1 2i−1t) γ + 2 ∑M/2−1 i=1 p n+1 2i (u n+1 2i ) γ +h(1 −γ)qn+10 (u n 0 ) γ + h(1 −γ)qn+1M (u n M ) γ + 3Gn+1, Hence we have: (2.10) un+10 = z1(3 −hγqn+1M (u n M ) γ−1) + z2hp n+1 M γ(u n M ) γ−1) Y , (2.11) un+1M = z2(3 −hγpn+10 (u n 0 ) γ−1) + z1hq n+1 0 γ(u n 0 ) γ−1) Y , where (2.12) z1 = 4 ∑M/2 i=1 p n+1 2i−1(u n+1 2i−1t) γ + 2 ∑M/2−1 i=1 p n+1 2i (u n+1 2i ) γ +h(1 −γ)pn+10 (u n 0 ) γ + h(1 −γ)pn+1M (u n M ) γ + 3En+1, (2.13) z2 = 4 ∑M/2 i=1 p n+1 2i−1(u n+1 2i−1t) γ + 2 ∑M/2−1 i=1 p n+1 2i (u n+1 2i ) γ +h(1 −γ)qn+10 (u n 0 ) γ + h(1 −γ)qn+1M (u n M ) γ + 3Gn+1, and (2.14) Y = (3 −hγqn+1M (u n M ) γ−1)(3 −hγpn+10 (u n 0 ) γ−1) −h2γ2qn+10 (u n 0 ) γ−1pn+1M (u n M ) γ−1 6= 0 Y 6= 0 for sufficiently small h. 3. The Implicit Crandall’s Scheme (ICS) If r 6= 1 6 , the Crandall’s scheme (1.6) is implicite : (3.1) (1 − 6r)un+1i−1 + (10 + 12r)u n+1 i + (1 − 6r)u n+1 i+1 = (1 + 6r)uni−1 + (10 − 12r)u n i + (1 + 6r)u n i+1 +12k ( 1 12 fn+1i−1 + 1 3 fn+1i + 1 12 fn+1i+1 + 1 2 fni ) , for i = 1, 2, ...,M − 1, n = 0, 1, ...,N. Equation (3.1) presents M − 1 linear equations in M + 1 unknowns u0,u1, · · · ,uM. In order to solve the linear system, we need two more equations, that we can obtain approximating the integrals in (1.3) and Int. J. Anal. Appl. 19 (5) (2021) 665 (1.4) numerically by the fourth-order Simpson’s composite formula (which requires M to be even). Letting M = 2m, yields (3.2) un+10 = u ( 0, tn+1 ) = ∫ 1 0 p ( x,tn+1 ) u ( x,tn+1 ) dx = h 3 ( pn+10 ( un+10 )γ + 4 ∑M/2 i=1 p n+1 2i−1 ( un+12i−1 )γ +2 ∑M/2−1 i=1 p n+1 2i ( un+12i )γ + pn+1M ( un+1M )γ) + En+1 + o(h4), (3.3) un+1M = u ( 1, tn+1 ) = ∫ 1 0 q ( x,tn+1 ) u ( x,tn+1 ) dx = h 3 ( qn+10 ( un+10 )γ + 4 ∑M/2 i=1 q n+1 2i−1 ( un+12i−1 )γ +2 ∑M/2−1 i=1 q n+1 2i ( un+12i )γ + qn+1M ( un+1M )γ) + Gn+1 + o(h4). By applying the Richtmyer’s linearization method (2.7) in (3.2) and (3.3), we get (3.4) un+10 = h 3 ( pn+10 ( γ (un0 ) γ−1 ( un+10 ) + (1 −γ) (un0 ) γ ) +4 ∑M/2 i=1 p n+1 2i−1 ( γ ( un2i−1 )γ−1 ( un+12i−1 ) + (1 −γ) ( un2i−1 )γ) +2 ∑M/2−1 i=1 p n+1 2i ( γ (un2i) γ−1 ( un+12i ) + (1 −γ) (un2i) γ )) +h 3 pn+1M ( γ (unM ) γ−1 ( un+1M ) + (1 −γ) (unM ) γ ) + En+1, (3.5) un+1M = h 3 ( qn+10 ( γ (un0 ) γ−1 ( un+10 ) + (1 −γ) (un0 ) γ ) +4 ∑M/2 i=1 q n+1 2i−1 ( γ ( un2i−1 )γ−1 ( un+12i−1 ) + (1 −γ) ( un2i−1 )γ) +2 ∑M/2−1 i=1 q n+1 2i ( γ (un2i) γ−1 ( un+12i ) + (1 −γ) (un2i) γ )) +h 3 qn+1M ( γ (unM ) γ−1 ( un+1M ) + (1 −γ) (unM ) γ ) + Gn+1. Thus, we can write (3.4) and (3.5) as follows (3.6) ( γhpn+10 (u n 0 ) γ−1 − 3 ) un+10 + 4γh ∑M/2 i=1 p n+1 2i−1 ( un2i−1 )γ−1 ( un+12i−1 ) +2γh ∑M/2−1 i=1 p n+1 2i (u n 2i) γ−1 ( un+12i ) + γhpn+1M (u n M ) γ−1 ( un+1M ) = (γ − 1) hpn+10 (u n 0 ) γ + 4 (γ − 1) h ∑M/2 i=1 p n+1 2i−1 ( un2i−1 )γ +2 (γ − 1) h ∑M/2−1 i=1 p n+1 2i (u n 2i) γ + (γ − 1) hpn+1M (u n M ) γ − 3En+1, (3.7) γhqn+10 (u n 0 ) γ−1 un+10 + 4γh ∑M/2 i=1 q n+1 2i−1 ( un2i−1 )γ−1 ( un+12i−1 ) +2γh ∑M/2−1 i=1 q n+1 2i (u n 2i) γ−1 ( un+12i ) + ( γhqn+1M (u n M ) γ−1 − 3 )( un+1M ) = (γ − 1) hqn+10 (u n 0 ) γ + 4 (γ − 1) h ∑M/2 i=1 q n+1 2i−1 ( un2i−1 )γ +2 (γ − 1) h ∑M/2−1 i=1 q n+1 2i (u n 2i) γ + (γ − 1) hqn+1M (u n M ) γ − 3Gn+1, then, we have (3.8) an0u n+1 0 + a n 1u n+1 1 + a n 2u n+1 2 + ... + a n M−1u n+1 M−1 + a n Mu n+1 M = L n M, Int. J. Anal. Appl. 19 (5) (2021) 666 where (3.9)   an0 = γhp n+1 0 (u n 0 ) γ−1 − 3 anM = γhp n+1 M (u n M ) γ−1 an2i+1 = 4γhp n+1 2i+1 ( un2i+1 )γ−1 i = 0, 1, 2, · · · , M 2 − 1, an2i = 2γhp n+1 2i (u n 2i) γ−1 i = 1, 2, · · · , M 2 − 1, and (3.10) LnM = (γ − 1) hp n+1 0 (u n 0 ) γ + 4 (γ − 1) h ∑M/2 i=1 p n+1 2i−1 ( un2i−1 )γ +2 (γ − 1) h ∑M/2−1 i=1 p n+1 2i (u n 2i) γ + (γ − 1) hpn+1M (u n M ) γ , and also (3.11) bn0u n+1 0 + b n 1u n+1 1 + b n 2u n+1 2 + ... + b n M−1u n+1 M−1 + b n Mu n+1 M = K n M, where (3.12)   bn0 = γhq n+1 0 (u n 0 ) γ−1 bnM = γhq n+1 M (u n M ) γ−1 − 3 bn2i+1 = 4γhq n+1 2i+1 ( un2i+1 )γ−1 i = 0, 1, 2, · · · , M 2 − 1, bn2i = 2γhq n+1 2i (u n 2i) γ−1 i = 1, 2, · · · , M 2 − 1, and (3.13) KnM = (γ − 1) hq n+1 0 (u n 0 ) γ + 4 (γ − 1) h ∑M/2 i=1 q n+1 2i−1 ( un2i−1 )γ +2 (γ − 1) h ∑M/2−1 i=1 q n+1 2i (u n 2i) γ + (γ − 1) hqn+1M (u n M ) γ , Combining (3.8), (3.11), with (3.1) yields an (M + 1) × (M + 1) linear system of equations. We write the system in the matrix form (3.14) An+1Un+1 = Bn+1, which An+1 =   an0 a n 1 a n 2 a n 3 a n M−2 a n M−1 a n M 1 − 6r 10 + 12r 1 − 6r 0 · · · 0 0 1 − 6r 10 + 12r 1 − 6r . . . ... ... . . . . . . . . . 0 0 . . . . . . 1 − 6r 10 + 12r 1 − 6r bn0 b n 1 b n 2 b n M−2 b n M−1 b n M   , Int. J. Anal. Appl. 19 (5) (2021) 667 Un+1 =   un+10 un+11 un+12 ... un+1M−1 un+1M   , B n+1 =   (γ − 1)h ( pn+10 (u n 0 ) γ + 4 ∑M/2 i=1 pn+12i−1 (u n 2i−1) γ + 2 ∑M/2−1 i=1 pn+12i (u n 2i) γ + pn+1M (u n M) γ ) − 3En+1 (1 + 6r)un0 + (10 − 12r)un1 + (1 + 6r)un2 + 12k( 112f n+1 0 + 1 3 fn+11 + 1 12 fn+12 + 1 2 fn1 ) ... (1 + 6r)unM−2 + (10 − 12r)u n M−1 + (1 + 6r)u n M + 12k( 1 12 fn+1M−2 + 1 3 fn+1M−1 + 1 12 fn+1M + 1 2 fnM−1) (γ − 1)h ( qn+10 (u n 0 ) γ + 4 ∑M/2 i=1 qn+12i−1 (u n 2i−1) γ + 2 ∑M/2−1 i=1 qn+12i (u n 2i) γ + qn+1M (u n M) γ ) − 3Gn+1   where an0 , a n 1 ,a n 2 , ...,a n M−1,a n M and b n 0 ,b n 1 ,b n 2 , ...,b n M−1,b n M are the coefficients in (3.9) and (3.12), respectively. This procedure is unconditionally von Neumann stable [14] for all r > 0. Theorem 3.1. the ICM scheme has a unique solution for sufficiently small h . Proof. It is easy to see that |10 + 12r| > |2 + 12r|. the matrix (3.14) is diagonally dominant, if |an0 | > M∑ i=1 |ani | and |b n M| > M−1∑ i=0 |bni | i.e (3.15) h M∑ i=0 γωi|pn+1i (u n i ) γ−1 | < 1, and h M∑ i=0 γωi|qn+1i (u n i ) γ−1 | < 1 where ω0 = ωM = 1 3 , ω2i = 2 3 , i = 1, ...,M−1 and ω2i+1 = 43, i = 0, ...,M−1. As (3.15) is true for sufficiently small h, the existence and uniqueness of the solution of ICS scheme are proved. � 4. Numerical experiments To test the above algorithms described in Section 2-3 , we use two examples with known analytical solutions as follows: Example 4.1. We consider the following problem (Test given in paper [3]) (4.1) ∂u ∂t − ∂2u ∂x2 = −2 ( x2 + t + 1 ) (t + 1) 3 , 0 < x < 1, 0 < t ≤ T, subject to the initial condition (4.2) u (x, 0) = x2, 0 ≤ x < 1, Int. J. Anal. Appl. 19 (5) (2021) 668 and the nonlinear nonlocal boundary conditions (4.3) u (0, t) = ∫ 1 0 xu2 (x,t) dx− 1 6 (t + 1) 4 , 0 < t ≤ T, (4.4) u (1, t) = ∫ 1 0 xu2 (x,t) dx + 6x2 + 12t + 5 6 (t + 1) 4 , 0 < t ≤ T, The functions f,ϕ, p, q, E and G are chosen so that the function (4.5) u (x,t) = ( x t + 1 )2 . is the exact solution solution of the problem(1.1)-(1.4). In Table 1 and Table 2 we present results with h = 0.05, 0.005 using the Crandall’s scheme discussed in section 2-3 together with the results from [3] for x = 0.1 and t = 0.01, 0.02, 0.03, ..., 0.1. Table 3 gives the maximum errors of the numerical solutions experimental order of convergence. The maximum error is defined as follows Er(h,k) = ‖u−uhk‖∞ = max 0≤k≤N { max 0≤i≤M |u(xi, tk) −uki |}, and the experiment order convergence is calculated using the formula : Order = ln (Er (hi−1,ki−1) /Er (hi,ki)) ln (hi−1/hi) . ti exact ECS ICS from [3] 0.01 0.0098029 0.00980407 0.0098037 0.0093 0.02 0.0096116 0.00961317 0.0096126 0.0091 0.03 0.0094259 0.00942762 0.0094270 0.0090 ... ... ... ... ... 0.1 0.0082644 0.00826636 0.0082657 0.0079 Table 1. Some numerical results at x = 0.1 with h = 0.05 for Example 1 Figs 1-2 illustrates the exact solution and an approximate solution of Example 1 by ECS and ICS, respec- tively. We plot the errors eni = u(xi, tn)−u n i , i = 0, 1, 2, ...,M, n = 0, 1, ...,N, for the schemes ECS and ICS in Figure 3. Int. J. Anal. Appl. 19 (5) (2021) 669 ti exact ECS ICS from [3] 0.01 0.0098029 0.0098029 0.0098029 0.0098 0.02 0.0096116 0.0096116 0.0096116 0.0096 0.03 0.0094259 0.0094259 0.0094259 0.0094 ... ... ... ... ... 0.1 0.0082644 0.0082644 0.0082644 0.0083 Table 2. Some numerical results at x = 0.1 with h = 0.005 for Example 1 M ECS order ICS order 12 1.700987 · 10−6 1.356601 · 10−6 24 1.064666 · 10−7 3.9978 8.483043 · 10−8 3.9992 48 6.658956 · 10−9 3.9989 5.302550 · 10−9 3.9998 96 4.163736 · 10−10 3.9993 3.314515 · 10−10 3.9998 Table 3. The maximum errors and experiment order of convergence for Example 1 . (a) (b) Figure 1. (a) Exact and (b) Approximate Solution by ICS for Example 1. Example 4.2. The second test example to be solved is (4.6) ∂u ∂t − ∂2u ∂x2 = ( 1 + π2 ) exp (t) cos (πx) , 0 < x < 1, 0 < t ≤ T, with the initial condition (4.7) u (x, 0) = cos (πx) , 0 < x < 1, Int. J. Anal. Appl. 19 (5) (2021) 670 (a) (b) Figure 2. (a) Exact and (b) Approximate Solution by ECS for Example 1. and the nonlinear nonlocal boundary conditions (4.8) u (0, t) = ∫ 1 0 sin (πx) u3 (x,t) dx + exp (t) , 0 < t ≤ T, (4.9) u (1, t) = ∫ 1 0 sin (πx) u3 (x,t) dx− exp (t) , 0 < t ≤ T. The analytic solution is (4.10) u (x,t) = cos (πx) exp (t) . In Table 4 and Table 5 we present results with h = 0.05, 0.005 and r = 0.4 using the finite difference formulate discussed in section 2-3 for x = 0.1 and t = 0.01, 0.02, 0.03, ..., 0.1. Figures 3-4 illustrates the exact solution and an approximate solution of Example 2 by ECS and ICS, respectively. ti exact ECS ICS 0.01 0.96061479 0.96061492 0.96061503 0.02 0.97026913 0.97026933 0.97026948 0.03 0.98002050 0.98002074 0.98002092 ... ... ... ... 0.1 1.05108000 1.05108034 1.05108060 Table 4. Some numerical results at x = 0.1 for h = 0.05 for Example 2 Int. J. Anal. Appl. 19 (5) (2021) 671 ti exact ECS ICS 0.01 0.96061479 0.96061479 0.96061479 0.02 0.97026913 0.97026913 0.97026913 0.03 0.98002050 0.98002050 0.98002050 ... ... ... ... 0.1 1.05108000 1.05108000 1.05108000 Table 5. Some numerical results at x = 0.1 for h = 0.005 for Example 2 (a) (b) Figure 3. (a) Exact and (b) Approximate Solution by ICS for Example 2. (a) (b) Figure 4. (a) Exact and (b) Approximate Solution by ECS for Example 2. Int. J. Anal. Appl. 19 (5) (2021) 672 5. Conclusion In this paper new techniques were applied to the one-dimensional heat equation with nonlinear nonlocal boundary conditions. The numerical results obtained by using the methods described in this article give acceptable results and suggests convergence to the exact solution when h goes to zero. The ECS method is explicit and require less computational time than the implicit Crandall’s scheme, but the disadvantage of this discretization is the restriction in choosing the value of r ( r = 1 6 ) . Conflicts of Interest: The author(s) declare that there are no conflicts of interest regarding the publication of this paper. References [1] W.T. Ang, A method of solution for the one-dimensional heat equation subject to nonlocal conditions, Southeast Asian Bull. Math. 26 (2003), 185–191. [2] S. Bensaid, A. Bouziani, M. Zereg, Backward Euler method for the diffusion equation with integral boundary specifications, J. Pure Appl. Math.: Adv. Appl. 2 (2009), 169-185. [3] A. Borhanifar, M.M. kabir, A.H. Pour A numerical method for solution of the heat equation with nonlocal nonlinear condition, World Appl. Sci. J. 13 (2011), 2405-2409. [4] A. Borhanifar, S. Shahmorad, E. Feizi, A matrix formulated algorithm for solving parabolic equations with nonlocal boundary conditions, Numer. Algorithms, 74 (2017), 1203–1221. [5] A. Bouziani, Mixed problem with boundary integral conditions for a certain parabolic equation, J. Appl. Math. Stoch. Anal. 9 (1996), 323–330. [6] J.R. Cannon, The solution of the heat equation subject to the specification of energy, Quart. Appl. Math. 21 (1963), 155-160. [7] W.A. Day, Extension of a property of the heat equation to linear thermoelasticity and other theories, Quart. Appl. Math. 40 (1982), 319-330. [8] W.A. Day, A decreasing property of solutions of parabolic equations with applications to thermoelasticity, Quart. Appl. Math. 41 (1983), 468-475. [9] W.A. Day, Parabolic equations and thermodynamics, Quart. Appl. Math. 50 (1992), 523-533. [10] G. Dagan, The significance of heterogeneity of evolving scales to transport in porous formations, Water Resour. Res. 30 (1994), 3327–3336. [11] S. Delihis, A. Bouziani, T.E. Oussaeif, Study of solution for a parabolic integrodifferential equation with the second kind integral condition, Int. J. Anal. Appl. 16 (2018), 569-593. [12] M. Dehghan, Numerical solution of a parabolic equation with non-local boundary specifications, Appl. Math. Comput. 145 (2003), 185-194. [13] M. Dehghan, Application of the Adomian decomposition method for two-dimensional parabolic equation subject to non- standard boundary specifications, Appl. Math. Comput. 157 (2004), 549-560. [14] M. Dehghan, Efficient techniques for the second-odrer parabolic equation subject to nonlocal specifications, Appl. Numer. Math. 52 (2005), 39-62. [15] G. Ekolin, Finite difference methods for a nonlocal boundary value problem for the heat equation, BIT Numer. Math. 31 (1991), 245-261. Int. J. Anal. Appl. 19 (5) (2021) 673 [16] M. Javidi, The MOL solution for the one-dimentional heat equation subject to nonlocal conditions, Int. Math. Forum, 12 (2006), 597-602. [17] B. Kawohl, Remark on a paper by W.A. Day on a maximum principle under nonlocal boundary conditions, Quart. Appl. Math. 44 (1987), 751-752. [18] J. Mart́ın-Vaquero, J. Vigo-Aguiar, A note on efficient techniques for the second-order parabolic equation subject to non-local conditions, Appl. Numer. Math. 59 (2009), 1258–1264. [19] J. Mart́ın-Vaquero, A. Queiruga-Dios, A.H. Encinas, Numerical algorithms for diffusion–reaction problems with non- classical conditions, Appl. Math. Comput. 218 (2012), 5487–5495. [20] J. Mart́ın-Vaquero, S. Sajavičius, The two-level finite difference schemes for the heat equation with nonlocal initial condition, Appl. Math. Comput. 342 (2019), 166–177. [21] K.W. Morton, D.F. Mayers, Numerical solution of partial differential equations, Cambridge University Press, Cambridge, 1994. [22] C.V. Pao, Numerical solutions of reaction–diffusion equations with nonlocal boundary conditions, J. Comput. Appl. Math. 136 (2001), 227–243. [23] L.S. Pulkina, A.B. Beylin, Nonlocal approach to problems on longitudinal vibration in a short bar, Electron. J. Differ. Equ. 2019 (2019), 29. [24] M. Slodička, and S.Dehilis, A numerical approach for a semilinear parabolic equation with a nonlocal boundary condition, J. Comput. Appl. Math. 231 (2009), 715-724. [25] G.D. Smith, Numerical solution of partial differential equations: Finite difference methods, Clarendon Press, Oxford, 1985 [26] S. Wang, The numerical method for the conduction subject to moving boundary energy specification, Numer. Heat Transfer, 130 (1990), 35-38. [27] S. Wang, Y. Lin, A finite-difference solution to an inverse problem for determining a control function in a parabolic partial differential equation, Inverse Probl. 5 (1989), 631–640. [28] Z.-Z. Sun, A high-order difference scheme for a nonlocal boundary-value problem for the heat equation, Comput. Methods Appl. Math. 1 (2001), 398–414. [29] A. Bouziani, S. Bensaid, S. Dehilis, A second order accurate difference scheme for the diffusion equation with nonlocal nonlinear boundary conditions, J. Phys. Math. 11 (2020), Art. ID 2, 1-7. 1. Introduction Crandall's formulas 2. The Explicit Crandall's Scheme (ECS) 3. The Implicit Crandall's Scheme (ICS) 4. Numerical experiments 5. Conclusion References