1 Introduction

Quantum graphs or differential equations networks have wide applications in science and engineering and give rise to challenging problems involving many areas of modern mathematics, from combinatorics to partial differential equations and spectral theory. A number of surveys and collections of papers on quantum graphs appeared last years, including the first books on this topic by Berkolaiko and Kuchment [8] and Mugnolo [14]. In the present work we consider tree graphs, that is, finite connected compact graphs without cycles. The Weyl or Titchmarsh-Weyl matrix of a quantum graph is one of the key mathematical objects, it naturally appears in direct and inverse spectral theory, in the control theory of quantum graphs and in numerous applications. Its importance lies in the fact that the Weyl matrix (or more precisely, its transposed matrix) is the Dirichlet-to-Neumann map of the quantum graph. For a fixed value of the spectral parameter, a vector of arbitrary Dirichlet-type boundary values of a solution multiplied by the transposed Weyl matrix gives one a vector of the corresponding Neumann-type boundary values, if only the value of the spectral parameter is not a Dirichlet eigenvalue of the quantum graph. Moreover, the singularities of the Weyl matrix, considered as a function of the spectral parameter, determine the Dirichlet spectrum of the quantum graph. Many papers on inverse problems for quantum graphs exploit the Weyl matrix or equivalent spectral data, see, e.g., [2, 6, 7, 9, 10, 15].

Direct construction of the Weyl matrix for a sufficiently large quantum tree is quite a challenging problem. It requires solving large systems of equations involving solutions (and their derivatives) of differential equations on all edges of the tree. The main result of the present work is a simple procedure for a progressive synthesis of the Weyl matrix of an arbitrary quantum tree. Starting from just one leaf edge and adding successively new edges, it allows one to compute the Weyl matrices for ever larger quantum trees from the Weyl matrices for the smaller ones. We call this procedure the synthesis of the Weyl matrix. In a sense, it is inverse with respect to the leaf peeling method, which was developed in [2], see also [3, 4]. The proposed synthesis of the Weyl matrix is based on revealed relations between Weyl solutions of a larger quantum tree graph \(\Omega \) with those of a smaller one \({\widetilde{\Omega }}\), obtained from \(\Omega \) by cutting out all the leaf edges of an internal vertex.

In Sect. 2 we recall necessary definitions and express the Weyl solutions in terms of fundamental systems of solutions of the Sturm–Liouville equation on each edge. Section 3 presents the main result of the work, the procedure of the synthesis of a Weyl matrix of an arbitrary quantum tree graph. Finally, Sect. 4 contains some concluding remarks.

2 Preliminaries

Let \(\Omega \) be a finite connected compact graph without cycles (a tree graph) consisting of P edges, \(e_{1}, \ldots , e_{P},\) and \(P+1\) vertices, \(V=\left\{ v_{1},\ldots ,v_{P+1}\right\} .\) The notation \(e_{j}\sim v\) means that the edge \(e_{j}\) is incident to the vertex v. Every edge \(e_{j}\) is identified with an interval \((0,L_{j})\) of the real line. The boundary \(\Gamma =\left\{ \gamma _{1},\ldots ,\gamma _{m}\right\} \) of \(\Omega \) is the set of all leaves of the graph (the external vertices). The edge adjacent to some \(\gamma _{j}\ \)is called a leaf or boundary edge.

A continuous function u defined on the graph \(\Omega \) is a P-tuple of functions \(u_{j}\in C\left[ 0,L_{j}\right] \) satisfying the continuity condition at the internal vertices v: \(u_{i}(v)=u_{j}(v)\) for all \(e_{i},e_{j}\sim v\). Then \(u\in C(\Omega )\).

Let \(q\in {\mathcal {L}} _{1}(\Omega )\) be real valued, and \(\lambda \) a complex number. Consider the Sturm–Liouville equation on \(\Omega \):

$$\begin{aligned} -u^{\prime \prime }(x)+q(x)u(x)=\lambda u(x). \end{aligned}$$
(2.1)

A function u defined on \(\Omega \) is said to be a solution of (2.1) if besides (2.1) we have that

$$\begin{aligned} u\in C(\Omega ), \end{aligned}$$
(2.2)

and for every internal vertex v the Kirchhoff-Neumann condition is fulfilled

