Generalization of the Exact Solution of 1D Poisson Equation with Robin Boundary Conditions, Using the Finite Difference Method

A new and innovative method for solving the 1D Poisson Equation is presented, using the finite differences method, with Robin Boundary conditions. The exact formula of the inverse of the discretization matrix is determined. This is the first time that this famous matrix is inverted explicitly, without using the right hand side. Thus, the solution is determined in a direct, very accurate (O(h2)), and very fast (O(N)) manner. This new approach treats all cases of boundary conditions: Dirichlet, Neumann, and mixed. Therefore, it can serve as a reference for solving the Poisson equation in one dimension.


Introduction
The Poisson equation is an elliptic differential equation well known and common to various scientific and technical domains such as physics, mathematics, chemistry, biology, etc.Its resolution generates a lot of interest to engineers, teachers, and researchers.Since, it allows analyzing in quantitative manner the studied phenomena: electrostatic, magnetostatic, wave propagation or heat diffusion in steady state.Many methods of resolution of this important equation exist, however, using the right hand side (RHS), for example, the method of Gaussian elimination or the Thomas algorithm.
Recently, a new method is proposed [1] [2] dealing with this equation in one dimensional case.This new approach, using the finite differences method (FDM), determined the inverse of the matrix obtained from algebraic equations.However, only the case of boundary conditions Dirichlet-Dirichlet (DD) [1]; Neumann-Dirichlet (ND) and Dirichlet-Neumann (DN) [2] were treated.
The present study generalizes the solution of the Poisson equation and determines its solution for boundary conditions of third kind: Robin conditions.These mixed boundary conditions present a great interest in practice, because of combining two quantities: the function and its derivative.Here, a great innovation is that the solution is obtained in a very fast and precise way, and without using the RHS.
First, an inventory is made for possible cases of boundary conditions (DD) (DN), (ND), (RR), (RN), (NR), (DR) and (RD).Then, the cases, which must be solved are identified, considering that the first three cases of boundary problems have been solved in [1] and [2].Then the cases (RR), (RN), (NR), were treated.The final solution is obtained, using an adequate choice of discretization, and inverting directly and exactly the discretization matrix.Thus, a numerical verification is done, considering a boundary problem of type (RR).The sensibility is determined, showing the predicated behavior of the truncation error and the very good accuracy of this new method.Finally, the cases of boundary conditions of type (DR) and (RD) are discussed and solved.

General Problem
The following boundary problem is to be solved: ( ), , Here, Φ is, a scalar field, which depends on the real variable x.The function f(x) is a well known excitation and will be called the Right Hand Side (RHS) of the Poisson equation.

( )
= Φ are unknown values of Φ and of its first derivative at points a and b, respectively.The reals a g and b g are given constants.The coefficients 1 α , 2 α , 1 β , and 2 β are also known.
This study will determine the solutions for all the remaining cases; and therefore can serve as reference for all that will involve the 1D Poisson equation.We distinguish three parts: • 2 0 α ≠ and 2 0 β ≠ .We will call this type of boundary problem Robin-Robin (RR).This part also covers Robin-Neumann (RN) and Neumann-Robin (NR) boundary problems.This is the most important part of this study because helping to resolve the next two parts.
β ≠ .This is the case of the Dirichlet-Robin (DR) boundary problem.

1D Poisson Equation with Robin-Robin (RR) Boundary Conditions
We consider the 1D Poisson equation with boundary conditions of type Robin-Robin (RR).This problem corresponds to the case, where 2 0 α ≠ and 2 0 β ≠ .At points a and b, we have the following relations: where  ( ) , where x ∆ designates the step size: ( ) . The approximate value of the desired scalar field, at point i x , is denoted by i Φ , with ( ) . And at this point, the value of the right-hand side function is: x , the first and second derivative of the function Φ are ( ) , respectively.With the centered difference approximation (O(h 2 )) [2]- [5], one gets the first derivative: and the second derivative is: ( ) The system of linear equations associated to the Boundary Problem of type Robin-Robin can be written: At boundary points, the discretization of the conditions gives: The approximate values of the scalar field at additional imaginary points 0 Φ and 1 N + Φ can be eliminated.This is done considering the discrete differential equation at boundary points 1 a x = and N b x = , with the Eq- uation (6).One obtains the following equation at point a ( ) and the following equation at point b ( ) One remarks that the additional points are not included in the calculations.They allowed the use of the centered difference approximation; even at the boundary points.Therefore, the truncation error behaves like ( ) ( )

