\documentclass[reqno]{amsart}
\usepackage{hyperref}

\AtBeginDocument{{\noindent\small
\emph{Electronic Journal of Differential Equations},
Vol. 2015 (2015), No. 188, pp. 1--15.\newline
ISSN: 1072-6691. URL: http://ejde.math.txstate.edu or http://ejde.math.unt.edu
\newline ftp ejde.math.txstate.edu}
\thanks{\copyright 2015 Texas State University - San Marcos.}
\vspace{9mm}}

\begin{document}
\title[\hfilneg EJDE-2015/188\hfil Neumann type inverse elliptic problems]
{Numerical solution to inverse elliptic problem with Neumann
 type overdetermination and mixed boundary conditions}

\author[C. Ashyralyyev, Y. Akkan \hfil EJDE-2015/188\hfilneg]
{Charyyar Ashyralyyev, Yasar Akkan}

\address{Charyyar Ashyralyyev \newline
Department of Mathematical Engineering,
Gumushane University, Gumushane, Turkey}
\email{charyyar@gumushane.edu.tr}

\address{Yasar Akkan \newline
Department of Mathematical Engineering,
Gumushane University, Gumushane, Turkey}
\email{akkanyasar61@gumushane.edu.tr}

\thanks{Submitted June 23, 2015. Published July 13, 2015.}
\subjclass[2010]{35N25, 39A14, 39A30, 65J22}
\keywords{Inverse elliptic problem; stability; almost coercive stability;
\hfill\break\indent overdetermination; difference scheme}

\begin{abstract}
 This article studies the numerical solution of inverse problems
 for the multidimensional elliptic equation with Dirichlet-Neumann
 boundary conditions and Neumann type overdetermination.
 We present first and second order accuracy difference schemes.
 The stability and almost coercive stability inequalities for the solution
 are obtained. Numerical examples with explanation on the implementation
 illustrate the theoretical results.
\end{abstract}

\maketitle
\numberwithin{equation}{section}
\newtheorem{theorem}{Theorem}[section]
\allowdisplaybreaks


\section{Introduction}

Inverse problems arise in many branches of science and mathematics (see
\cite{21,28,31} and the bibliography therein). In recent years,
the subject of the inverse problems for partial differential equations is of
significant and quickly growing interest for many scientists and engineers.
Especially, theory and methods of solutions of inverse problems of
determining unknown parameter of partial differential equations have been
comprehensively studied by a few researchers (see \cite{1},\ \cite{2},
\cite{4}--\cite{7}, \cite{9}--\cite{22},  \cite{24}--\cite{31},
\cite{34}--\cite{36}, and references therein).

Existence, uniqueness, and Fredholm property theorems for the inverse
problem of finding the source in an abstract second-order elliptic equation
on a finite interval are established in \cite{24}.

In \cite{34}--\cite{36}, the author investigated source determination for the
elliptic equation in plane, rectangle and cylinder. Sufficient conditions
for the unique solvability of the inverse coefficient problems with
overdetermination on the boundary, where the Dirichlet conditions are
supplemented with the vanishing condition for the normal derivative on part
of the boundary were given.

Approximation of inverse Bitzadze-Samarsky problem for abstract elliptic
differential equations with Neumann type overdetermination which is based on
semigroup theory and a functional analysis approach are described in \cite{26}.

Simultaneous reconstruction of coefficients and source parameters in
elliptic systems modelled with many boundary value problems was discussed
in \cite{30}.  It was proposed in \cite{18} and \cite{29} that the
determination of the problem of an unknown boundary condition in the
boundary value problem in the regularization procedures can be performed
with the help of an extra measurement at an internal point.
Well-posedness of inverse problems for elliptic differential and difference
equations were investigated in \cite{10}--\cite{15}.

These works are devoted to identification problems of an elliptic
differential and difference equations with Dirichlet type overdetermination.

The exact estimates for the solution of the boundary value problem of
determining the parameter of an elliptic equation with a positive operator
in an Banach space are obtained in \cite{4}. The papers \cite{4,10},
\cite{11}, \cite{13}--\cite{15} are devoted to getting the stability and
coercive stability inequalities for the solutions of various inverse
problems with Dirichlet type overdetermination for elliptic differential and
difference equations.

In \cite{15},  the inverse problem for the multi-dimensional elliptic
equation with Dirichlet type overdetermination and mixed boundary
conditions, and also its first and second order accuracy approximations
presented. Moreover, the stability, almost coercive stability and coercive
stability inequalities for the solution of these difference schemes are showed.

The third and fourth order of accuracy stable difference schemes for the
solution of the inverse problem with Dirichlet type overdetermination and
Dirichlet boundary condition are presented in \cite{10}. By using the result of
established abstract results, well-posedness of high order accuracy
difference schemes of the inverse problem for a multidimensional elliptic
equation were obtained. High order stable difference schemes for the
approximately solution of inverse problem for the multidimensional elliptic
equation with Dirichlet-Neumann boundary conditions and the stability
estimates for their solutions were disscussed in \cite{11}.

 In  \cite{12}, the inverse problem for the multidimensional
elliptic equation with Neumann type overdetermination and Dirichlet boundary
condition was considered.

Our aim in this work is investigation of the inverse problem for the
multidimensional elliptic equation with Neumann type overdetermination and
mixed boundary conditions. We construct the first and second order of accuracy
difference schemes and give stability estimates for their solutions.
Numerical example with explanation on the realization on computer will be
done to illustrate theoretical results.

Let $\Omega =( 0,\ell ) \times ( 0,\ell ) \times
\dots \times ( 0,\ell )$ be the open cube in the $n$
-dimensional Euclidean space with boundary $S=S_1\cup S_2,~\overline{
\Omega }=\Omega \cup S$,
where
\begin{gather*}
S =\big\{ x=(x_1,\dots ,x_n): x_{i}=0\text{ or }x_{i}=\ell ,\;
0\leq x_k\leq \ell ,\; k\neq i,\; 1\leq i\leq n\big\} ,
\\
S_1 =\big\{ x=(x_1,\dots ,x_n): x_{i}=0,\;
0\leq x_k\leq \ell ,\; k\neq i,\; 1\leq i\leq n\big\} , \\
S_2 =\big\{ x=(x_1,\dots ,x_n): x_{i}=\ell ,\;
0<x_k\leq \ell ,\; k\neq i,\; 1\leq i\leq n\big\}.
\end{gather*}

We consider the  inverse problem of finding pair functions $u(t,x)$
and $p(x)$ for the multidimensional elliptic equation with Dirichlet-Neumann
boundary conditions and Neumann type overdetermination
\begin{equation}
\begin{gathered}
-u_{tt}(t,x)-\sum_{i=1}^{n}(a_{i}(x)u_{x_{i}})_{x_{i}}+\delta
u(t,x)=f(t,x)+tp(x),\quad x\in \Omega ,\;0<t<1,
\\
u_{t}(0,x)=\varphi (x),\quad u_{t}(1,x)=\psi (x),\quad
 u_{t}(\lambda ,x)=\xi (x),\quad x\in \overline{\Omega },
\\
u(t,x)=0,\;x\in S_1,\quad \frac{\partial u}{\partial \overrightarrow{n}}
(t,x)=0,\; x\in S_2,\; 0\leq t\leq 1.
\end{gathered} \label{ax}
\end{equation}
Here, $0<\lambda <1$ and $\delta >0$ are known numbers, $a_{i}(x)$
$(i=1,\ldots ,n; x\in \Omega )$, $\varphi (x),\psi (x),\xi (x)$
$(x\in \overline{\Omega })$, and $f(t,x)$ ($t\in (0,T),x\in \Omega$)
 are given smooth functions, $a_{i}(x)\geq a>0$ $(x\in \Omega )$.

In this article, the first and second order of accuracy difference schemes
for approximate solution of the inverse problem are constructed \eqref{ax}
and stability, almost coercive stability estimates for the
solution of these difference schemes are established.

This paper is organized as  follows: In Section 2, we present
the first and second order accuracy difference schemes for the inverse
problem \eqref{ax}. Section 3 is devoted to the stability and almost
coercive stability estimates for the solution of these difference schemes.
In Section 4, we present numerical results for two dimensional elliptic
equation. The conclusion is given in the final Section 5.

\section{Difference schemes}