$$\begin{aligned} \sum _{e_{j}\sim v}\partial u_{j}(v)=0,\quad \text {for all }v\in V{\setminus } \Gamma . \end{aligned}$$
(2.3)

Here \(u_{j}\) is a restriction of u onto \(e_{j}\), \(\partial u_{j}(v)\) stands for the derivative of u at the vertex v taken along the edge \(e_{j}\) in the direction outward the vertex, and the sum is taken over all the edges incident to the internal vertex v.

For simplicity, we assume that the considered graph does not have vertices of degree two, because every such vertex can be regarded as an internal point of an edge which is a sum of two edges incident at such a vertex, and the continuity condition (2.2) together with the Kirchhoff–Neumann condition (2.3) guarantee that any solution of (2.1) on the incident edges keeps satisfying (2.1) also on the union of them.

Definition 2.1

A solution \(w_{i}\) of (2.1) on \(\Omega \) is called the Weyl solution associated with the leaf \(\gamma _{i}\) if it satisfies the boundary conditions

$$\begin{aligned} w_{i}(\gamma _{i})=1\quad \text {and}\quad w_{i}(\gamma _{j})=0\text { for all }j\ne i. \end{aligned}$$
(2.4)

If \(\lambda \) in (2.1) is not a Dirichlet eigenvalue of the quantum tree \(\Omega \), the Weyl solution \(w_{i}\) exists and is unique for any \(i=1,\ldots ,m\). In particular, since the potential q is real valued, the Dirichlet spectrum is real and thus the boundary value problem (2.1), (2.4) is uniquely solvable for all \(\lambda \notin {\mathbb {R}}\).

Definition 2.2

The \(m\times m\) matrix-function \({\textbf{M}}(\lambda )\), \(\lambda \notin {\mathbb {R}}\), consisting of the elements \({\textbf{M}}_{ij}(\lambda )=\partial w_{i}(\gamma _{j})\), \(i,j=1,\ldots ,m\) is called the Weyl matrix.

For a fixed value of \(\lambda \), the transposed Weyl matrix represents a Dirichlet-to-Neumann map of the quantum graph defined by \(\Omega \) and \(q\in {\mathcal {L}} _{1}(\Omega )\). Indeed, if u is a solution of (2.1) satisfying the Dirichlet condition at the boundary vertices \(u(\lambda ,\gamma )=f(\lambda )\), then \(\partial u(\lambda ,\gamma )={\textbf{M}}^{T}(\lambda )f(\lambda )\), \(\lambda \notin {\mathbb {R}}\).

It is clear that the direct computation of the Weyl matrix, which involves finding Weyl solutions and computing their derivatives at leaves may be a difficult task, especially, when \(\Omega \) consists of a large number of edges. The corresponding systems of equations which need to be solved in this case may be too large, because they should combine information on the solutions and their derivatives on each edge and at all internal vertices.

The main result of the present work is a simple procedure which allows one to synthesize the Weyl matrix progressively, by adding edges to smaller graphs and computing the Weyl matrices for the obtained larger graphs from the Weyl matrices for the smaller ones. We call this procedure synthesis of the Weyl matrix. It allows one to compute the Weyl matrix of any quantum tree starting from one leaf edge and adding successively new edges.

By \(\varphi _{i}(\rho ,x)\) and \(S_{i}(\rho ,x)\) we denote the solutions of the Sturm–Liouville equation on the edge \(e_{i}\):

$$\begin{aligned} -y^{\prime \prime }(x)+q_{i}(x)y(x)=\rho ^{2}y(x),\quad x\in (0,L_{i} ), \end{aligned}$$
(2.5)

satisfying the initial conditions

$$\begin{aligned}{} & {} \varphi _{i}(\rho ,0)=1,\quad \varphi _{i}^{\prime }(\rho ,0)=0, \\{} & {} S_{i}(\rho ,0)=0,\quad S_{i}^{\prime }(\rho ,0)=1. \end{aligned}$$

Here \(q_{i}(x)\) is the component of the potential q(x) on the edge \(e_{i}\), and \(\rho =\sqrt{\lambda }\), \({\text {Im}}\rho \ge 0\). For a leaf edge \(e_{i}\) it is convenient to identify its leaf \(\gamma _{i}\) with the left endpoint \(x=0.\) Then the Weyl solution \(w_{i}(\rho ,x)\) has the form