2
O h [3].The vector F can be defined with its components i F : Combining the Equations ( 5), (7), and (8); one gets the following matrix equation: RR A is the discretization matrix in the case of boundary conditions of type Robin-Robin (RR).This matrix is widespread in the literature.The Equation ( 10) can be solved with methods such as Gaussian elimination O N [6].We propose, here, a new method of resolution, faster and more accurate than that of Thomas; as we have already done for the boundary problem of type (DD) [1], and (ND) or (DN) [2].This method is based essentially on the exact formulation of the inverse of the matrix RR A .The formula of the inverse of the discretization ma- trix will be determined explicitly and directly.We denote it RR B .

Inverse of the Matrix A RR
The matrix ( ) is symmetric and its determinant RR A depend on the coefficients α and β .The calculation of RR A permits to verify the regularity of the matrix RR A i.e. its invertibility.Exploiting the re- sults of [1] and [2], the formula of the determinant of RR A can be deduced.It holds: A a = will be determined, using the matrix associated to the problem (DD), which is resolved in [1]: Since DD A and its inverse DD B are known [1], one can multiply the Equation (12) by DD B , whose exact formula is known.One gets: where N I is the identity matrix of size N.The matrices (C) and (D) are defined in following manner, respec- tively: , and The matrices (C) and (D) can be factorized and put in the form ( ) ( )( ) . One obtains, for the matrix (C): and for the matrix (D), one gets: The Equation ( 16) shows that the matrix (E) is defined in the following manner: From the Equation (17), it is noted that the matrix (F) is defined in the following manner: ( ) ( ) ( )( ) Thus, the matrix Equation (13) becomes: And therefore, one has the relation that provides the inverse of the matrix ( ) So, we get RR B , inverse of the matrix RR A .This famous matrix is inverted exactly and in a elegant manner [5] [7]- [10].We gave to the matrix RR B the name Bira_RR Matrix.It holds: The Equation ( 22) is very important in the field of numerical resolution of differential equation in one dimension.Because it presents the exact formula of the famous matrix RR A .It allows to solve the Equation (10) in a extremely fast way, very precisely, and independently of the RHS.It provides an innovative solution to the Poisson equation for the case of boundary conditions of type Robin-Robin.
A simple matrix-vector multiplication gives the solution of the differential equation.But we are not limiting there.Because, by exploiting the properties of the matrix RR B , we can greatly reduce the cost in time and memory space.
A further analysis of the matrix RR B gives the solution k Φ in any mesh point k x : where ( ) This latter equation is the same as the following [1]: The analysis of this solution shows that one loop is sufficient to obtain the solution RR k Φ at point k x .This solution given by the Equation (24) has been obtained independently from the RHS.So it is a straightforward solution that does not use the RHS of the differential equation.In addition, a programmer does not need to declare arrays to store matrices or vectors.
This solution in Equation ( 24), combined with Equation ( 5), corresponds to an algorithmic complexity of ( ) O N .It is stable, robust, and very economical with respect to memory occupation.The Equation ( 24) is solution for boundary problems satisfying 2 0 α ≠ and 2 0 β ≠ (RR).It is also solution of boundary problems of type Robin-Neumann (RN) or Neumann-Robin (NR).

