Cite

Introduction

Graph theory is speedily moving into the mainstream of mathematics chiefly because of its applications in various fields such as computer science, biochemistry, operational research and electrical engineering [1, 2]. A graph polynomial is a function associated with a respective graph, to such an extent that a similar polynomial is allotted to graphs arising from a relabelling of the vertices. Many mathematicians and physicists are currently interested in the study of singular boundary and initial problems in the second-order ordinary differential equations (ODEs). We here considered the Lane-Emden (LE) equation formulated as y+2xy+f(y)=0,a<x<b, y'' + \frac{2}{x}y' + f(y) = 0,a < x < b, corresponding primary and boundary constraints are given as y(a) = A, y′(a) = B or y(a) = A1, y′(a) = B1.

Where a,b,A,A1,B,B1 are constants, y″ and y′ are second and first derivatives, respectively. The majority of existing algorithms for dealing with LE-type models are grounded on series solutions or operational matrix methods. The subsequent approaches employed to crack the linear and nonlinear DEs are, ADM [3,4], DTM [5], the Laguerre wavelet scheme [6], the Clique polynomials technique [7], the new Ultraspherical wavelet collocation process [8], the Laguerre wavelets method [9], the Homotopy analysis method [10], the Legendre wavelet method [11], the Ebola Virus with Power Law Kernel method [12] and the Newell-Whitehead-Segal equation [13]. There are many approaches to solving differential equations. The collocation method is one of them.

In this study, we aim to provide an algorithm for the solution of DEs by graph theoretic polynomials. We considered the Hosoya polynomial of some trees which were given by D.Stevanovic and I.Gutman in [14] and used only linearly independent Hosoya polynomials to solve the differential equations. The suggested technique expresses the anticipated solution in the form of a linear combination of polynomials that are continuous across an interval. Nevertheless, compared to other methods for solving differential equations, the correctness and efficacy of this method relies on the proportions of the collection of Hosoya polynomials, and this process produces an easier and excellent agreement between the exact and approximate solutions obtained when the current scheme is used to solve linear and nonlinear models. Potentially, this method could be used in more intricate systems for which there are no exact solutions. Let (a,b) ⊂ R and q(x), p(x),r(x,y) : (a,b) → R be continuous real functions. Here, we study the singular ODEs given by, y(x)+p(x)y(x)+q(x)y(x)=r(x,y),a<x<b, y''(x) + p(x)y'(x) + q(x)y(x) = r(x,y),a < x < b, subject to primary constraints y(a) = α and y′(a) = β where α and β are constants.

The rest of this article is organized as follows. Section 2 presents some important properties of Hosoya polynomials. Section 3 introduces the function approximation formula being Hosayo polynomial method (HPM). Section 4 gives some theoretical results. Section 5 defines the scheme handled in this paper. Section 6 extracts some numerical results. In section 7, discussion and conclusion are reported in detail.

Hosoya polynomials

Let G be a graph with n vertices v1,v2,···,vn. A connected acyclic graph is called tree. The measurement of the shortest path connecting the vertices vi and vj is indicated by the symbol. The largest distance among any 2 vertices of a graph G is its diameter. W (G) denotes the Wiener Index of a connected graph G, which is pointed as the sum of the length between all unordered couples of vertices in G, that is, W(G)=1<jd(vi,vj). W(G) = \sum\limits_{1 < j} d({v_i},{v_j}). Wiener [15] proposed this index in 1947 to approximate the boiling temperatures of alkanes. The calculation impact was very strong. Since then, the Wiener index has piqued the interest of many chemists. [16] contains information on its chemical applications as well as its mathematical features. In 1988, Hosoya introduced Hosoya polynomial in his seminal paper [17] thus receiving a lot of attention. After a short time, the polynomial was considered by Sagan et al. [18] under the title Wiener polynomial. Nevertheless, nowadays it is called a Hosoya polynomial. For a connected graph G on n vertices, the Hosoya polynomial, represented by Hn,d(G,x) is defined as, Hn,d(G,x)=k0d(G,k)xk, H_{n,d}(G,x)=\sum_{k\geqslant0}d(G,k)x^k, where d(G,k) is the numeral of pairs of vertices of G that are separated by k, d is the degree of polynomial and x is the parameter. The degree of the Hosoya polynomial is always the diameter of a graph.