The differential expression (\cite{8,23})
\begin{equation}
Au(x)=-\sum_{i=1}^{n}(a_{i}\ (x)u_{x_{i}}(x))_{x_{i}}+\delta u(x)
\label{operatora}
\end{equation}
defines a self-adjoint positive definite operator $A$ acting on space
$L_2(\overline{\Omega })$ with the domain
$D(A)=\big\{ u(x)\in W_2^{2}(\overline{\Omega }): u=0 \text{ on }
S_1\text{ and }\frac{\partial u}{\partial \overrightarrow{n}}=0
\text{ on }S_2\big\}$.

By using the substitution
\begin{equation}
u(t,x)=v(t,x)+A^{-1}( pt) ,  \label{u}
\end{equation}
problem \eqref{ax} can be reduced to auxiliary nonlocal problem for
$v(t,x)$ function:
\begin{equation}
\begin{gathered}
-v_{tt}(t,x)+Av(t,x)=f(t,x),\quad 0<t<1, x\in \Omega , \\
v_{t}(0,x)-v_{t}(\lambda ,x)=\varphi (x)-\xi (x), \\
v_{t}(1,x)-v_{t}(\lambda ,x)=\psi (x)-\xi (x),\quad x\in \Omega
\end{gathered} \label{nonlocal}
\end{equation}
Then, the unknown function $p(x)$ will be defined by
\begin{equation}
p(x)=A\xi (x)-Av_{t}(\lambda ,x).  \label{p}
\end{equation}

Now, we describe approximation of inverse problem \eqref{ax}. Define the set of
grid points in space variables.
\begin{gather*}
\widetilde{\Omega }_h=\{x=(h_1m_1,\dots ,h_nm_n):
m_{i}=0,\dots ,M_{i},\; h_{i}M_{i}=\ell,\; i=1,\dots ,n\}, \\
\Omega _h=\widetilde{\Omega }_h\cap \Omega ,\quad
S_h^{1}=\widetilde{\Omega}_h\cap S_1,\quad
S_h^{2}=\widetilde{\Omega }_h\cap S_2.
\end{gather*}

We introduce the Hilbert spaces $L_{2h}=L_2(\widetilde{\Omega }_h)$ and
$W_{2h}^{2}=W_2^{2}(\widetilde{\Omega }_h)$ of grid functions
$g^{h}(x)=\{g(h_1m_1,\dots ,h_nm_n): m_{i}=0,\dots
,M_{i},\; i=1,\dots ,n\}$ defined on $\widetilde{\Omega }_h$, equipped with
the norms
\begin{gather*}
\| g^{h}\| _{L_{2h}}=\Big( \sum_{x\in \widetilde{\Omega }
_h}|g^{h}(x)|^{2}h_1\dots h_n\Big) ^{1/2},
\\
\begin{aligned}
\| g^{h}\| _{W_{2h}^{2}}
&=\| g^{h}\| _{L_{2h}}+\Big( \sum_{x\in \widetilde{\Omega }_h}\sum_{i=1}^{n}|
(g^{h}(x))_{x_{i},m_{i}}| ^{2}h_1\dots h_n\Big) ^{1/2}
\\
&\quad +\Big( \sum_{x\in \widetilde{\Omega }_h}\sum_{i=1}^{n}|
(g^{h}(x))_{x_{i}\overline{x_{i}},\;m_{i}}| ^{2}h_1\dots
h_n\Big) ^{1/2},
\end{aligned}
\end{gather*}
respectively.

To the differential operator $A$ in \eqref{operatora},we  assign the difference
operator $A_h^{x}$ defined by
\begin{equation}
A_h^{x}u^{h}=-\sum_{i=1}^{n}( a_{i}(x)u_{\overline{x}_{i}}^{h})
_{x_{i},m_{i}}+\delta u^{h}  \label{axappr}
\end{equation}
acting in the space of grid functions $u^{h}(x)$ satisfying the conditions
$u^{h}(x)=0$,  for all $x\in S_h^{1}$ and $D^{h}u^{h}(x)=0$,
for all $x\in S_h^{2}$. Here, $D^{h}u^{h}(x)$ is an approximation of
$\frac{\partial u}{\partial \overrightarrow{n}}$ Note that
(\cite{8,23}) $A_h^{x}$ is a self-adjoint positive define operator in
$L_2( \widetilde{\Omega }_h)$.
Denote
\[
D=\frac{1}{2}(\tau A_h^{x}+\sqrt{4A_h^{x}+\tau ^{2}(A_h^{x})^{2}}), \quad
R=(I+\tau D)^{-1},
\]
First, by using $A_h^{x}$, for obtaining $u^{h}(t,x)$ functions, we arrive
at problem
\begin{equation}
\begin{gathered}
-\frac{d^{2}u^{h}(t,x)}{dt^{2}}
+A_h^{x}u^{h}(t,x)=f^{h}(t,x)+p^{h}(x), \quad
 0<t<1,\; x\in \Omega _h,
\\
\frac{du^{h}(0,x)}{dt}=\varphi ^{h}(x),\quad
\frac{du^{h}(\lambda ,x)}{dt}=\xi^{h}(x), \quad
\frac{du^{h}(T,x)}{dt}=\psi ^{h}(x),\quad x\in \widetilde{\Omega }_h.
\end{gathered}\label{1stepappru}
\end{equation}
Second, applying the approximate formula
\begin{equation}
\frac{du^{h}(\lambda ,x)}{dt}=\frac{du^{h}([\frac{\lambda }{\tau }]\tau ,x)}{
dt}+o(\tau )  \label{approv1}
\end{equation}
for $\frac{du^{h}(\lambda ,x)}{dt}=\xi ^{h}(x)$, we replace problem \eqref{ax}
 with the first order of accuracy difference scheme in $t$,
\begin{equation}
\begin{gathered}
-\frac{u_{k+1}^{h}(x)-2u_k^{h}(x)+u_{k-1}^{h}(x)}{\tau ^{2}}
+A_h^{x}u_k^{h}(x)=\theta _k^{h}(x)+p^{h}(x), \\
\theta _k^{h}(x)=f^{h}(t_k,x),\quad t_k=k\tau ,\; 1\leq k\leq N-1,\;
x\in \Omega _h,\; N\tau =1 ,
\\
\frac{u_1^{h}(x)-u_0^{h}(x)}{\tau }=\varphi ^{h}(x),\quad
\frac{u_{N}^{h}(x)-u_{N-1}^{h}(x)}{\tau }=\psi ^{h}(x), \\
\frac{u_{l+1}^{h}(x)-u_{l}^{h}(x)}{\tau }=\xi ^{h}(x),\quad
x\in \widetilde{\Omega}_h.
\end{gathered}\label{app1u}
\end{equation}
Here, $l=[ \frac{\lambda }{\tau }] $, $[\cdot ]$ is a notation
for the greatest integer function.

In a similar manner, the auxiliary nonlocal problem can be changed by
the first order of accuracy difference scheme in $t$,
\begin{equation}
\begin{gathered}
-\frac{v_{k+1}^{h}(x)-2v_k^{h}(x)+v_{k-1}^{h}(x)}{\tau ^{2}}
+A_h^{x}v_k^{h}(x)=\theta _k^{h}(x), \\
\theta _k^{h}(x)=f^{h}(t_k,x),\quad t_k=k\tau ,\;
1\leq k\leq N-1,\; x\in \Omega _h,\; N\tau =1
  \\