Verification with a Robin-Robin (RR) Boundary Problem
We consider a scalar field ( ) , defined in [0, 1], which satisfies fulfills the following Robin-Robin boundary conditions as in (27): where the parameters α ′ , β ′ , 0 g′ , and 1 g′ are well known real constants.The exact solution can be ex- pressed as follows: ) of course, for ( ) The mesh is taken as specified in Figure 1:  .To verify our new method of resolution, we choose: and 400 . It follows: ( ) . Also, we choose: 0 10 g′ = and 1 15 g′ = .The computed results are shown in Table 1.The obtained solution, with our new method, using the finite difference method, is very accurate; as Table 1 above shows.We denotes From Table 1, one can deduce the average relative error, which general expression is given as following: ( ) ( ) It hols: ( ) The sensibility of our new method can be determined by plotting the average relative error ( ) N ε for different values of N.Then, we got the curve shown in Figure 2, which is a hyperbola that can be assumed to be  , and the results from the fitting, one gets [6]: So, we have demonstrated that this new method is very fast, very efficient.In addition, it is very economical in terms of occupation of memory space.It is also very accurate.
The matrix A RR is inverted analytically and in a accurate manner; independently of the RHS.The behavior of the truncation error is very interesting as shown in the sensibility curve.The resolution of the remaining cases Dirichlet-Robin (DR) and Robin-Dirichlet (RD) presents no difficulty.It is easy and can be done on the basis of the foregoing.Here, the mesh points ( )  nated as done in Equation ( 8).Thus, considering the Equations ( 3)-( 8) and adapting them to the (DR) problem, one gets the following matrix equation:

1D Poisson Equation with
One remarks that with respect to the Robin-Robin boundary problem, there is only two changes.The first component of the vector F becomes  .The imaginary point is 0 x .Its scalar field 0 Φ is eliminated as done in Equation (7).Thus, considering the Equations ( 3)-( 8) and adapting them to the (RD) problem, one gets the following matrix equation:

Conclusion
This study relates to the resolution of 1D Poisson equation, with the general case of Robin boundary conditions.The major innovation that is presented, is the exact formulation of the inverse of the discretization matrix, which is obtained from the finite difference method.This remarkable and direct inversion of this matrix provides an elegant and efficient solution to this very important differential equation.This new proposed method of resolution is precise, economic in memory occupancy, and extremely fast.It can serve as reference for solving numerically the 1D Poisson equation and the stationary wave or heat equation.
We propose a new method of resolution of this problem.The latter requires a comfortable and adequate discretization as shown in Figure1.

Figure 1 .
Figure 1.Discretization for Robin-Robin boundary conditions.The mesh is composed of N + 2 points.N of them are in the interval of integration [a,b].The other two are extra, additional, points [3], [4].The mesh points ( ) i x are defined by the following relation: 11) This determinant is zero for the case of boundary conditions of type Neumann-Neumann (NN), which corresponds to 1 α β = = − .Apart from this case, RR A is different from zero and the inverse of the matrix RR A exists.Now the inverse of the matrix ( ) RR RR ij

6 . 1 .
Robin-Dirichlet and Dirichlet-Robin Boundary Conditions 1D Poisson Equation with Dirichlet-Robin (DR) Boundary ConditionsWe consider, now, a Dirichlet-Robin problem as one where the field at point a ( )a Φis known and the boundary condition at point b is of type Robin:, .The coefficients β ′ and b g′ are given.For this Dirichlet-Robin boundary problem, we propose an appropriate discretization, as shown in Figure3.

ix
are defined by the following relation: i x a i h = + ⋅ , 0

1 F
The second one change relatively to the (RR) problem is that their matrices are related by: the solution of the Dirichlet-Robin boundary problem is known, considering the equations (22)-(26), and the change of , and replacing α by 2 − .
We consider, now, a Robin-Dirichlet problem as one where the field at point b ( ) b Φ is known and the boundary condition at point a is of type Robin:, .The coefficients α ′ and a g′ are given.For this (RD) boundary problem, we propose the following appropriate discretization, as shown in Figure4.Here, the mesh points ( ) i x are defined by the following relation:

Figure 4 .
Figure 4. Discretization for Robin-Dirichlet boundary conditions.One remarks that with respect to the Robin-Robin boundary problem, there is only two changes.The last component of the vector F becomes 2 N N b F h f = − Φ .The second one relatively to the (RR) problem is that the matrices of the two problems are related by: ( ) , 2 RD RR A

Table 1 .
Numerical results and relative error.