The Hosoya polynomial gives sufficient evidence about distance-based graph invariants. For example, knowing the Hosoya polynomial of a graph makes it simple to compute the Wiener index as the first derivative of the polynomial at the point x = 1. In reference [19], Cash observed that the hyper-Wiener index is derived similarly from the Hosoya polynomial. Estrada et al. [20] used the Hosoya polynomial in chemical applications. Hosoya polynomials are investigated on trees [14, 16], composite graphs [21], benzenoid-graphs [22], tori [23], zig-zag nanotubes [22], certain-graph-decorations [24], arm-chair nanotubes [25], polyhex-nanotorus [26], TUC4C8(S) tubes [27] as well as on Lucas and Fibonacci cubes [28] and so on [29,30,31]. Trees up to five vertices and their Hosoya polynomials are given in Figure 1. One tree with one vertex One tree with two vertices One tree with three vertices.

Fig. 1

Trees with different vertices.

Function approximation

The differential equation (2) solution is approximated as follows: y(x)a1+a2x+i=1n2ai+2Hn,i+1(G,x)=a1+a2x+ATH(x), y(x) \approx {a_1} + {a_2}x + \sum\limits_{i = 1}^{n - 2} {a_{i + 2}}{H_{n,i + 1}}(G,x) = {a_1} + {a_2}x + {A^T}H(x), where n represents the number of vertices of the tree. Moreover AT = [a3,···,an], and HT (x) = [Hn,2(G,x),Hn,3(G,x),···,Hn,n−1(G,x)] is any real number {1,x,Hn,2(G,x),···,Hn,n−1(G,x)} must be linearly independent.

Theoretical results
Theorem 1

Let Rn−1 be an n-dimensional polynomial space over the field R and y : [a,b] → Rn−1 be the solution of the arbitrary second-order DE. Then the solution for such a DE by Hosoya polynomial method (HPM) is exact.

Proof

Let y(x) be the solution of second-order DE of degree at most n. If y(x) be any polynomial of degree n − 1 with real coefficients, then there is a subset S={1,x,Hn,2(G,x),···,Hn,n−1} that spans the n-dimensional space, where Hn,d is a Hosoya polynomial of degree d, where d = 2,3,···,n − 1.

Let y(x)=a1+a2x+i=1n2ai+2Hn,i+1(G,x) y(x) = {a_1} + {a_2}x + \sum\nolimits_{i = 1}^{n - 2} {a_{i + 2}}{H_{n,i + 1}}(G,x) , which is a linear combination of Hosoya polynomials. We can derive values of ai,i = 2,3,···,n − 2 by equating the quantities like powers of x on both sides. As a result, y(x) can be precisely approximated as a linear combination of Hosoya polynomials.

Theorem 2

If S is the collection of all possible Hosoya polynomials of trees Tn on n vertices. Then there will be n − 2 linearly independent Hosoya polynomials.

Proof

If S = (H,n) be the gathering of all Hosoya polynomials of graphs of order n, that is, S(H,n)=Hn,d(G,x)|Hn,d(G,x)=a0+a1x++an1xn1,aiR S(H,n) = \left\{ {{H_{n,d}}(G,x)|{H_{n,d}}(G,x) = {a_0} + {a_1}x + \cdots + {a_{n - 1}}{x^{n - 1}},\forall {a_i} \in R} \right\} This contains a set of all Hosoya polynomials of degree at most n − 1 which are linearly dependent since same-degree polynomials are repeated.

Let S1(H,n) ={Hn,d(G,x)|Hn,d(G,x) = a0 + a1x + ··· + an−1xn−1,∀aiR} be the subset of S(H,n) and any two polynomials of S1(H,n) are not of the same degree. Therefore | S1(H,n) |= n − 2. Now we claim that S1(H,n) is linearly independent.

Consider a2Hn,2(G,x)+a3Hn,3(G,x)++an1Hn,n1(G,x)=0, {a_2}{H_{n,2}}(G,x) + {a_3}{H_{n,3}}(G,x) + \cdots + {a_{n - 1}}{H_{n,n - 1}}(G,x) = 0, where, Hn,d(G,x) be the Hosoya polynomial of degree d. From equation (4), equating the coefficients of {x2,x3,···,xn}, we get ai = 0 for all i = 2,3,···,n − 1. Therefore S1(H,n) is linearly independent.

Solution method