\frac{v_1^{h}(x)-v_0^{h}(x)}{\tau }-\frac{v_{l+1}^{h}(x)-v_{l}^{h}(x)}{
\tau }=\varphi ^{h}(x)-\xi ^{h}(x), \\
\frac{v_{N}^{h}(x)-v_{N-1}^{h}(x)}{\tau }-\frac{v_{l+1}^{h}(x)-v_{l}^{h}(x)}{
\tau }=\psi ^{h}(x)-\xi ^{h}(x),\quad x\in \widetilde{\Omega }_h.
\end{gathered}\label{appv1}
\end{equation}
In this step of approximation, by using the approximate formula
\begin{equation}
\frac{du^{h}}{dt}(\lambda ,x)
=\frac{du^{h}}{dt}(l\tau ,x)+(\frac{\lambda }{
\tau }-l)(\frac{du^{h}}{dt}(l\tau +\tau ,x)-\frac{du^{h}}{dt}(l\tau
,x))+o(\tau ^{2})  \label{approv2}
\end{equation}
for condition $\frac{du^{h}}{dt}(\lambda ,x)=\frac{d\xi ^{h}}{dt}(x)$, we
can get the following second order of accuracy difference schemes
\begin{equation}
\begin{gathered}
-\frac{u_{k+1}^{h}(x)-2u_k^{h}(x)+u_{k-1}^{h}(x)}{\tau ^{2}}
+A_h^{x}u_k^{h}(x)=\theta _k^{h}(x)+p^{h}(x), \\
\theta _k^{h}(x)=f^{h}(t_k,x),\quad t_k=k\tau ,\; 1\leq k\leq N-1,\;
x\in \widetilde{\Omega }_h,
\\
\frac{-3u_0^{h}(x)+4u_1^{h}(x)-u_2^{h}(x)}{2\tau }=\varphi ^{h}(x),\quad
\frac{3u_{N}^{h}(x)-4u_{N-1}^{h}(x)+u_{N-2}^{h}(x)}{2\tau }=\psi ^{h}(x),
\\
\begin{aligned}
&\frac{3u_{l}^{h}(x)-4u_{l+1}^{h}(x)+u_{l+2}^{h}(x)}{2\tau }+( \frac{
\lambda }{\tau }-l) \Big[ \frac{
3u_{l+1}^{h}(x)-4u_{l+2}^{h}(x)+u_{l+3}^{h}(x)}{2\tau } \\
& -\frac{3u_{l}^{h}(x)-4u_{l+1}^{h}(x)+u_{l+2}^{h}(x)}{2\tau }\Big]
=\xi ^{h}(x),\quad x\in \widetilde{\Omega }_h,\; N\tau =1,
\end{aligned}
\end{gathered} \label{app2u}
\end{equation}
and
\begin{equation}
\begin{gathered}
-\frac{v_{k+1}^{h}(x)-2v_k^{h}(x)+v_{k-1}^{h}(x)}{\tau ^{2}}
+A_h^{x}v_k^{h}(x)=\theta _k^{h}(x),\quad
\theta _k^{h}(x)=f^{h}(t_k,x),
\\
t_k=k\tau ,\quad 1\leq k\leq N-1,\; x\in \widetilde{\Omega }_h,
\\
\begin{aligned}
&\frac{-3v_0^{h}(x)+4v_1^{h}(x)-v_2^{h}(x)}{2\tau }-\frac{
-3v_{l}^{h}(x)+4v_{l+1}^{h}(x)-v_{l+2}^{h}(x)}{2\tau }\  \\
&-( \frac{\lambda }{\tau }-l) \Big( \frac{
-3v_{l+1}^{h}(x)+4v_{l+2}^{h}(x)-v_{l+3}^{h}(x)}{2\tau }-\frac{
-3v_{l}^{h}(x)+4v_{l+1}^{h}(x)-v_{l+2}^{h}(x)}{2\tau }\Big) \\
&=\varphi ^{h}(x)-\xi ^{h}(x),
\end{aligned}  \\
\begin{aligned}
&\frac{3v_{N}^{h}(x)-4v_{N-1}^{h}(x)+v_{N-2}^{h}(x)}{2\tau }-\frac{
-3v_{l}^{h}(x)+4v_{l+1}^{h}(x)-v_{l+2}^{h}(x)}{2\tau } \\
&-( \frac{\lambda }{\tau }-l) \Big( \frac{
-3v_{l+1}^{h}(x)+4v_{l+2}^{h}(x)-v_{l+3}^{h}(x)}{2\tau }-\frac{
-3v_{l}^{h}(x)+4v_{l+1}^{h}(x)-v_{l+2}^{h}(x)}{2\tau }\Big) \\
&=\psi ^{h}(x)-\xi ^{h}(x),\quad x\in \widetilde{\Omega }_h,\; N\tau =1
\end{aligned}
\end{gathered}
\label{appv2}
\end{equation}
for approximate solutions of inverse problem \eqref{ax} and auxialary
nonlocal problem \eqref{nonlocal}, respectively.

\section{Stability estimates}

 Now, we consider the linear spaces of mesh functions
$\theta ^{\tau}=\{ \theta _k\} _1^{N-1}$ with values in the Hilbert space
 $H$. Denote by $C([0,1]_{\tau },H)$ and
$\mathcal{C}_{01}^{\alpha ,\alpha }([0,1]_{\tau },H)$ normed spaces with the norms
\begin{gather*}
\| \{ \theta _k\} _1^{N-1}\| _{C([0,1]_{\tau },H)}
=\max_{1\leq k\leq N-1}\| \theta _k\| _{H}, \\
\begin{aligned}
&\|\{ \theta _k\} _1^{N-1}\| _{\mathcal{C}
_{0T}^{\alpha ,\alpha }([0,1]_{\tau },H)}\\
&=\| \{ \theta_k\} _1^{N-1}\| _{C([0,1]_{\tau },H)}
+\sup_{1\leq k<k+s\leq N-1}\frac{(k\tau +s\tau )^{\alpha }(1-k\tau )^{\alpha
}\| \theta _{k+s}-\theta _k\| _{H}}{( s\tau ) ^{\alpha }},
\end{aligned}
\end{gather*}
respectively.  Let $\tau $ and $|h|=\sqrt{h_1^{2}+\dots +h_n^{2}}$ be
sufficiently small positive numbers.


\begin{theorem}\label{thm1}
The solution $(\{ u_k^{h}\}_1^{N-1},p^{h}) $ of difference scheme \eqref{app1u}
obeys the following stability estimates:
\begin{align*}
&\| \{ u_k^{h}\} _1^{N-1}\| _{C([ 0,1] _{\tau },L_{2h})}\\
&\leq M\big[ \| \varphi ^{h}\|_{L_{2h}}+\| \psi ^{h}\| _{L_{2h}}
+\| \xi^{h}\| _{L_{2h}} +\| \{f_k^{h}\} _1^{N-1}\| _{C([0,1]_{\tau },L_{2h})}\big] ,
\end{align*}
\begin{align*}
&\| p^{h}\| _{L_{2h}}\\
&\leq M\big[ \| \varphi^{h}\| _{W_{2h}^{2}}+\| \psi ^{h}\|
_{W_{2h}^{2}}+\| \xi ^{h}\| _{W_{2h}^{2}}+\frac{1}{\alpha
(1-\alpha )}\| \{ f_k^{h}\} _1^{N-1}\| _{
\mathcal{C}_{0T}^{\alpha ,\alpha }([0,1]_{\tau },L_{2h})}\big] ,
\end{align*}
where $M$ is independent of $\varphi ^{h},\psi ^{h}$, $\xi ^{h}$,
$\tau,\alpha ,h$, and $\{ f_k^{h}\} _1^{N-1}$.
\end{theorem}

\begin{theorem}\label{thm2}
The solution $(\{ u_k^{h}\}_1^{N-1},p^{h})$ of difference scheme \eqref{app1u}
obeys the almost coercive stability estimate:
\begin{align*}
&\| \{ \frac{u_{k+1}^{h}-2u_k^{h}+u_{k-1}^{h}}{\tau ^{2}}
)\} _1^{N-1}\| _{C([0,1]_{\tau },L_{2h})}
+\|\{ A_hu_k^{h}\} _1^{N-1}\| _{C([0,1]_{\tau
},L_{2h})}+\| p^{h}\| _{L_{2h}}
\\
&\leq M \Big( \| \varphi ^{h}\| _{W_{2h}^{2}}+\|
\psi ^{h}\| _{W_{2h}^{2}}+\| \xi ^{h}\|
_{W_{2h}^{2}}+\ln ( \frac{1}{\tau +h}) \| \{
f_k^{h}\} _1^{N-1}\| _{C([0,1]_{\tau },L_{2h})}\Big) ,
\end{align*}
where $M$ does not depend on $\varphi ^{h},\psi ^{h}$, $\xi ^{h}$,
$\tau,\alpha ,h$, and $\{ f_k^{h}\} _1^{N-1}$.
\end{theorem}