$$\begin{aligned} w_{ii}(\rho ,x)=\varphi _{i}(\rho ,x)+{\textbf{M}}_{i,i}(\rho ^{2})S_{i} (\rho ,x)\quad \text {on the adjacent leaf edge }e_{i} \end{aligned}$$

and

$$\begin{aligned} w_{ij}(\rho ,x)={\textbf{M}}_{i,j}(\rho ^{2})S_{j}(\rho ,x)\quad \text {on every other leaf edge }e_{j},\quad j\ne i. \end{aligned}$$

Hereafter, the notation \(w_{ij}(\rho ,x)\) means that we consider j-th component of a solution \(w_{i}(\rho ,x)\), that is, the solution \(w_{i}(\rho ,x)\) on the edge \(e_{j}\).

On internal edges \(e_{j}\) we have

$$\begin{aligned} w_{ij}(\rho ,x)=a_{ij}(\rho )\varphi _{j}(\rho ,x)+b_{ij}(\rho )S_{j}(\rho ,x), \end{aligned}$$

where the choice of which vertex is identified with zero is arbitrary, and in general the factors \(a_{ij}(\rho )\), \(b_{ij}(\rho )\) are unknown.

Since in direct and inverse spectral problems involving the Weyl matrix one deals with solutions on large ranges of the parameter \(\rho \), it is convenient to use the Neumann series of Bessel functions representations for \(\varphi _{j}(\rho ,x)\) and \(S_{j}(\rho ,x)\), introduced in [12] and applied in a number of direct and inverse problems (see, e.g., [1, 4, 5, 11, 13]). One of the features of these representations is the existence of estimates for the remainders of the series independent of \({\text {Re}}\rho \).

3 Synthesis of Weyl matrix

Consider a quantum tree graph \({\widetilde{\Omega }}\) whose leaves are \(\gamma _{0},\gamma _{1},\ldots ,\gamma _{m}\). Assume its Weyl matrix \(\widetilde{{\textbf{M}}}(\rho ^{2})\) to be known for some value of \(\rho \). Attach a number of edges to the leaf \(\gamma _{0}\) (see Fig. 1), so that \(\gamma _{0}\) becomes an internal vertex of a new larger graph \(\Omega \), and \(\gamma _{1},\ldots ,\gamma _{m},\gamma _{m+1},\ldots ,\gamma _{m+m_{1}}\) the leaves of \(\Omega \). Here \(m_{1}\) is the number of the new attached edges. Thus, \(\Omega \) is a tree graph obtained from \({\widetilde{\Omega }}\) by attaching \(m_{1}\) edges to \(\gamma _{0}\). For simplicity we call these new edges \(e_{m+1},\ldots ,e_{m+m_{1}}\) and denote their respective lengths as \(L_{m+1},\ldots ,L_{m+m_{1}}\). We assume that a corresponding potential \(q_{j}\in {\mathcal {L}}_{1}(0,L_{j})\), \(j=m+1,\ldots ,m+m_{1},\) is given on each new edge, and the leaf \(\gamma _{j}\) is identified with \(x=0\).

Fig. 1
figure 1

Tree graph \(\Omega \) is obtained from a subgraph \({\widetilde{\Omega }}\) (its edges are presented by solid lines) by attaching to the vertex \(\gamma _{0}\) a number of new edges (dashed lines)

Our task is to find the Weyl matrix \({\textbf{M}}(\rho ^{2})\) of the quantum graph \(\Omega \). The idea is to construct the Weyl solutions \(w_{i}(\rho ,x)\) of \(\Omega \) in terms of the Weyl solutions \({\widetilde{w}}_{j}(\rho ,x)\) of \({\widetilde{\Omega }}\). We start with the Weyl solutions \(w_{m+j}(\rho ,x)\) associated with the new leaves \(\gamma _{m+j}\), \(j=1,\ldots ,m_{1}\).

Let us look for \(w_{m+j}(\rho ,x)\) in the form