By approximating y(x) using Hosoya polynomials, we can transport a solution y(x) under Hosoya polynomial space as follows: y(x)a1+a2x+i=1n2ai+2Hn,i+1(G,x)=a1+a2x+ATH(x), y(x) \approx {a_1} + {a_2}x + \sum\limits_{i = 1}^{n - 2} {a_{i + 2}}{H_{n,i + 1}}(G,x) = {a_1} + {a_2}x + {A^T}H(x), where AT = [ a3,···,an],HT (x) = [Hn,2(G,x),Hn,3(G,x),···,Hn,n−1(G,x)] and Hn,i+1(G,x) are Hosoya polynomials of trees. Because the primary or boundary criteria stated in section 1 provide two conditions, we can notice that there must be n − 2 extra constraints to recover the unidentified coefficients ai. These conditions can be obtained by replacing equation (2) in equation (5). Thus, we obtain d2dx2(a1+a2x+i=1n2ai+2Hn,i+1(G,x))+p(x)ddx(a1+a2x+i=1n2ai+2Hn,i+1(G,x))+q(x)(a1+a2x+i=1n2ai+2Hn,i+1(G,x))=f(x,(a1+a2x+i=1n2ai+2Hn,i+1(G,x))). \begin{array}{*{20}{r}}{\frac{{{d^2}}}{{d{x^2}}}({a_1} + {a_2}x + \sum\limits_{i = 1}^{n - 2} {a_{i + 2}}{H_{n,i + 1}}(G,x)) + p(x)\frac{d}{{dx}}({a_1} + {a_2}x + \sum\limits_{i = 1}^{n - 2} {a_{i + 2}}{H_{n,i + 1}}(G,x))}\\{ + q(x)({a_1} + {a_2}x + \sum\limits_{i = 1}^{n - 2} {a_{i + 2}}{H_{n,i + 1}}(G,x)) = f(x,({a_1} + {a_2}x + \sum\limits_{i = 1}^{n - 2} {a_{i + 2}}{H_{n,i + 1}}(G,x))).}\end{array} Now, we collocate the equation (6) by the limit points of the next sequence to get n − 2 number of equations, xj=12[1+cos(1n2(j1)π)], {x_j} = \frac{1}{2}[1 + \cos (\frac{1}{{n - 2}}(j - 1)\pi )], where j = 2,3,···. Therefore, d2dx2(a1+a2xj+i=1n2ai+2Hn,i+1(G,xj))+p(xj)ddx(a1+a2xj+i=1n2ai+2Hn,i+1(G,xj))+q(xj)(a1+a2xj+i=1n2ai+2Hn,i+1(G,xj))=f(xj,(a1+a2xj+i=1n2ai+2Hn,i+1(G,xj))). \begin{array}{*{20}{r}}{\frac{{{d^2}}}{{d{x^2}}}({a_1} + {a_2}{x_j} + \sum\limits_{i = 1}^{n - 2} {a_{i + 2}}{H_{n,i + 1}}(G,{x_j})) + p({x_j})\frac{d}{{dx}}({a_1} + {a_2}{x_j} + \sum\limits_{i = 1}^{n - 2} {a_{i + 2}}{H_{n,i + 1}}(G,{x_j}))}\\{ + q({x_j})({a_1} + {a_2}{x_j} + \sum\limits_{i = 1}^{n - 2} {a_{i + 2}}{H_{n,i + 1}}(G,{x_j})) = f({x_j},({a_1} + {a_2}{x_j} + \sum\limits_{i = 1}^{n - 2} {a_{i + 2}}{H_{n,i + 1}}(G,{x_j}))).}\end{array} From initial or boundary conditions and equation (8), we acquire a system with n linear or nonlinear equations. By cracking this system, we get n unknown coefficient values. Substituting these unknown coefficient numerals in equation (5) we get an approximate solution of equation (2).

Numerical illustrations

In this part of the paper, we investigate the governing models.

Application 1

Let us study the LE equation in [9] as y+2xy+y=6+12x+x2+x3,0<x1, y''+ \frac{2}{x}y'+y=6+12x+x^2+x^3, ~~ 0<x\leqslant1, restricted to primary constraints y(0) = 0 and y′(0) = 0. Its precise solution is y(x) = x3 + x2. Solving equation (9) by the newly developed scheme for n = 7, we obtain coefficients as, a1=1415 {a_1} = \frac{{ - 14}}{{15}} , a2=45 {a_2} = \frac{{ - 4}}{5} , a3=130 {a_3} = \frac{{ - 1}}{{30}} , a4=16 {a_4} = \frac{1}{6} ,a5 = a6 = 0 and a7 = 0. Then the approximate solution is the same as the precise solution.