The proofs of Theorems 3.1--3.2 are based on the symmetry property of
operator $A_h^{x}$ in $L_{2h}$,  and the following formulas
\begin{equation} \label{uk1}
\begin{aligned}
u_k^{h}
&=P( R^k-R^{2N-k}-R^{N-k}+R^{N+k})
v_0^{h}+(I-R^{2N})^{-1} ( R^{N-k}-R^{N+k})
\\
&\quad \times  \Big\{ -(2I+\tau
D)^{-1}D^{-1}\sum_{i=1}^{N-1}( R^{N-1-i}-R^{N-1+i}) \theta
_{i}^{h}\tau
\\
&\quad +G_1(2I+\tau D)^{-1}D^{-1}\sum_{i=1}^{N-1}[
(R^{| 1-i| -1}-R^{i}) -( R^{|N-i| -1}-R^{N+i-1})
\\
&\quad  +( R^{| N-1-i| -1}-R^{N+i-2})\Big] \theta _{i}^{h}\tau
 +\tau G_1( \varphi ^{h}\ -\psi ^{h}) \Big\} -(I-R^{2N})^{-1}
\\
&\quad \times ( R^{N-k}-R^{N+k}) (2I+\tau D)^{-1}D^{-1}
 \sum_{i=1}^{N-1}( R^{N-1-i}-R^{N-1+i}) \theta_{i}^{h}\tau
\\
&\quad +(2I+\tau D)^{-1}D^{-1}\sum_{i=1}^{N-1}\big[ ( R^{|
k-i| -1}-R^{k+i-1}) \big] \theta _{i}^{h}\tau +t_kp^{h},
\end{aligned}
\end{equation}
 %\label{ph1}
\begin{align*}
p^{h}
&=-\frac{1}{\tau }P\Big(R^{l}-R^{2N-l}-R^{N-l}+R^{N+l}-R^{l+1}-R^{2N-l-1}
 -R^{N-l-1}\\
&\quad +R^{N+l+1}\Big) A_hv_0^{h}+(I-R^{2N})^{-1}\big(
R^{N-l}-R^{N+l}-R^{N-l-1}+R^{N+l+1}\big)\\
&\quad\times
\Big\{ -(2I+\tau D)^{-1}D^{-1}\sum_{i=1}^{N-1}(
R^{N-1-i}-R^{N-1+i}) \theta _{i}^{h}\tau +G_1(2I+\tau
D)^{-1}\\
&\quad D^{-1}  \sum_{i=1}^{N-1}\big[ R^{| 1-i|
-1}-R^{i}-R^{| N-i| -1}+R^{N+i-1}+R^{|
N-1-i| -1}-R^{N+i-2}\big] A_h\theta _{i}^{h}
\\
&\quad  +G_1( A_h\varphi ^{h}\ -A_h\psi ^{h}\ ) \Big\}
-(I-R^{2N})^{-1}( R^{N-l}-R^{N+l}-R^{N-l-1}+R^{N+l+1})
\\
&\quad \times (2I+\tau D)^{-1}D^{-1}\sum_{i=1}^{N-1}(
R^{N-1-i}-R^{N-1+i}) A_h\theta _{i}^{h}
+(2I+\tau D)^{-1}\\
&\quad\times D^{-1}\sum_{i=1}^{N-1}( R^{|
l-i| -1}-R^{l+i-1}-R^{| l+1-i|
-1}+R^{l+i}) A_h\theta _{i}^{h}+A_h\xi ^{h},
\end{align*}
 %\label{v01}
\begin{align*}
v_0^{h}
&=Q_1P(R^{N-1}-R^{N+1}-R^{N-l-1}+R^{N+l+1}+R^{N-l}-R^{N+l})
\\
&\quad \times \Big\{ (2I+\tau D)^{-1}D^{-1}\sum_{i=1}^{N-1}(
R^{N-1-i}-R^{N-1+i}) \theta _{i}\tau -G_1(2I+\tau D)^{-1}
\\
&\quad\times D^{-1} \sum_{i=1}^{N-1}( R^{| 1-i|
-1}-R^{i}+R^{| l+1-i| -1}-R^{l+i}-R^{|
l-i| -1}+R^{l+i-1}) \theta _{i}\tau
\\
&\quad  -\tau G_1( \varphi -\xi ) \Big\} +Q_1(I-R^{2N})^{-1}
\\
&\quad \times \big[ \ ( R^{N-1}-R^{N+1}) -(
R^{N-l-1}-R^{N+l+1}) +( R^{N-l}-R^{N+l}) \big]
\\
&\quad \times (2I+\tau D)^{-1}D^{-1}\sum_{i=1}^{N-1}(
R^{N-1-i}-R^{N-1+i}) \theta _{i}^{h}\tau ]-Q_1(2I+\tau D)^{-1}
\\
&\quad\times D^{-1} \sum_{i=1}^{N-1}\big[ ( R^{| 1-i|
-1}-R^{i}) -( R^{| l+1-i| -1}-R^{L+i})\\
&\quad +( R^{| l-i| -1}-R^{l+i-1}) \big] \theta _{i}^{h}\tau
 +\tau Q_1( \varphi ^{h}\ -\xi ^{h}),
\end{align*}
\begin{gather*}
P=(I-R^{2N})^{-1}, \\
G_1=(I+R^{N-1})^{-1}( I-R) ^{-1}(I+R^{N}), \\
Q_1=-( I-R^{N-l-1}) ^{-1}(I-R^{l})^{-1}(I-R^{N})(I-R) ^{-1}
\end{gather*}
for difference scheme \eqref{app1u}, and
\begin{equation} \label{uk2}
\begin{aligned}
u_k^{h}&=P( R^k-R^{2N-k}-R^{N-k}+R^{N+k}) v_0^{h}
+P( R^{N-k}-R^{N+k})
\\
&\quad \times \Big\{ (2I+\tau D)^{-1}D^{-1}\sum_{i=1}^{N-1}(
R^{N-1-i}-R^{N-1+i}) \theta _{i}^{h}\tau
\\
&\quad -G_2(2I+\tau D)^{-1}D^{-1}\sum_{i=1}^{N-1}
\big[ 4( R^{| 1-i| -1}-R^{i}) -( R^{|2-i| -1}-R^{i+1})
\\
&\quad  -3( R^{| N-i| -1}-R^{N+i-1}) +4(R^{| N-1-i| -1}-R^{N+i-2})
-R^{|N-2-i| -1}\\
&\quad +R^{N+i-3}\big] \theta _{i}^{h}\tau +2\tau G_2( \varphi ^{h}(x)-\psi
^{h}(x)) \Big\} -(I-R^{2N})^{-1}( R^{N-k}-R^{N+k})
\\
&\quad \times (2I+\tau D)^{-1}D^{-1}\sum_{i=1}^{N-1}(
R^{N-1-i}-R^{N-1+i}) \theta _{i}^{h}\tau \
\\
&\quad +(2I+\tau D)^{-1}D^{-1}\sum_{i=1}^{N-1}( R^{|
k-i| -1}-R^{k+i-1}) \theta _{i}^{h}\tau +t_kp^{h},
\end{aligned}
\end{equation}
\begin{align}
p^{h}&=\frac{1}{2\tau }P\big(R^{l}-R^{2N-l}-R^{N-l}+R^{N+l}-R^{l+2}+R^{2N-l-2}
 +R^{N-l-2}
\nonumber \\
&\quad -R^{N+l+2}\big) A_hv_0^{h}+\frac{1}{2\tau }
(I-R^{2N})^{-1}( R^{N-l}-R^{N+l}-R^{N-l-2}+R^{N+l+2})
\nonumber  \\
&\quad \times \Big\{ (2I+\tau D)^{-1}D^{-1}\sum_{i=1}^{N-1}(
R^{N-1-i}-R^{N-1+i}) A_h\theta _{i}^{h}\tau
\nonumber  \\
&\quad  -G_2(2I+\tau D)^{-1}D^{-1}\sum_{i=1}^{N-1}
\Big[ 4(R^{| 1-i| -1}-R^{i}) -( R^{|2-i| -1}-R^{i+1})
\nonumber  \\
&\quad  -3( R^{| N-i| -1}-R^{N+i-1}) +4(
R^{| N-1-i| -1}-R^{N+i-2})
\nonumber\\
&\quad  -( R^{|N-2-i| -1}-R^{N+i-3}) \Big] A_h\theta _{i}^{h}\tau
 +2\tau G_2( A_h\varphi ^{h}-A_h\psi ^{h}) \Big\}
