1 Introduction

The definition and properties of Hermitian interpolation polynomials (HIPs) or Birkhoff interpolants and their application in the finite element method (FEM) are discussed in a number of papers, see, e.g., [1, 2]. Piecewise polynomial FEM functions constructed by matching HIPs have continuous derivatives up to a given order at the finite element boundaries, in contrast to Lagrange interpolation polynomials (LIPs). Therefore, FEM with HIPs is used in problems where continuity is required not only for the approximate solution, but also for its derivatives [3]. A constructive approach to the determination of multidimensional HIPs inside a d-dimensional hypercube in the form of a polynomial of d variables of degree \(p'\) with a set of \((p'+1)^d\) unknown coefficients, which are calculated in integer arithmetic by solving a system of \((p'+ 1)^d\) inhomogeneous algebraic equations, was implemented as a program for \(d=3\), \(p'=3\) and \((3+1)^3=64\) of Ref. [3]. With an increase in d and \(p'\) and the dimension of the system, its solution in integer arithmetic becomes too difficult, therefore, in the general case, it is necessary to develop new algorithms free of this drawback.

In this work, we implement in Maple and Mathematica an algorithm for constructing multidimensional HIPs inside a d-dimensional hypercube as a product of d pieces of one-dimensional HIPs of degree \(p'\) in each variable, in which there is no need to solve the above mentioned system of equations [3]. One-dimensional HIPs are calculated analytically using the authors’ recurrence relations [5]. As a result, multidimensional HIPs are also calculated in an analytical form and satisfy all the conditions for their definition and properties. In the particular case \(d=3\), \(p'=3\), as shown in [6], they coincide with the three-dimensional HIPs [3].

The efficiency of our finite element schemes, algorithms and GCMFEM program implemented in Maple and Mathematica is demonstrated by solving reference BVPs for multidimensional harmonic and anharmonic oscillator used in the Geometric Collective Model (GCM) of atomic nuclei [7]. The BVP for GCM is reduced to the BVP for a system of ordinary differential equations, which is solved by the KANTBP 5 M program [8] implemented in Maple. All calculations presented in this paper are preformed using Maple 2022 and Mathematica 12 on Intel(R) Core(TM) i7-9700K CPU dual 3.60 GHz, RAM 32GB, Windows 10 Pro.

The structure of the paper is the following. In Sect. 2, the formulation of the problem is given. In Sect. 3, the algorithm for constructing multivariate Hermitian finite elements is described. In Sect. 4, examples of solving multidimensional BVPs are presented. In Sect. 5, a reduction of the system of 2D BVP to the system of 1D BVPs is executed. A comparison of the CPU time in GCM benchmark calculations of 2D and 1D BVPs implemented in Maple and Mathematica is given. In Conclusion we resume the results and outline the prospects. The GCMFEM program implementations in Maple 2022 and Mathematica 12 are given in the supplementary material.

2 Formulation of the Problem

Consider a self-adjoint boundary value problem (BVP) for the elliptic differential equation

$$\begin{aligned} \left( D- E \right) \Phi (x)\equiv \left( - {\frac{1}{g_0(x)}}\sum _{i,j=1}^d\frac{\partial }{\partial x_i}g_{ij}(x) \frac{\partial }{\partial x_j} + V(x) -E \right) \Phi (x)=0. \end{aligned}$$
(2.1)

Also we assume that \(g_0(x)>0\), \(g_{ji}(x)=g_{ij}(x)\) and V(x) are real-valued functions, continuous together with their generalized derivatives up to a given order in the bounded domain \(x=(x_1,\dots ,x_d)\in {\bar{\Omega }}=\Omega \cup \partial \Omega \in {R}^{d}\), with the piecewise continuous boundary \(S=\partial \Omega \), which ensures the existence of nontrivial solutions \(\Phi (x)\) obeying the boundary conditions (BCs) of the first (I) or the second (II) kind [9]. For a discrete spectrum problem, the functions \(\Phi _m(x)\) from the Sobolev space \(H_2^{2}({\bar{\Omega }})\), \(\Phi _m(x)\in H_2^{2}({\bar{\Omega }})\), corresponding to the real eigenvalues E: \(E_1\le E_2\le \cdots \le E_m\le \cdots \), obey the orthonormalization conditions [9].

The polyhedral domain \({\bar{\Omega }}\subset {R}^d\) is decomposed \({\bar{\Omega }}={\bar{\Omega }}_h(x)=\bigcup _{q=1}^Q\Delta _{q}\) in finite elements having the form of d dimensional simplexes or hypercubes \(\Delta _{q}\) with HIPs or LIPs \(\varphi ^{\kappa p'}_{rq}(x)\), \(x\in {R}^d\), where the multi-indexes \(\kappa \) and r are specified below, calculated using the algorithms of Refs. [6, 9]. The piecewise polynomial functions \(N_l^{\kappa p'}(x)\in C^{\kappa ^c}\) of order \(p'\) with continuous derivatives up to order \(\kappa ^c\le \kappa _{\max }-1\) are constructed by joining the polynomials, \(\varphi ^{p'}_{lq}(x)=\varphi ^{\kappa p'}_{rq}(x)\), where l is determined via \(\kappa \), r and q, on the finite elements \(\Delta _q\in {\bar{\Omega }}_h(x)\). The expansion of the sought solution \(\Phi _m^h(x)\) from the Sobolev space \(H_2^{s\ge 1}({\bar{\Omega }})\) in the basis of piecewise polynomial functions \(N_{l}^{\kappa p'}(x)\),

$$\begin{aligned} \Phi _m^h(x)=\sum _{l=1}^{L} N_{l}^{\kappa p'}(x)\Phi _{lm}^h, \end{aligned}$$
(2.2)

leads to the generalized algebraic eigenvalue problem

$$\begin{aligned} (\textbf{A}-\textbf{B}E_m^h)\mathbf{\Phi }_m^h=0, \end{aligned}$$
(2.3)

which is solved using the standard method [10]. The elements of the symmetric matrices of stiffness \({\textbf {A}}=(A_{ll'}^{\kappa \kappa ' p'})\) and mass \({\textbf {B}}=(B_{ll'}^{\kappa \kappa 'p'})\) comprise the integrals,

$$\begin{aligned}{} & {} {} A_{ll'}^{\kappa \kappa 'p'} =\int _{\Omega }N_{l}^{\kappa p'}(x)N_{l'}^{\kappa 'p'}(x)U(x)\,g_0(x)d x +\sum _{i,j=1}^d\int _{\Omega }\frac{\partial N_{l}^{\kappa p'}(x)}{\partial x_i } \frac{\partial N_{l'}^{\kappa ' p'}(x )}{\partial x_j }\,g_{ij}(x)dx=\sum _{q=1}^Q a_{ll'}^{\kappa \kappa 'p'q}, \nonumber \\ {}{} & {} {} a_{ll'}^{\kappa \kappa 'p'q}=\int _{\Delta _q}\varphi _{lq}^{\kappa p'}(x)\varphi _{l'q}^{\kappa p'}(x)U(x)\,g_0(x)dx +\sum _{i,j=1}^d\int _{\Delta _q}\frac{\partial \varphi _{lq}^{\kappa p'}(x)}{\partial x_i } \frac{\partial \varphi _{l'q}^{\kappa p'}(x )}{\partial x_j}\,g_{ij}(x)dx,\\ {}{} & {} {} B_{ll'}^{\kappa \kappa 'p'} =\int _{\Omega }N_{l}^{\kappa p'}(x)N_{l'}^{\kappa 'p'}(x)g_0(x)d x =\sum _{q=1}^Q b_{ll'}^{\kappa \kappa 'p'q}, \quad b_{ll'}^{\kappa \kappa 'p'q}=\int _{\Delta _q}\varphi _{lq}^{\kappa p'}(x)\varphi _{l'q}^{\kappa 'p'}(x)g_0(x)d x,\nonumber \end{aligned}$$
(2.4)

where \(dx=dx_{1}\cdots dx_{d}\). These integrals are calculated on the elements \(\Delta _q\) in the domain \({\bar{\Omega }}={\bar{\Omega }}_h(x)=\bigcup _{q=1}^Q\Delta _{q}\), recalculated into the local coordinates on the element \(\Delta \). The deviation of the approximate solution \(E_m^h\), \(\Phi _m^h(x)\in { H}_2^{\kappa ^c+1\ge 1}(\Omega _h)\) from the exact one \(E_m\), \(\Phi _m(x)\in { H}_2^2(\Omega )\) is estimated in  [10] as

$$\begin{aligned} \left| E_m-E_m^h\right| \le c_1h^{2p'},\,\, \left\| \Phi _m(x)-\Phi _m^h(x)\right\| _0\le c_2h^{p'+1}, \end{aligned}$$
(2.5)

where h is the maximal size of the finite element \(\Delta _q\), \(p'\) is the order of the FEM scheme, \(c_1>0\) and \(c_2>0\) are coefficients independent of h,

$$\begin{aligned} \Vert \Phi _m(x)\Vert _0^2=\int _{\Omega }\, g_0(x)\,{\Phi _m}(x)\Phi _m(x)\,dx. \end{aligned}$$
(2.6)

3 Algorithm for Constructing Multivariate Hermitian Finite Elements

The HIPs \(\hat{\varphi }_{rq}^{\kappa p'}(x)\) depending on d variables in an element of a d-dimensional parallelepiped

$$\begin{aligned} \textbf{x}=(x_{1},\dots , x_{d})\in [x_{1;\min },x_{1;\max }] \otimes \cdots \otimes [x_{d;\min },x_{d;\max }]=\Delta _q\subset { R}^d \end{aligned}$$
(3.1)

at nodes \(\textbf{x}_{r} =(x_{1r_1},\dots ,x_{dr_d}),\) \(x_{ir_i} = ((p - r_i)x_{i;\min } + r_i x_{i;\max })/p\); \(r_i=0,\dots ,p\), \(i=1,\dots ,d\) are determined by the relations [1, 2]

$$\begin{aligned}{} & {} \hat{\varphi }_{rq}^{\kappa p'}(\textbf{x}_{r'}) =\delta _{r_1r_1'}\cdots \delta _{r_dr_d'}\delta _{\kappa _10}\cdots \delta _{\kappa _d0},\quad \kappa =\kappa _1\cdots \kappa _d,\quad r=r_1\cdots r_d,\\{} & {} \nonumber \left. \frac{\partial ^{|\kappa '|} }{\partial \textbf{x}^{\kappa '}}\hat{\varphi }_{rq}^{\kappa p'} (\textbf{x})\right| _{\textbf{x}=\textbf{x}_{r'}} =\delta _{r_1r_1'}\cdots \delta _{r_dr_d'} \delta _{\kappa _1\kappa _1'}\cdots \delta _{\kappa _d\kappa _d'},\quad \frac{\partial ^{|\kappa '|}}{\partial \textbf{x}^{\kappa '}}= \frac{\partial ^{\kappa _1}}{\partial x_1^{\kappa _1}}\cdots \frac{\partial ^{\kappa _d}}{\partial x_d^{\kappa _d}}. \end{aligned}$$
(3.2)

These HIPs of the order \(p'=\prod _{s=1}^{d}p'_{s}\) are calculated as a product of one-dimensional HIPs \(\varphi _{r_s q}^{\kappa _s p'}(x_s)\),

$$\begin{aligned} \hat{\varphi }_{rq}^{\kappa p'}(\textbf{x}) =\prod _{s=1}^{d}\varphi _{r_s q}^{\kappa _s p'}(x_s). \end{aligned}$$
(3.3)

The values of functions \(\varphi ^{\kappa p'}_{rq}(x)\) with their derivatives up to the order \((\kappa _r^ {\max }-1)\), i.e. \(\kappa =0,\ldots ,\kappa _r^ {\max }-1\), where \(\kappa =\kappa _s\), \(r=r_s\), \(x=x_s\) and \(\kappa _r^{\max }\) is referred to as the multiplicity of the node \(x_{r}^{}\), are determined by the expressions [1]

$$\begin{aligned} \varphi ^{\kappa p'}_{rq}(x_{r'})=\delta _{rr'}\delta _{\kappa 0}, \quad \frac{d^{\kappa '}\varphi ^{\kappa p'}_{rq}(x)}{dx^{\kappa '}}\biggr |_{x=x_{r'}^{}}=\delta _{rr'}\delta _{\kappa \kappa '}. \end{aligned}$$
(3.4)

Particularly, the shape functions called the LIPs are determined only by their values on subgrid \(\Omega _{q}^{h_q(x)}\) and they have the simple form

$$\begin{aligned} \varphi _{rq}^{\kappa p'}(x_{r'q})=\delta _{rr'}, \qquad \varphi _{rq}^{\kappa p'}(x)=\prod ^p_{r'=0, r'\ne r}\biggl (\frac{x-x_{r'q}^{}}{x_{rq}^{}-x_{r'q}^{}}\biggr ) \end{aligned}$$
(3.5)

with \(\kappa =0\), \(p'=p\).

To calculate the HIPs, the auxiliary weight function

$$\begin{aligned} w_{rq}(x)=\prod ^p_{r'=0, r'\ne r}\biggl (\frac{x-x_{r'q}^{}}{x_{rq}^{}-x_{r'q}^{}}\biggr )^{\kappa _{r'}^{\max }},\qquad w_{rq}(x_{rq}^{})=1 \end{aligned}$$
(3.6)

is used. The weight function derivatives can be presented as a product

$$\begin{aligned} \frac{d^{\kappa }w_{rq}(x)}{dx^{\kappa }}=w_{rq}(x)g^\kappa _{rq}(x), \end{aligned}$$
(3.7)

where the factor \(g^\kappa _{rq}(x)\) is calculated by means of the recurrence relations

$$\begin{aligned} g^{\kappa }_{rq}(x)=\frac{dg^{\kappa -1}_{rq}(x)}{dx}+g^1_{rq}(x)g^{\kappa -1}_{rq}(x), \end{aligned}$$
(3.8)

with the initial conditions

$$\begin{aligned} g^0_{rq}(x)=1,\quad g^1_{rq}(x)\equiv \frac{1}{w_{rq}(x)}\frac{dw_{rq}(x)}{dx}=\sum ^p_{r'=0, r'\ne r}\frac{\kappa _{r'q}^{\max }}{x-x_{r'q}^{}}. \end{aligned}$$
(3.9)

We will seek for the HIPs \(\varphi ^{\kappa p'}_{rq}(x)\) in the following form:

$$\begin{aligned} \varphi ^{\kappa p'}_{rq}(x)=w_{rq}(x)\sum _{\kappa '=0}^{\kappa _r^{\max }-1} a^{\kappa ,\kappa '}_{rq}(x-x_{rq}^{})^{\kappa '}. \end{aligned}$$
(3.10)

Differentiating the function (3.10) by x at point \(x_{rq}^{ }\) and using Eq. (3.6), we obtain

$$\begin{aligned} \frac{d^{{\kappa }'}\varphi ^{{\kappa } {p}'}_{rq}(x)}{dx^{{\kappa }'}}\biggr |_{x=x_{rq}^{}} =\sum _{{\kappa }''=0}^{{\kappa }'} \frac{{\kappa }' !}{{\kappa }'' !({\kappa }'-{\kappa }'')!} g^{{\kappa }'-{\kappa }''}_{rq}(x_{rq}^{}) a^{{\kappa },{\kappa }''}_{rq}{\kappa }''!. \end{aligned}$$
(3.11)

Hence we arrive at the expression for the coefficients \(a^{\kappa ,\kappa '}_{r} \)

$$\begin{aligned} a^{\kappa ,\kappa '}_{rq}=\frac{1}{\kappa '!}\left( \frac{d^{\kappa '}\varphi ^{\kappa p'}_{rq}(x)}{dx^{\kappa '}}\biggr |_{x=x_{rq}^{}} -\sum _{\kappa ''=0}^{\kappa '-1} \frac{\kappa '!}{(\kappa '-\kappa '')!} g^{\kappa '-\kappa ''}_{rq}(x_{rq}^{}) a^{\kappa ,\kappa ''}_{rq}\right) . \end{aligned}$$
(3.12)

Taking Eq. (3.4) into account, we finally get:

$$\begin{aligned} a^{\kappa ,\kappa '}_{rq}=\left\{ \begin{array}{ll} 0,&{} \kappa '<\kappa ,\\ 1/\kappa '!,&{}\kappa '=\kappa ,\\ -\sum \limits _{\kappa ''=\kappa }^{\kappa '-1} \frac{1}{(\kappa '-\kappa '')!} g^{\kappa '-\kappa ''}_{rq}(x_{rq}) a^{\kappa ,\kappa ''}_{rq},&{} \kappa '>\kappa . \end{array}\right. \end{aligned}$$
(3.13)

Note that all degrees of HIPs \(\varphi ^{\kappa p'}_{rq}(x)\) do not depend on \(\kappa \) and equal \(p'=\sum ^p_{r'=0}\kappa _r^{\max }-1\). These HIPs form a basis in the space of polynomials having the degree \(p'\).

For \(\kappa _{\max }=1\), \(p'=p\), the 1D HIPs coincide with the 1D LIPs and take the form:

$$\begin{aligned}{} & {} {\varphi _{rq}^{0p}(x)=\prod ^p_{r'=0, r'\ne r}\biggl (\frac{x-x_{r'}^{ }}{x_{r}^{}-x_{r'}^{}}\biggr ),} \end{aligned}$$
(3.14)
Fig. 1
figure 1

The piecewise 1D polynomial \(N_l^{\kappa p'}\) in the domain \([-1,1]\) equal to one at the origin, obtained by matching the third order LIP \(\varphi _{3q-1}^{03}(x)\) on \([-1,0]\) with the LIP \(\varphi _{0q}^{03}(x)\) on [0, 1] and the corresponding piecewise 2D polynomial \(N_l^{\kappa _1,\kappa _2p'}\) of the set , in the domain \([-1,1]\times [-1,1]\)

Fig. 2
figure 2

The piecewise 1D polynomials \(N^{\kappa p'}_l\) in the domain \([-1,1]\) obtained by matching HIP \(\varphi _{1q-1}^{\kappa 3}(x)\) on \([-1,0]\) with HIP \(\varphi _{0q}^{\kappa 3}(x)\) on [0, 1] and the corresponding piecewise 2D polynomials \(N^{\kappa _1,\kappa _2p'}_l\) of the set , in the domain \([-1,1]\times [-1,1]\)

For \(\kappa _{\max }=2\), \(p'=2p+1\), the 1D HIPs take the form:

$$\begin{aligned}{} & {} {\varphi _{rq}^{0p'}(x)=\left( 1-(x-x_r)\sum _{r'=0,r'\ne r}^p\frac{ 2}{x_r-{x_r'}}\right) \prod ^p_{r'=0, r'\ne r}\biggl (\frac{x-x_{r'}^{}}{x_{r}^{}-x_{r'}^{}}\biggr )^{2},} \\ {}{} & {} \nonumber {\varphi _{rq}^{1p'}(x)=(x-x_r)\prod ^p_{r'=0, r'\ne r}\biggl (\frac{x{ -}x_{r'}^{}}{x_{r}^{}-x_{r'}^{}}\biggr )^{2},} \end{aligned}$$
(3.15)

for polynomials \(\varphi _{rq}^{0p'}(x)\) or \(\varphi _{rq}^{1p'}(x)\), whose value or the value of the first derivative is 1, respectively.

Fig. 3
figure 3

The discrepancy \(\delta E_m=E_m^h-E_m\), \(m=0,1,{\ldots }\) (along the ordinate axis) between the computed eigenvalues \(E_m^h\) of the oscillator problem (at \(R^d_+\)) and the exact values \(E_m\): \(E_m=2[1], 6[2], 10[3],{\ldots }\) for \(d=2\) (left panel) and \(E_m=3[1], 7[3], 11[6],{\ldots }\) for \(d=3\) (right panel), where the multiplicity of degeneracy is given in square brackets. (See the details in the text)

Note, that for \(\kappa _{\max }=1\), the HIPs correspond to LIPs that do not have continuous derivatives at the boundaries of finite elements. The recurrence relations make it possible to calculate the HIP on a d-dimensional hypercube in the form of product (3.3) of d pieces of 1D HIPs [6] without using the traditional method of constructing an HIP, which is reduced to solving a system of a large number of algebraic equations, which restricts the HIP calculation to the dimensions \(d=3\) and \(d=4\) [3, 11].

In test examples of solving the multidimensional BVPs, we used third-order HIPs with \(p=1\) and \(\kappa _{\max }=2\) from (3.15), known as Bogner-Fox-Schmidt functions [12, 13] guaranteeing continuous and differentiable transitions at the finite element boundaries [14],

$$\begin{aligned}{} & {} {} \varphi _{0q}^{03}(x)=\mathtt {HIP(0, 0)} \mathtt {:=} (\mathtt {x-1)}^\texttt {2}{} \mathtt {*(1+2*x);}\\ {}{} & {} {} \varphi _{0q}^{13}(x)=\mathtt {HIP(0, 1)} \mathtt {:=} \mathtt {(x-1)}^\texttt {2}{} \mathtt {*x;}\nonumber \\ {}{} & {} {} \varphi _{1q}^{03}(x)=\mathtt {HIP(1, 0)} \mathtt {:=} \texttt {x}^\texttt {2}{} \mathtt {*(3-2*x);}\nonumber \\ {}{} & {} {} \varphi _{1q}^{13}(x)=\mathtt {HIP(1, 1)} \mathtt {:=} \texttt {x}^\texttt {2}{} \mathtt {*(x-1);}\nonumber \end{aligned}$$
(3.16)

and, for comparison, LIPs of the third order with \(p=3\) and \(\kappa _{\max }=1\) from (3.14)

$$\begin{aligned}{} & {} \varphi _{0q}^{03}(x)=\mathtt{LIP(0, 0):=} \mathtt{-(9/2*(x-1/3))*(x-2/3)*(x-1);}\\{} & {} \varphi _{1q}^{03}(x)=\mathtt{LIP(1, 0):=} \mathtt{(27/2)*x*(x-2/3)*(x-1);}\nonumber \\{} & {} \varphi _{2q}^{03}(x)=\mathtt{LIP(2, 0):=} \mathtt{-(27/2)*x*(x-1/3)*(x-1);}\nonumber \\{} & {} \varphi _{3q}^{03}(x)=\mathtt{LIP(3, 0):=} \mathtt{(9/2)*x*(x-1/3)*(x-2/3).}\nonumber \end{aligned}$$
(3.17)

The third-order basis functions \(p'=3\) with 1D and 2D Lagrangian elements \((\kappa ^{\max },p)=(1,3)\), and with Hermitian elements \((\kappa ^{\max },p)=(2,1)\) for \(n=2^d\) finite elements are shown in Figs. 1 and 2.

4 Examples of Solving BVPs

4.1 2D and 3D Harmonic Oscillators

For a multidimensional harmonic oscillator, the BVP (2.1) with \(g_0(x)=1\), \(g_{ji}(x)\) \(=g_{ij}(x)=\delta _{ij}\) and oscillator potential \({V(x)}=x_1^2+{\cdots }+x_d^2\) has a degenerate pure discrete spectrum of eigenvalues \(E^{0}_m \equiv E_m\equiv E_{k_1{\cdots }k_d}=\sum _{i=1}^d (2k_i+1)\) with degeneracy \(D(E_m)=\) \((k_1+{\cdots }+k_d)!\) \(/(k_1!{\cdots }k_d!)\) and the corresponding set of eigenfunctions \(\Phi ^{0}_m(x){\equiv }\Phi _m(x)\),

$$\begin{aligned} \Phi _m(x){\equiv } \Phi _{k_1{\cdots }k_d}(x)=\prod _{i=1}^d \phi _{k_i}(x_i),\quad \phi _{k_i}(x_i)=\frac{1}{\sqrt{\sqrt{\pi }2^{k_i}k_i!}} H_{k_i}(x_i)\exp (-x_i^2), \end{aligned}$$

where \(\phi _{k_i}(x_i)\) are the orthonormalized eigenfunctions of the 1D oscillator and \(H_{k_i}(x_i)\) are Hermite polynomials [15]. The problem in \(R_+^d\), with the Neumann boundary conditions at the origin \(x_i=0\), has the same spectrum but with even \(k_i\) and the normalization coefficient divided by \(\sqrt{2}^d\).

The 2D (\(d=2\)) and 3D (\(d=3\)) oscillator problems were solved in a square or cube \([0,7]^d\) with Neumann boundary conditions. The discrepancies \(\delta E_m= E_m^h-E_m\), \(m=0,1, \ldots \) between the numerical eigenvalues \(E_m^h\) of this problem and the exact values \(E_m\) are shown in Fig. 3. The results of the FEM for cubic elements are indicated – a product (3.3) of one-dimensional LIPs (\(p=3\), \(\kappa _{\max }=1\)) and HIPs (\(p=1\), \(\kappa _{\max }=2\)) of the third order \(p'=3\) from (3.17) and (3.16), while the square or cube was divided into \(n^d\) equal squares or cubes. The dimension of the matrix of the algebraic problem (2.3) is \(L\times L=1156\times 1156\) for \(d=2\), \(L\times L=4096\times 4096\) and \(L\times L=10648\times 10648\) for \(d=3\). As is seen from the figure, the accuracy of the approximate FEM solution of the algebraic eigenvalue problems with the same matrix dimension L, calculated using the HIPs, is higher than that using the LIPs.

4.2 5D Anharmonic Oscillator

In [7, 16], the GCM implemented as FORTRAN and Mathematica programs for solving the BVP for the 5-dimensional anharmonic oscillator with a purely discrete degenerate spectrum of energy eigenvalues \(E^{L}_n: E^{L}_1<E^{L}_2<E^{L}_3<\cdots \), of rotational-vibrational bands of atomic nuclei, with spin I denoted here as an angular momentum L of GCM, have been elaborated. The basis states were parameterized by the internal variables \( x_{1}=\beta _{2}, x_{2}=\gamma \) and the Euler angles \(x_{3}=\theta _{1},x_{4}=\theta _{2},x_{5}=\theta _{3}\) in the intrinsic frame (IF) associated within irreducible representations of the \( U(5) \supset \overline{\text {O(5)}}\supset \overline{\text {O(3)}}\) chain of groups [17,18,19,20].

The collective variables \(\alpha _m\) at \(m=-2,-1,0,1,2\) for the 5-dimensional anharmonic oscillator in the laboratory frame are expressed in terms of the variables \(a_{m'}=a_{m'}(\beta ,\gamma )\) in the intrinsic frame as

$$\begin{aligned} \alpha _m=\sum _{m'}D_{mm'}^{2*}(\theta _{i})a_{m'},\quad a_{-2}=a_2=\beta \frac{\sin (\gamma )}{\sqrt{2}},\quad a_{-1}=a_1=0,\quad a_0=\beta \cos (\gamma ), \end{aligned}$$
(4.1)

where \(D_{mm'}^{2*}(\theta _{i})\) is the Wigner function of irreducible representations of the \(\overline{\text {O(3)}}\) group in the intrinsic frame [21] (where \(^{*}\) denotes complex conjugation). The five-dimensional equation for the exact solvable Bohr-Mottelson (B-M) collective model in the intrinsic frame \(\beta \in R^{1}_+\) and \(\gamma , \theta _{i}\in S^{4}\) with respect to \(\Psi ^{int}_{\lambda N \mu L M}\in L_{2}(R^{1}_+\bigotimes S^{4})\) with measure \(d\tau =\beta ^{4}\sin (3\gamma )d\beta d\gamma d\theta _{i}\) reads as [16, 18]

$$\begin{aligned}{} & {} (H^{L}-E^{L}_{N})\Psi _{\lambda N \mu L M}=0,\quad H^{L}=\frac{\hbar ^{2}}{2 B'_{2}}\left( -\frac{1}{\beta ^{4}} \frac{\partial }{\partial \beta }\beta ^{4}\frac{\partial }{\partial \beta } +\frac{\hat{\Lambda }^{2}}{\beta ^{2}}\right) +\frac{ C'_{2}}{2}\beta ^{2}. \end{aligned}$$
(4.2)

Here \(\hbar \) is Planck’s constant, \(C'_{2}\) and \(B'_{2}\) are the variable stiffness and mass parameters, \(E^{L}_{N}=\hbar \omega '_{2}(N+5/2)\) are the eigenvalues of the five-dimensional harmonic oscillator, \(\omega '_{2}=\sqrt{C'_{2}/ B'_{2}}\) is the oscillator frequency. \(\hat{\Lambda }^{2}\) is the quadratic Casimir operator of \(\overline{\text {O(5)}}\) in \(L_{2}(S^{4}(\gamma , \theta _{i}))\) at nonnegative integers \(N=2n_\beta +\lambda \), i.e., at even and nonnegative integers \(N-\lambda \), they are determined as

$$\begin{aligned} (\hat{\Lambda }^{2}-\lambda (\lambda +3))\Psi _{\lambda N \mu L M}=0,\quad \hat{\Lambda }^{2}=-\frac{1}{\sin (3\gamma )} \frac{\partial }{\partial \gamma }\sin (3\gamma )\frac{\partial }{\partial \gamma } +\sum _{k=1}^{3}\frac{(\hat{\bar{L}}_{k})^{2}}{4\sin ^{2}(\gamma -\frac{2}{3}k\pi )}, \end{aligned}$$
(4.3)

where the nonnegative integer \(\lambda \) is the so-called seniority and \(\hat{{\bar{L}}}_{k}\) are the operators of the angular momentum components of \(\overline{\text {O(3)}}\) along the principal axes in the intrinsic frame with the commutator \([\hat{{\bar{L}}}_{i},\hat{{\bar{L}}}_{j}]=-\imath {\varepsilon _{ijk}}\hat{{\bar{L}}}_{k}\).

The eigenfunctions \(\Psi ^{int}_{\lambda N \mu L M}\) of the five-dimensional oscillator have the form

$$\begin{aligned} \Psi ^{int}_{\lambda N \mu L M}(\beta , \gamma ,\theta _{i}) = \sum _{K \textrm{even}}\Phi ^{int}_{\lambda N \mu L K}(\beta ,\gamma )\textbf{D}^{(L)*}_{MK}(\theta _{i}). \end{aligned}$$
(4.4)

Here \(\Phi ^{int}_{\lambda N \mu L K}(\beta ,\gamma )=F_{N\lambda }(\beta )C_L^{\lambda \mu } \bar{\phi }_K^{\lambda \mu L}{(\gamma )}\) are the components in the IF,

$$\begin{aligned} \textbf{D}^{(L)*}_{MK}(\theta _{i})=\sqrt{\frac{2L+1}{8\pi ^2}} \frac{D^{(L)*}_{MK}(\theta _{i})+\pi (-1)^{L}D^{(L)*}_{M,-K}(\theta _{i})}{\sqrt{2(1+\delta _{K0})}} \end{aligned}$$

are the orthonormal Wigner functions with measure \(d \theta _{i}\), \(\hat{\pi }=\pm 1\) is the even and odd parity [22, 23], \(\hat{\pi }=+1\) for quadrupole deformations (\(\hat{\pi }=\pm 1\) for general deformations [24, 25]), summation over K running over even values:

$$\begin{aligned} K=0,2,\dots ,L\,\,\, \hbox {for even integer } L: 0 \le L \le L_{\max }, \\ K=2,\dots ,L-1\,\,\, \hbox {for odd integer } L: 3 \le L \le L_{\max }. \nonumber \end{aligned}$$
(4.5)

The orthonormal components \(F_{N\lambda }(\beta )\in L_{2}(R^{1}_+)\) are determined as follows [7]:

$$\begin{aligned}{} & {} F_{N\lambda }(\beta )=C_{N\lambda } \beta ^{\lambda } L^{\lambda +\frac{3}{2}}_{(N-\lambda )/2}\left( \left( \frac{C'_{2}}{\hbar \omega '_{2}}\right) \beta ^{2}\right) \exp \Big (-\left( \frac{C'_{2}}{\hbar \omega '_{2}}\right) \frac{\beta ^{2}}{2}\Big ),\\\nonumber{} & {} C_{N\lambda }={\sqrt{\frac{2(\frac{1}{2}(N-\lambda ))!}{ \Gamma (\frac{1}{2}(N+\lambda +5))}}} \left( \frac{C'_{2}}{\hbar \omega '_{2}}\right) ^{\frac{5}{2}+\frac{\lambda }{2}}, \end{aligned}$$
(4.6)

where \(L^{\lambda +\frac{3}{2}}_{(N-\lambda )/2}(\beta ^{2})\) is the associated Laguerre polynomial with the number of nodes \(n_\beta =(N-\lambda )/2\) [15].

The overlap of the eigenfunctions (4.4), characterizing their original nonorthogonality with respect to the missing label \(\mu \), reads as

$$\begin{aligned} \langle \Psi ^{int}_{\lambda N \mu L M} \vert \Psi ^{int}_{\lambda ' N' \mu ' L' M'} \rangle{} & {} = \int \Psi ^{int*}_{\lambda N \mu L M}(\beta ,\gamma ,\theta _{i})\Psi ^{int}_{\lambda ' N' \mu ' L' M'}(\beta ,\gamma ,\theta _{i}) d\tau \nonumber \\{} & {} =\delta _{NN'}\delta _{LL'}\delta _{MM'}\langle \bar{\phi }^{\lambda \mu L} \vert \bar{\phi }^{\lambda '\mu ' L} \rangle . \end{aligned}$$
(4.7)

Here \(\langle \bar{\phi }^{\lambda \mu L} \vert \bar{\phi }^{\lambda '\mu ' L} \rangle =\delta _{\lambda \lambda '}\delta _{\mu \mu '}\) is the overlap of orthogonalized eigenfunctions \(\phi ^{\lambda \mu L}_{K}(\gamma )\)

$$\begin{aligned}{} & {} \langle \bar{\phi }^{\lambda \mu L} \vert \bar{\phi }^{\lambda \mu ' L} \rangle =C_L^{\lambda \mu }C_L^{\lambda \mu '} \int _{0}^{\pi } \sin (3\gamma ) \sum _{K \textrm{even}} \frac{2\phi ^{\lambda \mu L}_{K}(\gamma )\phi ^{\lambda \mu 'L}_{K}(\gamma )}{1+\delta _{K0}}d \gamma , \end{aligned}$$
(4.8)

which are normalized by factor \(C_L^{\lambda \mu }\)

$$\begin{aligned} \bar{\phi }_K^{\lambda \mu L}(\gamma )=C_L^{\lambda \mu }\phi _K^{\lambda \mu L}(\gamma ),\quad (C_L^{\lambda \mu })^{-2} =\int _{0}^{\pi } \sin (3\gamma ) \sum _{K \textrm{even}}\frac{2(\phi ^{\lambda \mu L}_{K}(\gamma ))^2}{1+\delta _{K0}}d \gamma . \end{aligned}$$
(4.9)

The orthogonalized eigenfunctions \(\phi ^{\lambda \mu L}_{K}(\gamma )\) were obtained using the Gram-Schmidt method from nonorthogonal angular functions, \(\hat{\phi }^{\lambda \mu L}_{K}(\gamma )\), given in [16].

In the case of an anharmonic oscillator, this problem at any fixed L and M is reduced to a set of 2D BVPs, their number being \(L/2+1\) for even L and \((L-1)/2\) for odd L, coupled by a three-diagonal matrix [14].

The equation for the GCM with respect to components \(\Phi _{nK}^{L}(\beta ,\gamma )\) and eigenvalue \(E_{n}^{L}\) (in MeV) reads as

$$\begin{aligned}{} & {} \hspace{-0.4cm} \sum _{K'\textrm{even}}\left[ \left( T + T^{L}_{K} +\frac{2{\bar{B}}_{2}}{\hbar ^{2}}(\hat{V}- E_{n}^{L})\right) \delta _{KK'} -T_{KK'}^{L}\right] \Phi _{nK'}^{L}(\beta ,\gamma )=0, \end{aligned}$$
(4.10)
$$\begin{aligned}{} & {} T = T( \beta ,\gamma )=-\frac{1}{\beta ^{4}\sin (3\gamma )} \left( \frac{\partial }{\partial \beta }\beta ^{4}\sin (3\gamma )\frac{\partial }{\partial \beta }+ \frac{\partial }{\partial \gamma }\beta ^{2}\sin (3\gamma )\frac{\partial }{\partial \gamma }\right) , \nonumber \\{} & {} T^{L}_{K}=T^{L}_{K}( \beta ,\gamma )= +2 {\bar{B}}_{2}\left[ (L(L+1)-K^{2})\left( \frac{1}{4J_{1}}+ \frac{1}{4J_{2}}\right) +\frac{K^{2} }{2J_{3}}\right] ,\\\nonumber{} & {} T_{KK'}^{L}=T_{KK'}^{L}( \beta ,\gamma )=-2{\bar{B}}_{2}\left( \frac{1}{8J_{1}}- \frac{1}{8J_{2}}\right) C_{KK'}^{L},\nonumber \\{} & {} C_{KK'}^{L}=\delta _{K'K-2}C_{KK-2}^{L}+\delta _{K'K+2}C_{KK+2}^{L},\nonumber \\{} & {} C_{KK-2}^{L}=(1+\delta _{K2})^{1/2}[(L+K)(L-K+1)(L+K-1)(L-K+2)]^{1/2},\nonumber \\{} & {} C_{KK+2}^{L}=(1+\delta _{K0})^{1/2}[(L-K)(L+K+1)(L-K-1)(L+K+2)]^{1/2},\nonumber \end{aligned}$$
(4.11)

where \({\bar{B}_{2}}=2 B_{2}/\sqrt{5}\) (in \(10^{-42}\) MeV \(\cdot \) sec\(^2\) \(\sim \) \(\hbar ^{2}\)/MeV) is the mass parameter, the \(\beta \) (in fm), and \(\hbar =6.58211828\) (in \(10^{-22}\) MeV \(\cdot \) sec). Summation over K includes even values of K in the range (4.5) and the moments of the inertia are denoted as \({J_{k}=4{\bar{B}}_{(k)}\beta ^{2}\sin ^{2}(\gamma -2 k\pi /3)}\), where \(k=1,2,3\) and \({\bar{B}}_{(k)}= {\bar{B}}_{2}\) is the mass parameter with the potential function \(\hat{V}(\beta ,\gamma )\) of the GCM having the form [7]

$$\begin{aligned} \hat{V}\equiv \hat{V}(\beta ,\gamma ){} & {} =C_2\frac{1}{\sqrt{5}}\beta ^2 -C_3\sqrt{\frac{2}{35}}\beta ^3 \cos (3 \gamma ) +C_4\frac{1}{5}\beta ^4\nonumber \\{} & {} \quad -C_5\sqrt{\frac{2}{175}}\beta ^5 \cos (3 \gamma ) +C_6\frac{2}{35}\beta ^6 \cos ^2(3 \gamma )+D_6\frac{1}{5\sqrt{5}}\beta ^6. \end{aligned}$$
(4.12)

The bounded components \(\Phi _{nK}^{L}(\beta ,\gamma )\) are subjected to homogeneous Neumann or Dirichlet boundary conditions at the boundary points of the interval \(\gamma \in [0,\pi /3]\) for zero or odd values of L (for details, see [14, 27]), and the orthonormalization conditions

$$\begin{aligned} \int _{\beta =0}^{\beta _{\max }}\int _0^{\pi /3}\beta ^{4} \sin (3\gamma ) \sum _{K \textrm{even}}\Phi _{n'K}^{L}(\beta ,\gamma )\Phi _{nK}^{L}(\beta ,\gamma )d\gamma d \beta = \delta _{n'n}. \end{aligned}$$
(4.13)
Table 1 The values of parameters \(B_2\) (in \(10^{-42}\) MeV\(\cdot \)sec\(^2\)), \(C_k\), \(k=2,\ldots ,6\), (in MeV/fm\(^k\)) and \(D_6\) (in MeV/fm\(^6\)) for \(^{186}\)Os nucleus [7] and for \(^{188}\)Os nucleus [26], and \(s=\hbar ^2\sqrt{5}/(4B_2)\) (in MeV)
Fig. 4
figure 4

Potential energy surface \(V(x_1,x_2)\) for \(^{186}\)Os nucleus vs variables \(\beta \) (in fm) and angle \(\gamma \), and \(a_0\) and \(a_2\) (in fm)

Table 2 Energy eigenvalues \(E^{L}_{n}\) (B), and \(E^{L}_{n}\) (F), and \(E^{L}_{n}\) (5 M) (in MeV) of the \(^{186}\)Os nucleus states with parity \(\hat{\pi }=+1\), calculated by expanding the solutions over the basis functions (4.4), and by GCMFEM program for 2D BVP (4.104.13), and by the KANTBP 5 M program for 1D BVP (5.45.6), respectively. NK is the number of components for K (the number of 2D equations in (4.10)), \(j_{\max }\) is the number of Eq. (5.4). TW, TM and T5M are the CPU times (in seconds) of the GCMFEM program implemented in Mathemtica and Maple, and the KANTBP 5 M program in Maple, respectively
Table 3 Energy eigenvalues \(\Delta E\equiv E_n^L-E_0^0\) (in MeV) relative to the ground state energy \(E_0^0\) of the \(^{188}\)Os nucleus states with parity \(\hat{\pi }=+1\). The values of model parameters (see Table 1) and the Exp experimental data taken from [26]

The BVP (4.10)–(4.13) was solved by the GCMFEM program implemented in Maple 2022 and Mathematica 12 given in the Supplementary material. As an example, we calculate the energy spectrum \(E_n^L\) of the nuclei \(^{186}\)Os and \(^{188}\)Os with mass \({\bar{B}_{2}}\) and potential \(\hat{V}(\beta ,\gamma )\) from (4.12) for the values of parameters given in Table 1 for \(^{186}\)Os nucleus [7] and for \(^{188}\)Os nucleus [26].

The potential energy surface \(V(x_1,x_2)\) for \(^{186}\)Os nucleus vs variables \(\beta \) (in fm) and angle \(\gamma \), and \(a_0\) and \(a_2\) (in fm) for the parameters from Table 1 is displayed in Fig. 4.

In Tables 2 and 3, we compare our FEM results for the lower part of energy spectrum with the eigenvalues \(E^{L}_n\) (in MeV) of the \(^{186}\)Os nucleus and \(\Delta E\equiv E_n^L-E_0^0\) (in MeV) relative to the ground state energy \(E_0^0=-1.54657335\) MeV of the \(^{188}\)Os nucleus calculated using HIPs with those calculated by expanding the desired solution over the basis functions (4.4) at \(N_{\max }=30\), implemented in the GCM FORTRAN program [7] at the values of parameters \(B'_{2}=90\cdot 10^{-42}\) MeV\(\cdot \)sec\(^2\), \(C'_{2}= 100\) MeV and \(P_{3}=0\). The results obtained by GCMFEM program with HIPs \(p=1\), \(\kappa _{\max }=2\), \(p'=3\) for 2D BVP (4.104.13) were calculated on the grid \([\beta =0.0,0.035,\ldots ,0.35]\otimes [\gamma =0,\pi /30,\ldots ,\pi /3]\) for \(^{186}\)Os nucleus and \([\beta =0.0,0.045,\ldots ,0.45]\otimes [\gamma =0,\pi /30,\ldots ,\pi /3]\) for \(^{188}\)Os nucleus.

There is a good agreement between the results obtained by GCMFEM program with HIPs and the expansion in the basis functions. However, the GCMFEM program has a significant advantage over the program with the expansion of the desired solution via the basis functions (4.4), since it has no variational parameters \(B'_{2}\) and \(C'_{2}\) of basis functions (4.6) and is applicable to solving a wider class of BVPs (2.1), as it has been pointed out in Ref. [26]. One can see that the execution time TW of the GCMFEM program in Mathematica is spending less time TM than on Maple, but in both cases it increases with an increase in the number of components \(\Phi _{nK}^{L}(\beta ,\gamma )\), i.e., a number of the two-dimensional equations to be solved.

5 Reduction of a 2D BVP to a System of 1D BVPs

We seek the components \(\Phi _{nK}^{L}(\beta ,\gamma )\) of 2D BVP (4.10)–(4.13) in the form of an expansion

$$\begin{aligned} \Phi _{nK}^{L}(\beta ,\gamma )=\sum _{j=1}^{j_{\max }} \phi _{jK}^{ L}(\gamma )\chi ^{L}_{jn}(\beta ). \end{aligned}$$
(5.1)

The eigenfunctions \(\phi _{iK}^{L}(\gamma )\approx \phi _{K}^{\lambda \mu L}(\gamma )\) and the corresponding eigenvalues \(E^{L}_{i}\approx \lambda (\lambda +3)\) are solutions of the BPV that has been solved using KANTBP 5 M program [8] implemented in Maple on a grid \(\Omega (\gamma )=\{0(10)\pi /3\}\), where (x) is a number of the finite element, with HIPs of the fifth order

$$\begin{aligned}{} & {} \sum _{K'\textrm{even}}\left[ \left( T + T^{L}_{K} - E_{i}^{L}\right) \delta _{KK'} -T_{KK'}^{L}\right] \phi _{iK'}^{L}(\gamma )=0,\\{} & {} T = T( \gamma )=-\frac{1}{\sin (3\gamma )} \frac{\partial }{\partial \gamma }\sin (3\gamma )\frac{\partial }{\partial \gamma }.\nonumber \end{aligned}$$
(5.2)

Here the summation over K includes even values of K in the range (4.5), \(T^{L}_{K}\) and \(T^{L}_{KK'}\) are given in (4.11) at \(\beta =1\) and \(\bar{B}_{2}=1\). The orthogonal angular functions \(\phi _{iK}^{L}(\gamma )\) are determined together with the scalar product

$$\begin{aligned} \langle \phi _{i}^{L} \vert \phi _{j}^{L} \rangle =\int _{0}^{\pi /3} \sin (3\gamma )\sum _{K \textrm{even}} \phi _{iK}^{L}(\gamma ) \phi _{jK}^{L}(\gamma )d\gamma =\delta _{ij}. \end{aligned}$$
(5.3)

The numerical \(E^{(L)NUM}_{i}\) calculated by KANTBP 5 M program [8] and analytical eigenvalues \(E^{(L)AN}_{i}\) \(=\lambda (\lambda +3)\) are compared with 8–5 significant digits.

Fig. 5
figure 5

Diagonal effective potentials \(V(\beta )=\hat{V}^{L}_{ii}(\beta )\) for \(^{186}\)Os nucleus vs the variable \(\beta \) (in fm) for \(L=0\) (solid lines, the first six potentials are labeled from ‘a’ to ‘f’) and for \(L=3\) (dashed lines, the first five potentials are labeled from ‘b’ to ‘f’)

Substituting expansion (5.1) in 2D BVP (4.10)–(4.13) and averaging over \(\phi _{K}^{\lambda \mu L}(\gamma )\) yields a system of 1D BVPs

$$\begin{aligned} \sum _{j=1}^{j_{\max }}\left[ -\delta _{ij}\frac{1}{\beta ^4}\frac{\partial }{\partial \beta }{\beta ^4}\frac{\partial }{\partial \beta } +\hat{V}_{ij}^{(L)}(\beta )-\frac{2\bar{B}_2}{\hbar ^2} E^{L}_n \delta _{ij} \right] \chi ^{L}_{jn}(\beta )=0, \end{aligned}$$
(5.4)

where the matrix elements \(\bar{V}_{ij}^{(L)}(\beta )\) are given by the integrals (for example, see Fig. 5)

$$\begin{aligned} \hat{V}_{ij}^{(L)}(\beta ) =\frac{E^{(L)NUM}_{i}}{\beta ^2}\delta _{ij} +\frac{2\bar{B}_2}{\hbar ^2}\int _{0}^{\pi /3}\sin (3\gamma ) \sum _{K\ge 0,\textrm{even}} \phi _{iK}^{L}(\gamma )\hat{V}(\beta ,\gamma ) \phi _{jK}^{L}(\gamma )d\gamma , \end{aligned}$$
(5.5)

The eigenfunctions \(\chi ^{L}_{jn}(\beta )=\chi ^{L}_{\lambda \mu ;n}(\beta )\) have to satisfy the Neumann boundary conditions, obtained by averaging (4.104.13) over the orthonormalized angular functions \(\phi _{K}^{\lambda \mu L}(\gamma )\) and the orthonormalization conditions

$$\begin{aligned} \int _0^{\beta _{\max }}\sum _{j=1}^{j_{\max }}\beta ^4\chi ^{L}_{jn}(\beta )\chi ^{L}_{jn'}(\beta )d\beta =\delta _{nn'}. \end{aligned}$$
(5.6)
Fig. 6
figure 6

The first three eigenfunctions \(\chi ^{L}_{jn}(\beta )\), \(n=1,2,3\) for \(L=0\) (solid lines) and for \(L=3\) (dashed lines) of the \(^{186}\)Os nucleus. The leading components are labeled by their number j

Fig. 7
figure 7

The first three eigenfunctions \(\Phi _{nK}^L(\beta ,\gamma )\), \(n=1,2,3\), for \(L=0\) (upper panels) and for \(L=3\) (lower panels) of the \(^{186}\)Os nucleus

The BVP (5.45.6) using the parameters for the nuclei \(^{186}\)Os and \(^{188}\)Os, listed in Table 1 has been solved using the KANTBP 5 M program [8] implemented in Maple on a grid \(\Omega (\beta )=\{0(10)0.45\}\) with the fifth order HIPs \(p=1\), \(\kappa _{\max }=3\), \(p'=5\) from Eq. (3.10). The calculated eigenvalues \(E_n^L\) of the \(^{186}\)Os nucleus and \(\Delta E=E-E_0^0\) of the \(^{188}\)Os nucleus are presented in the Tables 2 and 3. They are in a good agreement with the results calculated by expansion over a complete basis [7] and by GCMFEM program implemented 2D FEM with HIPs. Figure 6 displays the first three eigenfunctions \(\chi ^{L}_{jn}(\beta )\), \(n=1,2,3\) for \(L=0\) and for \(L=3\), respectively. Decreasing the magnitudes of the leading components with increasing their number j gives estimations for the convergence rate of expansion (5.1) of the 2D components \(\Phi _{nK}^L(\beta ,\gamma )\), \(n=1,2,3\) for \(L=0\) and for \(L=3\) displayed in Fig. 7. One can see that the execution time TW of the GCMFEM program in Mathematica does spent less time TM than in Maple, but in both cases the time T5M for solving the ODE system (5.4) by FEM and using the expansion of the desired solution in terms of the basis is less than the times for solving two-dimensional problems. However, as mentioned above, the expansion in terms of the basis has a limited application.

6 Conclusions

We have developed a symbolic-numerical method implemented in the GCMFEM program based on high-accuracy FEM schemes with multivariate HIPs, which preserve the continuity of derivatives at the boundary of finite elements in Maple and Wolfram Mathematica. As an example, we computed the energy spectrum in GCM of atomic nuclei. The efficiency of the elaborated procedures and the program is shown by benchmark calculations of the spectra of \(^{186}\)Os and \(^{188}\)Os nuclei, which demonstrate quick performance even on a laptop. The 2D BVP for GCM is also reduced to the 1D BVP for a system of ordinary differential equations that is solved by the KANTBP 5 M program implemented in Maple. The results are in good agreement with the calculations of the algebraic version of the GCM [7]. The developed approach and programs can be applied in various generalizations of GCM [28] and microscopic-macroscopic six-dimensional model of atomic nuclei [24, 25]. The GCM program can be applied to study the properties of superheavy nuclei using the approach proposed in Refs. [26, 29].