Application 2

The nonlinear Emden-Fowler (EF) kind problem in [3], y+6xy+14y=4yln(y),x>0, y'' + \frac{6}{x}y' + 14y = - 4y\, ln (y),x > 0, restricted to primary constraints y(0) = 1 and y′(0) = 0. The precise solution is y(x) = ex2. Here we successfully applied the newly adopted strategy with n = 7 and then we obtained a nonlinear system of seven equations. On solving the algebraic system, we obtain coefficients as a1 = 1.2950,a2 = 0.2528,a3 = 0.0036,a4 = −0.2578,a5 = 0.3331,a6 = 0.1244 and a7 = 0.0034.

The corresponding approximate solution is given as yapp(x)=0.0033x60.2419x5+0.6363x40.0322x30.9976x2+1.8367×1040x+1. {y_{app}}(x) = 0.0033{x^6} - 0.2419{x^5} + 0.6363{x^4} - 0.0322{x^3} - 0.9976{x^2} + 1.8367 \times {10^{ - 40}}x + 1. The absolute error (AE) obtained by the estimated solution with the exact solution for diverse values of n is exposed in Table 1 and it confirms that, as increasing the values of n accuracy in the solution also increases. Figure 2 represents the graphical interpretation of the solution y1(x). Table 2 represents a comparison of the present scheme with other approaches given in [29] this reveals that HPM is better than the method in [29].

Application 3

The nonlinear EF model is presented in [9] by y+2xy+4(2ey+ey2)=0, y'' + \frac{2}{x}y' + 4(2{e^y} + {e^{\frac{y}{2}}}) = 0, subject to primary constraints y(0) = 0 and y′(0) = 0. The precise solution is y(x) = −2ln(1 + x2). At this point we successfully applied the newly adopted strategy with distinct n. Table 3 represents the AE of the developed technique for diverse values of n. Graphical interpretation of the approximate solution y1(x) are drawn in Figure 3.

Application 4

