1. Introduction
This paper [
1] initiated research concerning the relations between second order boundary value problems and their discretization understood as families of discrete boundary value problems. This leads to considering the existence of what is called non-spurious solutions to second order ODE, the notion which we will describe in detail in the sequel. The direct scheme within which non-spurious solutions are described is given also in [
2]. Several authors worked in the area of connecting difference to differential equations so far, however, without attempting to provide any practical realization of results obtained. In [
3] the methods used involve the monotone iterative technique together with the method of successive approximations in the absence of Lipschitz conditions. In [
4] the existence is reached via degree theory. Brouwer degree theory is used in [
5], where some general theorems guaranteeing the existence and uniqueness of solutions to the discrete BVP are established. On the other hand, in [
6] methods pertaining to the lower and upper solution method are used in order to connect discrete and continuous BVPs. In [
7,
8], respectively, the variational approaches based on the application of a direct method and a global invertibility theorem are presented. All these sources mentioned provide theoretical approximation results. For some recent research concerning discrete boundary value problems, see [
9,
10] where both variational and fixed point approaches are present.
Difference equations are widely used in various research fields, such as computer science, economics and biological neural networks, see [
11,
12] for expositions and detailed theoretical background. Some links between modelling with difference and differential equations are to be found in [
13,
14].
This paper also places itself within the connections between continuous second order problems and their discretizations. Namely, we consider following Dirichlet problem:
      together with the family of its discretizations
      
      where 
 denotes a forward difference operator, namely 
, moreover 
 denotes a second order forward difference operator, i.e., 
. The detailed construction of the discrete family and the functional setting in which (
1) is considered are given further on in 
Section 4 and 
Section 5. Although we obtain a family of discretization exactly the same as in [
2], we reach this conclusion from a different perspective. We perform discretization not of the equation itself but of the Euler action functional thereby obtaining a sort of comparison between the classical algebraic discretization and the Ritz method on which our procedure is based. However we must mention here that the Ritz discretization of second order problems suggested in the literature is different from what we propose, see for example [
15,
16]. Assume that both continuous boundary value problem (
1) and for each fixed 
 discrete boundary value problem (
2) are uniquely solvable by, respectively 
x and 
. Moreover, let there exist two constants 
 independent of 
n and such that
      
      for all 
 and all 
, where 
 is fixed (and arbitrarily large). Lemma 9.2. from [
2] says that for some subsequence 
 of 
 it holds
      
In other words, this means that the suitable chosen discretization approaches the given continuos boundary value problem. Such solutions to discrete BVPs are called non-spurious in contrast to spurious ones which either diverge or else converge to anything else but the solution to a given continuous Dirichlet problem. Let us mention the well known examples from [
17].
The advantage of using the approach suggested here is that our procedure allows us to obtain not only theoretical approach towards the existence the non-spurious solutions but also their numerical realizations via known numerical procedures thereby completing also the existing research.
As concerns comparison with [
8], which is mostly related since both our paper and that source use the direct method of the calculus of variations, we see that there is some improvement as far in the assumptions are concerned. Now we are able to use the best Poincaré constant in the growth conditions as seems the most appropriate. Moreover we relax convexity assumption employed in [
8] with the relaxed monotone condition. This is possible since we use together with the variational approach also the strongly monotone principle. Using directly variational relaxed convexity assumption does not allow for having uniformly bounded discretizations.
We will perform our analysis under the following assumptions concerning the nonlinear term, let  be fixed.
Assumption 1. Function  is jointly continuous.
 Assumption 2. Function  is potential for each , i.e., functional  given by the formulafor all  and  is Gâteaux differentiable and  for all  and .  Assumption 3. There exists  such thatfor all  and .  Here 
 denotes an inner product in 
, while 
 stands for a norm in 
. Some explanation is required as concerns the assumptions. We note that the discrete family (
2) inherits the assumptions from the continuous one, i.e., from (
1).
Note that the sufficient assumption for Assumption 2 to be satisfied is existence and symmetry of second order derivative of f with respect to second variable at every point. It is also the most useful to verify the above. Moreover, Assumption 3 allows us to use a symmetric approach for both, discrete and continuous problem in a sense that both are solvable via the same tools with similar calculations to be performed.
Remark 1. Assumption 3 means that f satisfies the so called relaxed monotone assumption. This is used in the theory of monotone operators in connection with the application of the strongly monotone operator principle. For the application of the variational methods this condition is responsible for the coercivity of the action functional together with its strict convexity. Now it is obvious that Assumption 2 makes the problem variational while the remaining ones allow for investigating the approximations.
 Remark 2. Assumption 2 implies that  for .
 Paper is organized as follows: firstly in 