\nonumber \\
&\quad  - \frac{1}{2}(I-R^{2N})^{-1}( R^{N-l}-R^{N+l}-R^{N-l-2}+R^{N+l+2})
\nonumber \\
&\quad \times (2I+\tau D)^{-1}D^{-1}\sum_{i=1}^{N-1}(
R^{N-1-i}-R^{N-1+i}) A_h\theta _{i}^{h}+\frac{1}{2}(2I+\tau
D)^{-1} \nonumber \\
&\quad\times D^{-1} \sum_{i=1}^{N-1}( R^{| l-i|
-1}-R^{l+i-1}-R^{| l+2-i| -1}+R^{l+i+1})
A_h\theta _{i}^{h}+A_h\xi ^{h}, \label{ph2}
\end{align}
%
\begin{align}
v_0^{h}
&=-Q_2P[ 4( R^{N-1}-R^{N+1}) -(R^{N-2}-R^{N+2})]
\nonumber \\
&\quad \times  \Big\{ (2I+\tau D)^{-1}D^{-1}\sum_{i=1}^{N-1}(
R^{N-1-i}-R^{N-1+i}) \theta _{i}^{h}\tau ]
-G_2(2I+\tau D)^{-1}
\nonumber \\
&\quad\times D^{-1}\sum_{i=1}^{N-1} \Big[ 4(R^{| 1-i| -1}-R^{i})
 -( R^{|2-i| -1}-R^{i+1}) -3( R^{| N-i|-1}-R^{N+i-1})
\nonumber \\
&\quad  +4( R^{| N-1-i| -1}-R^{N+i-2})
-( R^{| N-2-i| -1}-R^{N+i-3}) ] \ \theta
_{i}^{h}\tau +2\tau G_2( \varphi ^{h}(x)
\nonumber \\
&\quad -\psi ^{h}(x)) \Big\}  +Q_2P\Big\{ 4( R^{N-1}-R^{N+1}) -( R^{N-2}-R^{N+2})
+( \frac{\lambda }{\tau }-l-1)
\nonumber \\
&\quad \times \big[ ( -3( R^{l}-R^{2N-l}) +4(
R^{l+1}-R^{2N-l-1}) -( R^{l+2}-R^{2N-l-2}) ) \big]
\nonumber \\
&\quad  -( \frac{\lambda }{\tau }-l) \big[ ( -3(
R^{l+1}-R^{2N-l-1}) +4( R^{l+2}-R^{2N-l-2})
\nonumber \\
&\quad -(R^{l+3}-R^{2N-l-3}) ) \big] \Big\}
 (2I+\tau D)^{-1}D^{-1}\sum_{i=1}^{N-1}(
R^{N-1-i}-R^{N-1+i}) \theta _{i}^{h}\tau
\nonumber \\
&\quad  -Q_2(2I+\tau D)^{-1} D^{-1} \sum_{i=1}^{N-1}
\Big\{ 4( R^{| 1-i| -1}-R^{i}) -( R^{| 2-i| -1}-R^{i+1})
\nonumber \\
&\quad +( \frac{\lambda }{\tau }-l-1)
\big[ -3( R^{| l-i| -1}-R^{l+i-1})
+4( R^{| l+1-i| -1}-R^{l+i})
\nonumber \\
&\quad -(R^{| l+2-i| -1}-R^{l+i+1}) \big]
 -( \frac{\lambda }{\tau }-l) \Big[ -3( R^{|l+1-i| -1}-R^{l+i\ })
\nonumber \\
&\quad +4( R^{|l+2-i| -1}-R^{l+i+1})  -( R^{| l+3-i| -1}-R^{l+i+2})
\Big] \Big\} \theta _{i}^{h}\tau +2\tau Q_2( \varphi ^{h}(x)
\nonumber \\
&\quad -\xi ^{h}(x)) , \label{v02}
\end{align}
\begin{gather*}
G_2=\big[ ( I+R^{N}) ^{-1}( I-R) [ (
R-3I) -R^{N-2}( I-3R)] \big] ^{-1},
\\
Q_2=\big[ (I-R^{N})^{-1}( I-R) [ ( R-3I)
+R^{N-2}\ ( I-3R)] \big] ^{-1}
\end{gather*}
for difference scheme \eqref{app2u}, and the following theorem on
well-posedness of the elliptic difference problem.

\begin{theorem}[\cite{33}] \label{thm3}
  For the solution of the elliptic difference problem
\begin{gather*}
A_h^{x}u^{h}(x)=\omega ^{h}(x),\quad x\in \widetilde{\Omega }_h, \\
u^{h}(x)=0,\; x\in S_h^{1}, \quad D^{h}u^{h}(x)=0,\; x\in S_h^{2},
\end{gather*}
the following coercivity inequality holds:
\begin{equation*}
\sum_{q=1}^{n}\| (u^{h})_{\overline{x}_{q}x
_{q},j_{q}}\| _{L_{2h}}\leq M||\omega ^{h}||_{L_{2h}},
\end{equation*}
here $M$ does not depend on $h$ and $\omega ^{h}$.
\end{theorem}

\section{Numerical results}

For the numerical result, consider the inverse elliptic problem
\begin{equation}
\begin{gathered}
-\frac{\partial ^{2}u(t,x)}{\partial t^{2}}-\frac{\partial }{\partial x}
( (1+x)\frac{\partial u(t,x)}{\partial x}) +u(t,x)=f(t,x)+tp(x),
\\
f(t,x)=\exp ( -t) [ -2x-x^{2}+2tx] -2x+x^{2}+t^{2}
[ 3x-\frac{x^{2}}{2}] , \\
 0<x<1,\; 0<t<1, \\
u(0,x)=x^{2}-2x,\quad 0\leq x\leq 1, \\
u(1,x)=[ e^{-1}+1] ( \frac{x^{2}}{2}-x) ,\quad 0\leq x\leq 1, \\
u(\lambda ,x)=[ \exp ( -\lambda ) +\lambda]
 (\lambda x-\frac{\lambda x^{2}}{2}+x^{2}-2x) ,\quad 0\leq x\leq 1, \\
u(t,0)=0,\quad u_{x}(t,1)=0,\quad 0\leq t\leq 1,\quad \lambda =\frac{3}{5}.
\end{gathered}  \label{aaaa1}
\end{equation}
It can be easily seen that $u(x,t)=[ \exp ( -t) +t]
( tx-\frac{tx^{2}}{2}+x^{2}-2x) $ and $p(x)=-6x+x^{2}$ are the
exact solutions of \eqref{aaaa1}.

We introduce the set $[ 0,1] _{\tau }\times [ 0,1] _h$ of grid points
\begin{align*}
[ 0,1]_{\tau }\times [ 0,1]_h
 =\big\{&(t_k,x_n): t_k=k\tau,\; k=1,\dots ,N-1,\;
 N\tau =1, \\
& x_n=nh,\;  n=1,\dots ,M-1,\; Mh=1\Big\}.
\end{align*}

Applying \eqref{approv1} and \eqref{approv2}, respectively, we get the first
order of accuracy difference scheme, in $t$ and in $x$,
\begin{equation}
\begin{gathered}
\begin{aligned}
&\frac{v_n^{k+1}-2v_n^k+v_n^{k-1}}{\tau ^{2}}+( 1+x_n)
\frac{v_{n+1}^k-2v_n^k+v_{n-1}^k}{h^{2}}+\frac{
v_{n+1}^k-v_{n-1}^k}{2h}-v_n^k\\
& =-f(t_k,x_n), \quad k=1,\dots ,N-1,\;  n=1,\dots ,M-1,
\end{aligned} \\
v_0^k=0,\quad v_{M}^k-v_{M-1}^k=0,\quad k=0,\dots ,N,
\\
v_n^{1}-v_n^{0}-v_n^{l+1}+v_n^{l}=\tau ( \varphi _n-\xi
_n) ,
 \\
v_n^{N}-v_n^{N-1}-v_n^{l+1}+v_n^{l}=\tau ( \psi _n-\xi
_n) ,
 \\