$$\begin{aligned} w_{m+j}(\rho ,x)=c_{j}(\rho ){\widetilde{w}}_{0}(\rho ,x)\quad \text {on } {\widetilde{\Omega }}. \end{aligned}$$
(3.1)

That is, on the subgraph \({\widetilde{\Omega }}\) the Weyl solution \(w_{m+j} (\rho ,x)\) coincides with \({\widetilde{w}}_{0}(\rho ,x)\) up to a multiplicative constant \(c_{j}(\rho )\). In this case, it automatically satisfies the homogeneous Dirichlet condition at \(\gamma _{1},\ldots ,\gamma _{m},\) and we still need to satisfy the conditions \(w_{m+j}(\rho ,\gamma _{m+j})=1\) and \(w_{m+j}(\rho ,\gamma _{m+i})=0\) for \(i\ne j\).

From (3.1) we have

$$\begin{aligned} \varphi _{m+j}(\rho ,L_{m+j})+{\textbf{M}}_{m+j,m+j}(\rho ^{2})S_{m+j}(\rho ,L_{m+j})=c_{j}(\rho ) \end{aligned}$$
(3.2)

and

$$\begin{aligned} \varphi _{m+j}^{\prime }(\rho ,L_{m+j})+\sum _{k=1}^{m_{1}}{\textbf{M}} _{m+j,m+k}(\rho ^{2})S_{m+k}^{\prime }(\rho ,L_{m+k})=c_{j}(\rho )\widetilde{{\textbf{M}}}_{0,0}(\rho ^{2}), \end{aligned}$$
(3.3)

where \(\widetilde{{\textbf{M}}}_{0,0}(\rho ^{2})\) is an element of the Weyl matrix \(\widetilde{{\textbf{M}}}(\rho ^{2})\): \(\widetilde{{\textbf{M}}}_{0,0} (\rho ^{2})=\partial {\widetilde{w}}_{0}(\gamma _{0})\).

Additionally, the continuity condition gives us the equalities

$$\begin{aligned} {\textbf{M}}_{m+j,m+k}(\rho ^{2})S_{m+k}(\rho ,L_{m+k})=c_{j}(\rho ),\quad k=1,\ldots ,m_{1}\text { and }k\ne j. \end{aligned}$$
(3.4)

Thus, for each j, from (3.2), (3.3) and (3.4) we have \(m_{1}+1\) equations for the \(m_{1}+1\) unknowns

$$\begin{aligned} \left\{ {\textbf{M}}_{m+j,m+k}(\rho ^{2}),\,k=1,\ldots ,m_{1};\text { }c_{j} (\rho )\right\} . \end{aligned}$$

Note that in the linear algebraic system (3.2), (3.3), (3.4) the magnitudes \(\varphi _{m+j}(\rho ,L_{m+j})\), \(S_{m+k}(\rho ,L_{m+k})\), \(\varphi _{m+j}^{\prime }(\rho ,L_{m+j})\), \(S_{m+k}^{\prime }(\rho ,L_{m+k})\) are known, since all the potentials \(q_{m+k}(x)\), \(k=1,\ldots ,m_{1}\) are known.

Thus, from (3.2), (3.3) and (3.4) we find \({\textbf{M}}_{m+j,m+k}(\rho ^{2}),\,k=1,\ldots ,m_{1}\) and \(c_{j}(\rho )\).

From (3.1) we obtain additionally,

$$\begin{aligned} {\textbf{M}}_{m+j,i}(\rho ^{2})=c_{j}(\rho )\widetilde{{\textbf{M}}}_{0,i}(\rho ^{2})\quad \text { for }i=1,\ldots ,m, \end{aligned}$$
(3.5)

and thus we have already completed the rows \(m+1,\ldots ,m+m_{1}\) of the Weyl matrix \({\textbf{M}}(\rho ^{2})\).

Now, choose an \(i\in \left\{ 1,\ldots ,m\right\} \). We look for \(w_{i} (\rho ,x)\) such that on \({\widetilde{\Omega }}\) the equality be valid

$$\begin{aligned} w_{i}(\rho ,x)={\widetilde{w}}_{i}(\rho ,x)+\alpha _{i}(\rho ){\widetilde{w}}_{0} (\rho ,x), \end{aligned}$$

where \(\alpha _{i}(\rho )\) is a constant. This is a natural choice, because