Section 2 we provide necessary background on variational, monotonicity and the Ritz method. Solvability of problem (
1) we consider in 
Section 3. In 
Section 4 we provide the analysis leading to the discretization of (
1), where we construct family of discrete problems approximating (
1) and consider its solvability. 
Section 5 contains results pertaining to the convergence of solutions to discrete problems which approximate (
1) and these are our main theoretical results. Our considerations are supplied with some numerical analysis based on the theoretical research also in 
Section 5. We show that the accuracy of discretizations of a given problem can strongly depend on a constant 
 in Assumption 3, which justifies the statement that 
 is, in some sense, a critical constant in this considerations.
  2. Auxiliary Results
We will need some classical tools from the variational calculus, see [
18], and the monotone operators theory, see [
15,
19]. Since we work in a Hilbert space setting, we provide auxiliary results only when 
 is a real, separable Hilbert space. By 
 we denote the action of continous linear functional 
 on element 
u. Functional 
 is said to be Gâteaux differentiable at 
 if there exists a continuous linear functional 
 such that for every 
The element 
 is then called the Gâteaux derivative of 
 at 
. 
 is weakly sequentially lower semicontinuous on 
 if for all 
 we have that
      
      whenever 
, that is whenever 
 converge weakly to 
. 
 is coercive when
      
Theorem 1. Let  be a Gâteaux differentiable, sequentially weakly lower semicontinuous and coercive functional. Then  has at least one argument of a minimum  over , , which is also a critical point, that is The argument of a minimum is unique when  is strictly convex.
 Operator  is called:
m-strongly monotone, if there exists 
 such that for all 
 it holds
          
 potential, if there exists a Gâteaux differentiable functional  called potential of A, such that ;
demicontinuous, if convergence  in  implies that  in .
Remark 3. We recall that if A is potential and strongly monotone, then  is strictly convex and radially continuous. Moreover, A is coercive together with its potential.
 Remark 4. Note that in Assumption 2 we assumed a type of a partial potentiality with respect to one of the variables. If  has a potential  and if it is demicontinuous, then there is a direct formula for the potential, i.e., for any  it holds  Theorem 2 (Browder–Minty, [
19]). 
Assume that  is strongly monotone and continuous. Then A is a homeomorphism. Lemma 1. Let  be of class . Assume that  is strongly monotone. Then  is strictly convex, weakly l.s.c. and coercive. Moreover, a functional  posses a unique critical point , which is a global minimizer of .
 Proof.  Operator  is continuous and strongly monotone and therefore, by Theorem 2, there exists a unique solution  to equation . Taking into account Remark 3 we see that  is a global minimizer, then we obtain the assertion.    □
 We recall some necessary basics Ritz method after [
15]. We study the optimisation problem of finding 
 such that
      
      where 
 is a given functional. Let 
 be a family of closed subspaces of 
 satisfying
      
We consider a following family of auxiliary optimization problems of finding 
 such that
      
The following is known and relates infima to the original and auxiliary problems.
Lemma 2 ([
15])
. Assume that  is continuous. If for each, sufficiently large,  problem (8) has a solution , then . Theorem 3 (Ritz Method, [
15]). 
Assume that  is strongly monotone. Then problems (7) and (8), for every , have a unique solution ,  respectively. Moreover, . Proof.  The unique solvability of (
7) and (
8) follows by Lemma 1. Since 
 and 
 is 
-strongly monotone potential operator, we see that
        
Now, due to Lemma 2 we obtain 
 and the assertion follows by inequalities (
9).    □
 Remark 5. We have provided the proof to Theorem 3 since we cite it after [15] where it is given for  functionals which assumption we do not impose. Moreover, in our proof, as in the whole paper, we make use of tools from monotonicity theory, which is not exploited in the source mentioned.    4. On the Discretizations of Problem (1)
In this section we will introduce a family of discrete problems which approximate (
1) starting from some sufficiently large step. Our reasoning goes as follows. Firstly we construct the space in which we will look for discretization together with the corresponding difference equation, then comment on some useful inequalities and finally investigate the solvability of discrete problems.
We follow the scheme from 
Section 2. As a space 
 we take 
. In order to construct the family of spaces 
 for every 
 we define 
, see 
Figure 1, as follows
      
      for all 
, where 
.
Then 
 for 
 and we put
      
      and set
      
Then 
 and of course 
 is a closed subspace and 
. Moreover, for every 
 we calculate
      