\varphi _n=\varphi ( x_n) ,\quad
\psi _n=\psi ( x_n) ,\quad
\xi _n=\xi ( x_n) , \quad n=0,\dots ,M,\; l=[ \frac{\lambda }{
\tau }],
\end{gathered} \label{app1v}
\end{equation}
and the second order of accuracy difference scheme, in $t$ and in $x$,
\begin{equation}
\begin{gathered}
\begin{aligned}
&\frac{v_n^{k+1}-2v_n^k+v_n^{k-1}}{\tau ^{2}}+( 1+x_n)
\frac{v_{n+1}^k-2v_n^k+v_{n-1}^k}{h^{2}}+\frac{
v_{n+1}^k-v_{n-1}^k}{2h}-v_n^k\\
& =-f(t_k,x_n), \quad k=1,\dots ,N-1,\; n=1,\dots ,M-1,
\end{aligned}\\
v_0^k=0,\quad -3v_{M}^k+4v_{M-1}^k-v_{M-2}^k=0,
  \\
10v_{M}^k-15v_{M-1}^k+6v_{M-2}^k-v_{M-3}^k=0,\quad k=0,\dots ,N,
\\
\begin{aligned}
&( -3v_n^{0}+4v_n^{1}-v_n^{2}) +( \frac{\lambda }{\tau }
-l-1) ( 3v_n^{l}-4v_n^{l+1}+v_n^{l+2}) \\
&-( \frac{\lambda }{\tau }-l) (
3v_n^{l+1}-4v_n^{l+2}+v_n^{l+3}) =2\tau ( \varphi _n-\xi
_n)
\end{aligned}\\
\begin{aligned}
&3v_n^{N}-4v_n^{N-1}+v_n^{N-2}+( \frac{\lambda }{\tau }-l-1)
( 3v_n^{l}-4v_n^{l+1}+v_n^{l+2}) \\
&-( \frac{\lambda }{\tau }-l) (3v_n^{l+1}-4v_n^{l+2}+v_n^{l+3})
=2\tau ( \psi _n-\xi_n) ,
\end{aligned}
 \\
\varphi _n=\varphi ( x_n) ,\quad
\psi _n=\psi ( x_n) ,\quad
\xi _n=\xi ( x_n) , \quad k=0,\dots ,N,\;
l=[\frac{\lambda }{\tau }]
\ \label{app2v}
\end{gathered}
\end{equation}
for the approximate solution of the auxiliary nonlocal problem
\eqref{nonlocal}. Note that both difference schemes have the second order of
accuracy in $x$.

The difference scheme \eqref{app1v} can be rewritten in the matrix
form
\begin{equation} \label{app1vmatr}
\begin{gathered}
A_nv_{n+1}+B_nv_n+C_nv_{n-1} =I\theta _n,\quad n=1,\dots ,M-1,
 \\
v_0 =\overrightarrow{0},\quad
v_{M}-v_{M-1}=\overrightarrow{0}.
\end{gathered}
\end{equation}
Here, $\theta _n$, $v_{n-1},v_n,v_{n+1}~$are $(N+1)\times 1$ column
vectors
\begin{gather*}
\theta _n =
\begin{bmatrix}
\theta _n^{0} \\
\vdots \\
\theta _n^{N}
\end{bmatrix}_{(N+1)\times 1},\quad
v_{i}=\begin{bmatrix}
v_{i}^{0} \\
\vdots \\
v_{i}^{N}
\end{bmatrix}_{(N+1)\times 1},\quad i=n-1,n,n+1,
\\
\theta _n^{0} = \tau ( \varphi _n-\xi _n) ,\quad
\theta_n^{N}=\tau ( \psi _n-\xi _n) ,\quad n=1,\dots ,M-1, \\
\theta _n^k =-f(t_k,x_n),\quad k=1,\dots ,N-1,\quad n=1,\dots ,M-1,
\end{gather*}
and $A$, $B$, $C$ are $(N+1)\times (N+1)$ square matrices
\begin{equation}
A_n=\begin{bmatrix}
0 & 0 &   &  &  0 \\
0 & a_n &  &  &  &  \\
  &  & \ddots &&  \\
 &  &  & a_n & 0  \\
0 &  &    & 0 & 0 
\end{bmatrix}, \label{Amatrix}
\end{equation}
\[
B_n=\begin{bmatrix}
 1 & -1 & 0 &  0 & 1 & -1 & &  &  0 \\
 d & b_n & d & \  &  &  &  &  & &  \\
 0 & d & b_n & \ddots  &  &  &  &  &  &\\ 
  &  & \ddots  & \ddots  & \ddots  &   &   &  &\\
  &  &  & d  & b_n  & d &  &  & \\
  &  &  &  &\ddots  & \ddots  & \ddots  &  &  & \\
  &  &  &  &  & \ddots & b_n & d &0\\
  &  &  &  &  &   & d   & b_n  & d  \\
0&  &  &  0 & 1 & -1 &   0   &-1    & 1 
\end{bmatrix},
\]

\begin{equation}
C_n= \begin{bmatrix}
0 & 0 &  &  & 0\\
0 & c_n &  &  &  &\\
 & & \ddots & & \\
 &  &  &c_n & 0 \\
0 & & &0 & 0
\end{bmatrix}, \label{Cmatrix}
\end{equation}

\begin{gather*}
a_n=\frac{(1+x_n)}{h^{2}}+\frac{1}{2h},\quad
b=-\frac{2}{\tau ^{2}}-\frac{ 2(1+x_n)}{h^{2}}-1,\\
c=\frac{(1+x_n)}{h^{2}}-\frac{1}{2h},\quad d=\frac{1}{\tau ^{2}},
\end{gather*}
and $I$ is the $(N+1)\times (N+1)$ identity matrix.

We search for a solution of \eqref{app1vmatr} by using the formula
(see \cite{32})
\[
v_n=\alpha _{n+1}v_{n+1}+\beta _{n+1},\quad n=1,\dots ,M-1,
\]
where $\alpha _1,\dots ,\alpha _{M-1}$ are $(N+1)\times (N+1)$ square
matrices and $\beta _1,\dots ,\beta _{M-1}$ are $(N+1)\times 1$ column
matrices. For the solution of system equations \eqref{app1vmatr}, we have
recurrent formulas for calculation of $\alpha _{n+1},\beta _{n+1}$:
\begin{gather*}
\alpha _{n+1} =-(B+C\alpha _n)^{-1}A, \\
\beta _{n+1} =-(B+C\alpha _n)^{-1}(I\theta _n-C\beta _n),\quad
n=1,\dots ,M-1,
\end{gather*}
where $\alpha _1$ is the zero matrix and $\beta _1$ is the zero column
vector.

Applying formula \eqref{p}, we have
\begin{align*}
p_n &= 2x_n( ( 3-\lambda ) \exp ( -\lambda )+2\lambda -2) \\
&\quad +( 1+x_n) \big[ \frac{
v_{n+1}^{l+2}-v_{n+1}^{l+1}-2v_n^{l+2}+2v_n^{l+1}+v_{n-1}^{l+2}-v_{n-1}^{l+1}
}{h^{2}\tau }\big] \\
&\quad+\big[ \frac{v_{n+1}^{l+2}-v_{n+1}^{l+1}-v_n^{l+2}+v_n^{l+1}}{\tau h}
\big] -\big[ \frac{v_n^{l+2}-v_n^{l+1}}{\tau }\big] , \quad
n = 1,\dots ,M-1.
\end{align*}
Now, the first order accuracy in $t$ and the second order of accuracy in $x$
an approximate solution of inverse problem will be defined by
\begin{equation*}
u_n^k=v_n^k+t_k(\xi _n-\frac{v_n^{l+2}-v_n^{l+1}}{\tau }
),\quad n=0,\dots ,M,\; k=0,\dots ,N.
\end{equation*}
The difference scheme \eqref{app2v} can be rewritten in the matrix form
\begin{equation} \label{app2vmatr}
\begin{gathered}
A_nv_{n+1}+B_nv_n+C_nv_{n-1} = I\theta _n,\quad n=1,\dots ,M-1,
 \\