$$\begin{aligned} w_{i}(\rho ,\gamma _{i})=1\quad \text {and}\quad w_{i}(\rho ,\gamma _{j} )=0\quad \text { for }j=1,\ldots ,m\text { and }j\ne i. \end{aligned}$$

Moreover, we have

$$\begin{aligned} w_{i}(\rho ,\gamma _{0})=\alpha _{i}(\rho ) \end{aligned}$$

and

$$\begin{aligned} \partial w_{i}(\rho ,\gamma _{0})=\widetilde{{\textbf{M}}}_{i,0}(\rho ^{2} )+\alpha _{i}(\rho )\widetilde{{\textbf{M}}}_{0,0}(\rho ^{2}). \end{aligned}$$

Thus, for all \(j=m+1,\ldots ,m+m_{1}\) we have

$$\begin{aligned} w_{ij}(\rho ,\gamma _{0})=\alpha _{i}(\rho ) \end{aligned}$$
(3.6)

and

$$\begin{aligned} \sum _{j=m+1}^{m+m_{1}}\partial w_{ij}(\rho ,\gamma _{0})=-\widetilde{{\textbf{M}} }_{i,0}(\rho ^{2})-\alpha _{i}(\rho )\widetilde{{\textbf{M}}}_{0,0}(\rho ^{2}). \end{aligned}$$
(3.7)

Equality (3.6) can be written as

$$\begin{aligned} {\textbf{M}}_{i,j}(\rho ^{2})S_{j}(\rho ,L_{j})=\alpha _{i}(\rho ),\quad j=m+1,\ldots ,m+m_{1}, \end{aligned}$$
(3.8)

while (3.7) takes the form

$$\begin{aligned} \sum _{j=m+1}^{m+m_{1}}{\textbf{M}}_{i,j}(\rho ^{2})S_{j}^{\prime }(\rho ,L_{j})=\widetilde{{\textbf{M}}}_{i,0}(\rho ^{2})+\alpha _{i}(\rho )\widetilde{{\textbf{M}}}_{0,0}(\rho ^{2}). \end{aligned}$$
(3.9)

For every \(i\in \left\{ 1,\ldots ,m\right\} \), equations (3.8) and (3.9) give us \(m_{1}+1\) equations for the \(m_{1}+1\) unknowns

$$\begin{aligned} \left\{ {\textbf{M}}_{i,j}(\rho ^{2}),\,j=m+1,\ldots ,m+m_{1};\text { }\alpha _{i}(\rho )\right\} . \end{aligned}$$

The magnitudes \(S_{j}(\rho ,L_{j})\), \(S_{j}^{\prime }(\rho ,L_{j})\), \(\widetilde{{\textbf{M}}}_{i,0}(\rho ^{2})\), \(\widetilde{{\textbf{M}}}_{0,0} (\rho ^{2})\) in (3.8) and (3.9) are already known.

Finally, to obtain \({\textbf{M}}_{i,j}(\rho ^{2})\) for \(i,j=1,\ldots ,m\) we observe that

$$\begin{aligned} \partial w_{i}(\rho ,\gamma _{j})=\partial {\widetilde{w}}_{i}(\rho ,\gamma _{j})+\alpha _{i}(\rho )\partial {\widetilde{w}}_{0}(\rho ,\gamma _{j}) \end{aligned}$$

and thus

$$\begin{aligned} {\textbf{M}}_{i,j}(\rho ^{2})=\widetilde{{\textbf{M}}}_{i,j}(\rho ^{2})+\alpha _{i}(\rho )\widetilde{{\textbf{M}}}_{0,j}(\rho ^{2})\quad \text {for } i,j=1,\ldots ,m{.} \end{aligned}$$
(3.10)