We use a standard approximation of an integral, namely
      
As it was mentioned in the Introduction, in order to obtain a family of discrete problems approximating the given problem (
1), we firstly need to construct discretization of functional 
 that is a family of functionals 
, 
, defined by the formulas
      
Functional 
 are well defined since 
 which means that every element of 
 is continuous and thus it makes sense to calculate it at selected points. Moreover, we obtain
      
Therefore, recalling convention (
12), every critical point of 
 solves (
2).
Remark 6. Observe that the values of , and hence the solvability of (1), depend only on values at . In the original Ritz method we minimize the following functional The second component cannot be equal  since in that case F should be piecewise constant, which means it is not continuous unless it is constant everywhere. This is why there is an apparent difference between Theorem 3 and examples in which algebraic discretization cannot be solved.
 It is well known that the first eigenvalue for the second order differential operator with Dirichlet boundary conditions serves as the best constant in the Poincaré inequality, i.e.,
      
This explains why the constant in Assumption 3 is chosen so that .
For a given 
, 
, we define
      
      and
      
Lemma 3. For every , , we have Sequence  is increasing, i.e.,  and  Proof.  Assume that 
. Take 
 and denote
        
Therefore, since 
, see [
2], we obtain that
        
Now, let 
, 
. Then 
, where 
. Hence, by what we have already proved, it follows
        
 □
 We have already proved that set of critical points of 
 and set of solutions to (
2) coincide. Now we turn to showing that all but a finite number of discrete problems have solutions which are uniformly (with respect to 
n) bounded.
Proposition 1. Let Assumptions 1–3 be satisfied. Then there exists  such that for every , problem (2) posses a unique solution on . Moreover, there is a constant  such that  for all .  Proof.  Due to Lemma 3 there exists 
 such that 
 for all 
. We restrict functional 
 to space 
. Then operator 
 is 
-strongly monotone for every 
. Applying Lemma 1 we get the solvability for 
. Since 
 solves (
2), then by direct calculations and by definition of 
, see (
15), we obtain
        
Finally, for every 
 we have
        
The above formula makes sense since  is continuous on .    □
   5. Convergence of Discretizations
In this section we consider the sequence of solutions to discretizations and its convergence. We must investigate its nature, i.e., prove that it is a minimizing sequence to functional 
 and next investigate its convergence. Let us recall, after [
18],
Lemma 4. Let . Then  for all .
 Proposition 2. Let Assumptions 1 and 2 be satisfied. Then the sequence of functionals  converges to  uniformly on  for every .
 Proof.  Due to the Sobolev inequality
        
        we obtain that for every 
 we have 
 for every 
. Take 
. Since 
F is uniformly continuous on 
 and due to Lemma 4, one can find 
 such that
        
        for all 
, 
, 
 and 
. Therefore, bearing in mind (
13), we obtain that for every 
 one has
        
Since  was taken arbitrary, we have .    □
 Remark 7. Recall that under Assumptions 1–3 functional  is coercive, see Lemma 1 and Theorem 4. Hence we can restrict considerations to some bounded set where the minimizer is located. Therefore, by Proposition 2, Denoting by , for enough large n, a sequence of solutions to (2), we see that it is bounded by Proposition 1 and moreover, it is a minimizing sequence for . Minimizing sequence to our action functional  converges strongly (i.e. in norm) to the minimizer. This is the content of the next theorem which strengthens the usual assertion which stems from the direct method implying that the minimizing sequence is weakly convergent. Thus we have also some improvement on results from [18], see Corollary 1.3.  Theorem 5. Let Assumptions 1 and 2 be satified. If  is a bounded minimizing sequence of , then (1) has a solution  such that  up to subsequence. Therefore, if  is a unique solution, then .  For the proof see [
20]. As a consequence of Proposition 1 Theorems 4 and 5 we obtain
Theorem 6. Let Assumptons 1–3 be satisfied. Then there exists  such that (2) has a unique solution  for every . Moreover (1) has also a unique solution  and .  Remark 8. Let us recall that every convergence in Theorems 5 and 6 are understood in -sense. In particular, since  is continuous, we obtain  The nonlinear terms which are tackled by our assumptions are as follows.
Example 1. The following functions  satisfy Assumptions 1–3.
;
;
.
 As long as Theorem PropositionConvergenceOfDiscretizations provides convergence of solutions to discretizations  to the solution to continuous problem , it gives no information about the rate of convergence . It turns out that in such investigation the constant  appearing in Assumption 3 may be crucial as well as its relation to the first eigenvalue of a Dirichlet problem.