v_0 = \overrightarrow{0},\quad -3v_{M}+4v_{M-1}-v_{M-2}=\overrightarrow{0}.
\end{gathered}
\end{equation}
where matrices $A_n$ and $C_n$ are defined by \eqref{Amatrix},
\eqref{Cmatrix}, respectively, $B_n$ is the  matrix
\begin{equation*}
B_n=\begin{bmatrix}
 -3 & 4 & -1 &  z_{l} & z_{l+1} & z_{l+2} & &  &  0 \\
 d & b_n & d & \  &  &  &  &  & &  \\
 0 & d & b_n & \ddots  &  &  &  &  &  &\\ 
  &  & \ddots  & \ddots  & \ddots  &   &   &  &\\
  &  &  & d  & b_n  & d &  &  & \\
  &  &  &  &\ddots  & \ddots  & \ddots  &  &  & \\
  &  &  &  &  & \ddots & b_n & d &0\\
  &  &  &  &  &   & d   & b_n  & d  \\
0 &  &  &  z_{l} & z_{l+1} & z_{l+2} &   1   &-4    & 3 
\end{bmatrix},
\end{equation*}
where
\begin{gather*}
z_{l} = 3( \frac{\lambda }{\tau }-l-1) , \quad
z_{l+1}=4-7( \frac{ \lambda }{\tau }-l) , \\
z_{l+2} = -1+5( \frac{\lambda }{\tau }-l) ,\quad
z_{l+3}=-\frac{\lambda }{\tau }+l.
\end{gather*}
We search of a solution of \eqref{app2vmatr} by using the formula
\begin{equation*}
v_n=\alpha _nv_{n+1}+\beta _nv_{n+2}+\gamma _n,\quad n=0,\dots ,M-2,
\end{equation*}
where $\alpha _0,\dots ,\alpha _{M-2}$ and
$\beta _0,\dots ,\beta_{M-2}$ are $(N+1)\times (N+1)$ square matrices and
$\gamma _0,\dots ,\gamma _{M-2}$ are $(N+1)\times 1$ column matrices.
From \eqref{app2vmatr} follows the next formulas for the coefficients
$\alpha _n,\beta _n$, $\gamma _n$:
\begin{gather*}
\alpha _n = -(B_n+C_n\alpha _{n-1})^{-1}(A_n+C_n\beta
_{n-1}),\quad \beta _n=0, \\
\gamma _n = (B_n+C_n\alpha _{n-1})^{-1}(I_{N+1}\theta
_n-C_n\gamma _{n-1}),\quad n=1,\dots ,M-1,
\end{gather*}
where
\begin{gather*}
\alpha _0 = 0,\quad \beta _0=0, \quad \gamma _0=0,\quad
\alpha _1=\frac{8}{5} I, \quad \beta _1=-\frac{3}{5}I, \\
\alpha _{M-2} = 4I,\quad \beta _{M-2}=-3I,\quad
\alpha _{M-3}=\frac{8}{3}I,\quad \beta_{M-3}=-\frac{5}{3}I,
\end{gather*}
and $\gamma _0,\gamma _1,\gamma _{M-2},\gamma _{M-3}$ are zero column
vectors.
We denote
\begin{gather*}
Q_{11} = -3A_{M-2}-8B_{M-2}-8C_{M-2}\alpha _{M-3}-3C_{M-2}\beta _{M-3}, \\
Q_{12} = 4A_{M-2}+9B_{M-2}+9C_{M-2}\alpha _{M-3}+4C_{M-2}\beta _{M-3}, \\
Q_{21} = -3B_{M-1}-8C_{M-1},~Q_{22}=A_{M-1}+4B_{M-1}+9C_{M-1}, \\
G_1 = I\theta _{M-2}-C_{_{M-2}}\gamma _{M-3},G_2=I\theta _{M-1}.
\end{gather*}
Then, $v_{M}$ and $v_{M-1}$ can be calculated  by the formulae
\begin{gather*}
v_{M} = (Q_{11}-Q_{12}Q_{22}^{-1}Q_{21})^{-1}(G_1-Q_{12}Q_{22}^{-1}G_2),\\
v_{M-1} = Q_{22}^{-1}(G_2-Q_{21}v_{M}).
\end{gather*}
Applying \eqref{p}, we obtain
\begin{align*}
p_n
&= 2x_n( ( 3-\lambda ) \exp ( -\lambda )+2\lambda -2) \\
&\quad +( 1+x_n) \big[
\frac{ v_{n+1}^{l+2}-v_{n+1}^{l}-2v_n^{l+2}+2v_n^{l}+v_{n-1}^{l+2}-v_{n-1}^{l}}{
2h^{2}\tau }\big] \\
&\quad +\big[ \frac{v_{n+1}^{l+2}-v_{n+1}^{l}-v_n^{l+2}+v_n^{l}}{2\tau h}
\big] -\big[ \frac{v_n^{l+2}-v_n^{l}}{2\tau }\big] , \quad
n = 1,\dots ,M-1.
\end{align*}

Finally, the second order of accuracy in $t$ and $x$ of an approximate solution of
inverse problem will be defined by
\[
u_n^k=v_n^k+t_k(\xi _n-\frac{v_n^{l+2}-v_n^{l}}{2\tau }
),\quad n=0,\dots ,M,\; k=0,\dots ,N.
\]
Now, using MATLAB programs, we give numerical results for problem
\eqref{aaaa1}. The numerical results are presented for different $N$ and $M$.

$u_n^k$ represents the numerical solution of the corresponding
difference schemes for inverse problem at  grid point $(t_k,x_n)$.
$p_n$ represents the numerical solution at point $x_n$ for unknown
function $p$. The errors of approximate solutions are computed by the
 norms
\begin{gather*}
Eu_{M}^{N}=\max_{1\leq k\leq N-1}
\Big(\sum_{n=1}^{M-1}| u(t_k,x_n)-u_n^k|^{2}h\Big)^{1/2},
\\
Ep_{M}=\Big(\sum_{n=1}^{M-1}| p(x_n)-p_n|^{2}h\Big)^{1/2},
\end{gather*}
respectively. Tables \ref{table1}--\ref{table2} give the error of approximate
 solutions of difference schemes for given exact solution.
They show numerical results for $N=M=20, 40, 80, 160$. Errors for
$p$ are in Table \ref{table1}, and for $u$ in Table \ref{table2}.
The numerical results show that the second order of accuracy difference
scheme is more accurate comparing with the first order of accuracy
difference scheme.

\begin{table}[ht]
\renewcommand{\arraystretch}{1.3}
\caption{Errors for $p$} \label{table1}
\begin{center}
\begin{tabular}{|c|c|c|c|c|}
\hline
accuracy DS & $N=M=20$ & $N=M=40$ & $N=M=80$ & $N=M=160$ \\
\hline
1st order  & 0.13122 & 0.064479 & 0.031979 & 0.015927 \\
\hline
2nd order  & $0.0034378$ & $8.93\times 10^{-4}$ & $2.277\times
10^{-4}$ & $5.75\times 10^{-5}$ \\ \hline
\end{tabular}
\end{center}
\end{table}

\begin{table}[ht]
\renewcommand{\arraystretch}{1.3}
\caption{Errors for $u$} \label{table2}
\begin{center}
\begin{tabular}{|c|c|c|c|c|}
\hline
accuracy DS& $N=M=20$ & $N=M=40$ & $N=M=80$ & $N=M=160$ \\ \hline
1st order  & 0.024351 & 0.012054 &
0.005994 & 0.0029885 \\ \hline
2nd order  & 0.0011314 & $2.81\times
10^{-4}$ & $7.01\times 10^{-5}$ & $1.75\times 10^{-5}$ \\ \hline
\end{tabular}
\end{center}
\end{table}

\subsection*{Conclusion}
In this paper, a numerical solution of inverse problem for the
multi-dimensional elliptic equation with Neumann type overdetermination and
Dirichlet-Neumann boundary conditions is considered. The first and second
order of accuracy difference schemes for this inverse problem are
constructed. We establish the stability and almost coercive stability
estimates for the solution of these difference schemes. Numerical example
with explanation on the realization is included to illustrate theoretical
results. Moreover, applying the results of works \cite{3}, \cite{8} the high
order of accuracy stable difference schemes for the numerical solution of
the inverse elliptic problem with Neumann type overdetermination can be
presented.

\begin{thebibliography}{99}

\bibitem{1} T. S. Aleroev, M. Kirane, Salman A. Malik;
\emph{Determination of a source term for a time fractional diffusion equation
with an integral type over-determining condition},
Electron. J. Differential Equations \textbf{2013} (2013), No. 270, pp. 1--16.