Let us summarize the procedure of construction of the Weyl matrix \({\textbf{M}}(\rho ^{2})\) of the quantum tree \(\Omega \) from the Weyl matrix \(\widetilde{{\textbf{M}}}(\rho ^{2})\) of the quantum subtree \({\widetilde{\Omega }}\).

  1. (1)

    For each \(j=1,\ldots ,m_{1}\) solve the \(\left( m_{1}+1\right) \times \left( m_{1}+1\right) \)-system of linear algebraic equations (3.2)-(3.4) to find the constant \(c_{j}(\rho )\) and the Weyl matrix entries \({\textbf{M}}_{m+j,m+k}(\rho ^{2}),\,k=1,\ldots ,m_{1}\). Compute the entries \({\textbf{M}}_{m+j,i}(\rho ^{2}),\) \(i=1,\ldots ,m\) from (3.5). Thus, the rows from \(m+1\) to \(m+m_{1}\) of the Weyl matrix \({\textbf{M}}(\rho ^{2})\) are computed.

  2. (2)

    For each \(i=1,\ldots ,m\) solve the \(\left( m_{1}+1\right) \times \left( m_{1}+1\right) \)-system of linear algebraic equations (3.8), (3.9) to find the constant \(\alpha _{i}(\rho )\) and the Weyl matrix entries \({\textbf{M}}_{i,j}(\rho ^{2})\), \(j=m+1,\ldots ,m+m_{1}\). Compute the entries \({\textbf{M}}_{i,j}(\rho ^{2}),\) \(j=1,\ldots ,m\) from (3.10). This completes the construction of the Weyl matrix \({\textbf{M}}(\rho ^{2})\).

Finally, let us consider the situation when \({\widetilde{\Omega }}\) is just a single segment with the vertices \(\gamma _{0}\) and \(\gamma _{1}\). Since the potential of this segment is supposed to be given, we may assume that both corresponding Weyl solutions on such \({\widetilde{\Omega }}\) are known: \({\widetilde{w}}_{0}(\rho ,x)\) and \({\widetilde{w}}_{1}(\rho ,x)\), that satisfy the boundary conditions

$$\begin{aligned} {\widetilde{w}}_{0}(\rho ,\gamma _{0})=1,\quad {\widetilde{w}}_{0}(\rho ,\gamma _{1})=0 \end{aligned}$$

and

$$\begin{aligned} {\widetilde{w}}_{1}(\rho ,\gamma _{0})=0,\quad {\widetilde{w}}_{1}(\rho ,\gamma _{1})=1. \end{aligned}$$

Then the entries of the \(2\times 2\) - Weyl matrix \(\widetilde{{\textbf{M}}} (\rho ^{2})\) have the form

$$\begin{aligned} \widetilde{{\textbf{M}}}_{0,0}(\rho ^{2})= & {} \partial {\widetilde{w}}_{0}(\rho ,\gamma _{0}),\quad \widetilde{{\textbf{M}}}_{0,1}(\rho ^{2})=\partial \widetilde{w}_{0}(\rho ,\gamma _{1}), \\ \widetilde{{\textbf{M}}}_{1,0}(\rho ^{2})= & {} \partial {\widetilde{w}}_{1}(\rho ,\gamma _{0}),\quad \widetilde{{\textbf{M}}}_{1,1}(\rho ^{2})=\partial \widetilde{w}_{1}(\rho ,\gamma _{1}). \end{aligned}$$

Now, as a first step for synthesis of the Weyl matrix of a quantum tree we attach a number of edges to the vertex \(\gamma _{0}\), that gives us a quantum star graph. The procedure described above gives us its Weyl matrix. Subsequently, attaching new edges to the leaves and applying the above procedure leads to the computation of the Weyl matrix of an ever larger quantum tree. Thus, starting with one edge we synthesize the Weyl matrix of the whole quantum tree.

Remark 3.1

The requirement on the potential q to be real valued is not essential. The proposed procedure for the synthesis of the Weyl matrix is applicable to complex-valued potentials without modifications. The only constraint that must be checked at each step is that \(\rho \in {\mathbb {C}}\) does not belong to the Dirichlet spectrum of either graph \({\widetilde{\Omega }}\) or \(\Omega \).

4 Conclusions

A procedure for the synthesis of a Weyl matrix of an arbitrary quantum tree graph is developed. It allows one to compute the Weyl matrix for a large quantum tree successively, by adding new edges and computing the Weyl matrices for ever larger subgraphs. In each step, relatively small systems of linear algebraic equations are solved. Due to the fact that the transposed Weyl matrix is the Dirichlet-to-Neumann map of the quantum tree graph, the synthesis procedure will find applications in solving a variety of boundary value and control problems on quantum tree graphs.