The nonlinear EF-type equation [8] can be written as: y+(y(x))2y(x)=sinh2(x), y'' + {(y'(x))^2} - y(x) = \mathop {\sinh }\nolimits^2 (x), restricted to boundary constraints y(0) = 1 and y(1) = cosh(1). Its analytic solution is y(x) = cosh(x). Here we successfully applied the newly adopted strategy with distinct n. Via Figure 4, 2D simulation is plotted. Table 4 denotes the AE of the developed technique for diverse values of n. Visual clarification of the approximate result obtained by HPM with the exact result.

Application 2 AE derived by HPM versus Exact solution.

x Exact Sol. AE at n=7 AE at n=8 AE at n=9 AE at n=10

0.1 0.990049833749168 2.82E-06 1.66E-08 4.74E-08 4.59E-09
0.2 0.960789439152323 1.16E-05 2.51E-07 1.12E-07 1.51E-09
0.3 0.913931185271228 1.93E-05 6.86E-08 1.48E-07 1.25E-08
0.4 0.852143788966211 9.73E-07 7.81E-07 1.45E-07 1.29E-08
0.5 0.778800783071405 2.56E-05 4.60E-07 1.35E-07 1.68E-08
0.6 0.697676326071031 2.74E-05 1.06E-06 1.91E-07 2.10E-08
0.7 0.612626394184416 4.21E-06 1.48E-06 8.39E-08 1.35E-08
0.8 0.527292424043049 3.43E-05 6.83E-07 2.40E-07 2.71E-08
0.9 0.444858066222941 1.58E-05 1.57E-06 2.89E-06 1.21E-08
1.0 0.367879441171442 8.55E-06 4.41E-07 7.74E-06 4.34E-09

Judgement of the AE of HPM and other techniques in [29].

x Exact Sol. AE by method [29] AE at n=10

0.1 0.990049833749168 4.89E-06 4.59E-09
0.2 0.960789439152323 6.84E-06 1.51E-09
0.3 0.913931185271228 8.03E-07 1.25E-08
0.4 0.852143788966211 8.38E-06 1.29E-08
0.5 0.778800783071405 1.28E-05 1.68E-08
0.6 0.697676326071031 5.32E-05 2.10E-08
0.7 0.612626394184416 2.06E-04 1.35E-08
0.8 0.527292424043049 5.93E-04 2.71E-08
0.9 0.444858066222941 1.41E-03 1.21E-08
1.0 0.367879441171442 3.07E-03 4.34E-09

Fig. 2

Assessment of HPM solution with the exact solution at n = 10.

Application 3, AE derived by HPM versus Exact solution.

x Exact Sol. AE at n=7 AE at n=8 AE at n=9 AE at n=10

0.1 -0.019900661706336 1.87E-05 1.87E-06 6.40E-06 1.75E-07
0.2 -0.078441426306563 1.63E-05 1.63E-05 3.14E-07 2.71E-07
0.3 -0.172355392482105 5.57E-05 5.57E-05 4.67E-07 2.95E-07
0.4 -0.296840010236547 5.03E-05 5.03E-06 8.74E-07 4.93E-07
0.5 -0.446287102628420 1.90E-05 1.90E-05 2.09E-07 3.04E-07
0.6 -0.614969399495921 3.88E-06 3.88E-07 9.45E-07 1.10E-08
0.7 -0.797552239914736 1.05E-05 1.05E-05 7.97E-07 1.06E-07
0.8 -0.989392483672214 1.15E-05 1.15E-06 7.48E-07 8.61E-08
0.9 -1.186653690555469 8.85E-06 8.85E-06 1.62E-06 7.51E-09
1.0 -1.386294361119891 5.00E-06 5.00E-06 5.18E-05 1.54E-08

Fig. 3

Plot of y1(x) compared with analytical solution.

AE comparison of the solution y1(x) with different values of n.

x Exact Sol. AE at n=7 AE at n=8 AE at n=9 AE at n=10

0.1 1.005004168055804 1.42E-08 1.39E-09 8.22E-11 3.56E-13
0.2 1.020066755619076 1.06E-08 1.89E-10 1.91E10 7.76E-13
0.3 1.045338514128861 1.79E-08 1.25E-09 2.71E-10 1.02E-12
0.4 1.081072371838455 2.42E-08 7.64E-10 3.43E-10 1.81E-13
0.5 1.127625965206381 1.05E-09 2.15E-09 4.37E-10 1.31E-12
0.6 1.185465218242268 2.31E-08 4.34E-10 5.27E-10 3.32E-13
0.7 1.255169005630943 7.97E-09 1.45E-09 6.02E-10 9.38E-13
0.8 1.337434946304845 2.82E-08 1.15E-10 6.52E-10 1.03E-12
0.9 1.433086385448775 2.38E-08 1.74E-09 4.86E-10 4.34E-13

Fig. 4

Plot of y1(x) obtained by the HPM at n = 10 for equation (12).

Conclusion

We proposed the Hosayo polynomial method to solve nonlinear initial and boundary value models. Nonlinear ODEs are transformed into a nonlinear system of algebraic equations with this method. To obtain a numerical solution, these equations are solved using Newton’s Raphson technique. The developed technique is evaluated on some applications, and the results compare favourably with the current numerical results. Finally, we recap the findings of our study as follows;

* In comparison to other existing numerical algorithms, the considered scheme provides greater accuracy.

* This strategy is simple to adopt in computer programs, and we can upgrade it to higher-order functions with a minor change to the current method.

* Theorem 1 demonstrates that the proposed technique will provide an exact solution for DEs whose solutions are in the polynomial form of finite degree, as shown in application 1.

It is advised that this method may be used to observe other nonlinear initial and boundary value problems.

Declarations
Conflict of interest 

The authors have no competing interests to declare that are relevant to the content of this article.

Funding

No funding was received to assist with the preparation of this manuscript.

Author’s contribution

K.S.- Conceptualization, Methodology, Software. H.S.R.- Writing-Review Editing. R.A.M.-Formal Analysis, Validation, Writing-Original Draft. R.B.J.-Methodology, Software. All authors read and approved the final submitted version of this manuscript.

Acknowledgement

The authors deeply appreciate the anonymous reviewers for their helpful and constructive suggestions, which can help further improve this paper.

Data availability statement

All data that support the findings of this study are included within the article.

Using of AI tools

The authors declare that they have not used Artificial Intelligence (AI) tools in the creation of this article.

eISSN:
2956-7068
Language:
English
Publication timeframe:
2 times per year
Journal Subjects:
Computer Sciences, other, Engineering, Introductions and Overviews, Mathematics, General Mathematics, Physics