\bibitem{2} A. Ashyralyev;
\emph{On the problem of determining the parameter of a parabolic equation},
Ukr. Math. J. \textbf{62 }(9) (2011), pp. 1397--1408.

\bibitem{3} A. Ashyralyev, D. Arjmand;
\emph{A note on the Taylor's decomposition on four points for a
 third-order differential equation}, Applied Mathematics and Computation,
\textbf{188} (2) (2007), pp. 1483--1490.

\bibitem{4} A. Ashyralyev, C. Ashyralyyev;
\emph{On the problem of determining the parameter of an elliptic equation
in a Banach space,} Nonlinear Anal. Model. Control \textbf{19} (3) (2014),
pp. 350--366.

\bibitem{5} A. Ashyralyev, A. S. Erdogan;
\emph{Well-posedness of the inverse problem of a multidimensional parabolic equation},
 Vestn. Odessa Nat. Univ., Math. Mech., \textbf{15} (18) (2010), pp. 129--135.

\bibitem{6}  A. Ashyralyev, A. S. Erdogan, O. Demirdag;
\emph{On the determination of the right-hand side in a parabolic equation},
Appl. Numer. Math.  \textbf{62} (11) (2012), pp. 1672--1683.

\bibitem{7} A. Ashyralyev, A. Sarsenbi;
\emph{Well-posedness of a parabolic equation with nonlocal boundary condition},
Bound. Value Probl. \textbf{2015}:51 (2015).

\bibitem{8} A. Ashyralyev, P. E. Sobolevskii;
\emph{New Difference Schemes for Partial Differential Equations},
Operator Theory Advances and Applications, Birkh\"{a}user Verlag, Basel,
Boston, Berlin, (2004).

\bibitem{9} A. Ashyralyev, M. Urun;
\emph{Determination of a control parameter for the Schrodinger equation},
 Contemporary Analysis and Applied Mathematics \textbf{1} (2) (2013), pp. 156--166.

\bibitem{10} C. Ashyralyyev;
\emph{High order of accuracy difference schemes for the inverse elliptic problem
with Dirichlet condition}, Bound. Value Probl. \textbf{2014}:5 (2014), 23
pages.

\bibitem{11} C. Ashyralyyev;
\emph{High order approximation of the inverse elliptic problem with
Dirichlet-Neumann Conditions}, Filomat,  \textbf{28}
(5) (2014), pp. 947--962.

\bibitem{12} C. Ashyralyyev;
\emph{Inverse Neumann problem for an equation of elliptic type,}
AIP Conference Proceedings, \textbf{1611} (2014), pp. 46-52.

\bibitem{13} C. Ashyralyyev, M. Dedeturk;
\emph{Finite difference method for the inverse elliptic problem with Dirichlet
 condition}, Contemporary Analysis and Applied Mathematics, \textbf{1} (2) (2013),
 pp. 132--155.

\bibitem{14} C. Ashyralyyev, M. Dedeturk;
\emph{Approximate solution of inverse problem for elliptic equation with
overdetermination}, Abstr. Appl. Anal. \textbf{2013 }(2013),
Article ID 548017, 11 pages.

\bibitem{15} C. Ashyralyyev, M. Dedeturk;
\emph{Approximation of the inverse elliptic problem with mixed boundary
value conditions and overdetermination}, Bound. Value Probl.
\textbf{2015}:51 (2015), 15 pages.

\bibitem{16} C. Ashyralyyev, \ O. Demirdag;
\emph{The difference problem of obtaining the parameter of a parabolic equation},
 Abstr. Appl. Anal. \textbf{2012} (2012), Article ID 603018,  14 pages.

\bibitem{17} C. Ashyralyyev, A. Dural, Y. Sozen;
\emph{Finite difference method for the reverse parabolic problem with
 Neumann condition}, AIP Conference Proceedings  \textbf{1470 }(2012), pp. 102-105.

\bibitem{18} A. Bouzitouna, N. Boussetila, F. Rebbani;
\emph{Two regularization methods for a class of inverse boundary value problems of
elliptic type}, Bound. Value Probl. \textbf{2013}:178 (2013).

\bibitem{19} Y. S. Eidel'man;
\emph{An inverse problem for an evolution equation}, Mathematical Notes,
\textbf{49} (5) (1991), pp. 535--540.

\bibitem{20} A. S. Erdogan, A. Sazaklioglu;
\emph{A note on the numerical solution of an identification problem for
observing two-phase flow in capillaries}, Mathematical method in the Aplied
Sciences, \textbf{37} (16) (2014), pp. 2393--2405.

\bibitem{21} S. I. Kabanikhin;
\emph{Inverse and ill-posed problems: theory and applications,}
Walter de Gruyter, Berlin, (2011).

\bibitem{22} M. Kirane, Salman A. Malik, M. A. Al-Gwaiz;
\emph{An inverse source problem for a two dimensional time fractional diffusion
equation with nonlocal boundary conditions}, Mathematical Methods in the Applied
Sciences, \textbf{36} (9) (2013), pp. 056--069.

\bibitem{23} S. G. Krein;
\emph{Linear Differential Equations in Banach Space.}
Nauka, Moscow, Russia, (1966).

\bibitem{24} D. G. Orlovskii;
\emph{Inverse Dirichlet Problem for an Equation of Elliptic Type},
Differ. Equ., \textbf{44} (1) (2008), pp. 124--134.

\bibitem{25} D. G. Orlovsky, S. Piskarev;
\emph{On approximation of inverse problems for abstract elliptic problems},
J. Inverse Ill-Posed Probl., \textbf{17} (8) (2009), pp. 765--782.

\bibitem{26} D. Orlovsky, S. Piskarev;
\emph{The approximation of Bitzadze-Samarsky type inverse problem for
elliptic equations with Neumann conditions}, Contemporary Analysis and
Applied Mathematics \textbf{1} (2) (2013), pp. 118--131.

\bibitem{27} D. Orlovsky, S. Piskarev;
\emph{Approximation of inverse Bitzadze-Samarsky problem for elliptic eqaution
with Dirichlet conditions}, Differ. Equ. \textbf{49} (7) (2013), pp. 895--907.

\bibitem{28} A. I. Prilepko, D. G. Orlovsky, I. A. Vasin;
\emph{Methods for solving inverse problems in mathematical physics},
 Marcel Dekker, New York, (2000).

\bibitem{29} A. Qian;
\emph{Identifying an unknown source in the Poisson
equation by a wavelet dual least square method}, Bound. Value Probl. \textbf{
2013}:267 (2013).

\bibitem{30} N. C. Roberty;
\emph{Simultaneous Reconstruction of Coefficients and Source Parameters
 in Elliptic Systems Modelled with Many Boundary Value Problems},
Mathematical Problems in Engineering \textbf{2013}
(2013), Article ID 631950.

\bibitem{31} A. A. Samarskii, P. N. Vabishchevich;
\emph{Numerical methods for solving inverse problems of mathematical physics.
Inverse and Ill-Posed Problems Series,} Walter de Gruyter, Berlin, (2007).

\bibitem{32} A. A. Samarskii, E. S. Nikolaev;
\emph{Numerical methods for grid equations, Vol 2, }Birkh\"{a}user, Basel,
Switzerland, (1989).

\bibitem{33} P. E. Sobolevskii;
\emph{Difference Methods for the Approximate Solution of Differential Equations}.
 Voronezh State University Press, Voronezh, Russia, 1975 (in Russian)

\bibitem{34} V. V. Soloviev;
\emph{Inverse problems of source determination for the two-dimensional
Poisson equation}, Zh. Vychisl. Mat. Mat. Fiz., \textbf{44} (5) (2004),
 pp. 862--871.

\bibitem{35} V. V. Soloviev;
\emph{Inverse Problems of Determining the Source and Coefficient in an Elliptic
Equation in a Rectangle}, Zh. Vychisl. Mat. Mat. Fiz., \textbf{47} (8) (2007),
 pp. 1365--1377.

\bibitem{36} V. V. Soloviev;
\emph{Inverse Coefficient Problems for Elliptic Equations in a Cylinder: I,}
Differ. Equ., \textbf{49} (7) (2011), pp. 908--916.

\end{thebibliography}

\end{document}
