Introduction

Nonlinear PDEs play a vital role in mathematics, engineering, and physics, like wave circulation phenomenon, movement of heat, electricity, plasma physics, fluid mechanics, etc. PDEs are of countless attention in nonlinear optics and quantum ground, like Advection, Burgers, Boussinesq, Fisher equation, and many more. In 1972, the BBM equation was perceived by Benjamin, Bona, and Mahony as enhancing the Korteweg–de-Vries (KdV) equation for plane water waves in an identical channel. The BBM equation is of the form [1];

$$\frac{\partial \theta \left(x ,t\right)}{\partial t}+\frac{\partial \theta \left(x ,t\right)}{\partial x}-\frac{{\partial }^{3}\theta \left(x ,t\right)}{\partial {x}^{2}\partial t}+{\theta }^{n}\left(x,t\right)\frac{\partial \theta \left(x ,t\right)}{\partial x}=0,$$

and KDV equation is of the form,

$$\frac{\partial \theta \left(x ,t\right)}{\partial t}+\frac{\partial \theta \left(x,t\right)}{\partial x}-\frac{{\partial }^{3}\theta \left(x,t\right)}{\partial {x}^{2}\partial t}+\theta \left(x, t\right)\frac{\partial \theta \left(x, t\right)}{\partial x}=0.$$

The main variation between BBM and KdV is that they are comparable only for small wavenumbers and produce different wave results.

The Klein–Gordon (KG) equation is a vastly considered PDE in condensed matter physics. Usually, the functions with nonlinearity accompanying the KG equation are polynomials or sinusoidal functions. The Schrödinger equation for the quantum wave function is connected to the KG equation. Oscar Klein and Walter Gordon proposed the KG equation in 1927 as an interesting differential equation [2]. The general KG is of the form [3];

$$\frac{{\partial }^{2}\theta \left(x,t\right)}{\partial {t}^{2}}={\left[{f}_{1}\left(\theta \right)\frac{\partial \theta \left(x,t\right)}{\partial x}\right]}_{x}+{f}_{2}\left(\theta \right).$$

Wavelet theory is one of the upcoming modern approaches in applied mathematics. It has tremendous applications in computer science, Signal analyses, image processing, and modeling. Many researchers’ offerings towards wavelet-based numerical schemes have been proposed over the past couple of years, with different practical methods for retrieving the numerical solutions for nonlinear PDEs in scientific research. They are as follows; Sensitive visualization of the fractional BBM equation [4], new analysis for KG model [5], a study on KG Zakharov equation [6], Laguerre wavelets method for BBM equation [7], Numerical solution for BBMB equation via finite integration method [8], mathematical solution for the (2 + 1) dimensional Sobolev equations via wavelet technique [9], numerical solution of generalized BBMB equation via finite difference method [10], KG equation via Clique polynomials of Complete graphs [11], numerical analysis of the KG equations by iteration transform method [12], Laguerre wavelet method for the Hunter Saxton equation [13], new exact soliton solution for (3 + 1)-dimensional BBM equation [14], numerical solution for nonlinear KG equation [15], exact traveling waves for the KG equation [16], wave solutions of a KG equation [17], orthonormal Bernoulli polynomials for modified BBM type equations [18], Hermite wavelets approach for the multi-term fractional differential equations [19], exact solutions of nonlinear KG equation with nonconstant coefficients [20], Hermite wavelet method for Rosenau–Hyman equation [21], PINNs method for coupled wave KG equations [22], nanofluid flow system by Hermite wavelet technique [23], hyperbolic PDE by Fibonacci wavelets [24], Korteweg-de Vries-Benjamin-Bona-Mahony-Burgers (KdV-BBM-B) model by the combination of the radial basis function (RBF) and the finite difference (RBF-FD), RBF-pseudospectral (RBF-PS) [25], nonlinear equal width equation by local RBF-FD method [26], sine–Gordon system by radial basis function partition of unity method (RBF-PUM) [27], nonlinear sine-Gordon equation (NSGE) localized RBF-PUM [28], Rosenau-Korteweg-de Vries-regularized-long wave equation by local RBF-FD method [29], and nonlinear regularized long-wave and nonlinear extended Fisher-Kolmogorov models by localized RBF-PUM [30].

The primary purpose is to present and explain a new numerical method for obtaining the approximate solution to the nonlinear PDEs that cannot be solved exactly. The obtained results are compared with other techniques available in the literature [32,33,34,35]. According to the current literature survey, BWCM has not been used to solve KG and BBM equations. This urges us to solve such equations.

Bernoulli wavelets produced by Bernoulli polynomials are a new accumulation to the field of wavelet families. The advantages of the present work are as follows.

  • Wavelets are mathematical functions that cut data into different frequency components and then study each component with a resolution matched to its scale.

  • The number of terms of the Bernoulli polynomials \({P}_{m}\left(x\right)\) is less than the number of the terms of the Legendre polynomials \({L}_{m}\left(x\right)\). It helps to reduce CPU time.

  • The operational matrix of integration is sparse so computational time will be less.

  • Using the Mathematica command Bernoulli[m,x], the coefficients of the Bernoulli polynomials can be easily obtained and fit the computer programs.

  • The Bernoulli wavelet is a function that may be defined at various scales and has a wide range of uses because of characteristics including orthogonality, compact support, and vanishing moment.

  • Some semi-analytical approaches depend on controlling parameters to work, but this BWCM is controlling parameter-free.

  • The proposed method is most suitable for studying solutions with discontinuity and sharp edges. We make a window for the function (at the point of discontinuity and sharp edges) then we apply this method to get information about such functions.

Due to their superior properties and benefits, Bernoulli wavelets gathered the attention of many researchers towards it.

The organization of the article is as follows. Section 2 discusses the preliminaries of the Bernoulli wavelet, operational integration matrix, and function approximation. Section 3 reveals some theorems on the convergence analysis. Section 4 is dedicated to the numerical method of solution of the proposed technique. In Sect. 5, we present the application of the BWCM to the governing model. Finally, this paper is completed by giving critical new findings in conclusion in Sect. 6.

Bernoulli Wavelet and Its Functional Matrix of Integration

Bernoulli Wavelets

Bernoulli wavelets \({\phi }_{n,m}\left(t\right)=\phi \left(k,\widehat{n},m,t\right)\) have four arguments; \(\widehat{n}=n-1, n=\text{1,2},3,\dots ,{2}^{k-1}, k\) can assume any positive integer, \(m\) is the degree of the Bernoulli polynomials, and \(t\) is the normalized time. On the interval \(\left[\text{0,1}\right)\), these wavelets are defined as [31],

$$\phi _{{n,m}} \left( t \right) = \left\{ {\begin{array}{*{20}l} {2^{{\frac{{k~ - 1}}{2}}} \tilde{b}_{m} \left( {2^{{k - 1}} t - \hat{n}} \right),~} & {\frac{{\hat{n}}}{{2^{{~k - 1}} }} \le ~t < \frac{{\hat{n}~ + 1}}{{~2^{{~k - 1}} }}} \\ {0,} & {Otherwise,} \\ \end{array} } \right.$$

with

$$\mathop {b_{m} }\limits^{\sim } \left( t \right) = \left\{ {\begin{array}{*{20}l} {1,} & {m = 0,} \\ {\frac{1}{{\sqrt {\frac{{\left( { - 1} \right)^{{m - 1}} \left( {m!} \right)^{2} }}{{\left( {2m} \right)!}}a_{{2m}} } }}b_{m} \left( t \right),} & {m > 0,} \\ \end{array} } \right.$$

where \(m=\text{0,1},2,\dots ,M-1, n=\text{1,2},\dots , {2}^{k-1}\). The coefficient \(\frac{1}{\sqrt{\frac{{\left(-1\right)}^{m-1}{\left(m!\right)}^{2}}{\left(2 m\right)!}{a}_{2 m}}}\) is for normality, the dilation parameter is \(p={2}^{-(k-1)}\) and the translation parameter \(q=\widehat{n}{2}^{-(k-1)}\). Here, \({b}_{m}\left(t\right)\) are the well-known Bernoulli polynomials of order \(m\) which can be defined by;

$${b}_{m}\left(t\right)=\sum\limits_{i=0}^{m}\left(\begin{subarray}{c}{m}\\{i}\end{subarray}\right){a}_{m-i}{t}^{i},$$

where \({a}_{i}, i=\text{0,1},\dots ,m\) are Bernoulli numbers. Now, we fairly accurate the function \(y\left(x\right)\) under Bernoulli wavelet space as follows:

$$y\left(x\right)=\sum\limits_{n=1}^{\infty }\sum\limits_{m=0}^{\infty }{C}_{n,m}{\phi }_{n,m}\left(x\right),$$
(2.1)

where \({\phi }_{n,m}\left(x\right)\) is the Bernoulli wavelet. We approximate \(y\left(x\right)\) by truncating the series as follows;

$$y\left(x\right)\approx \sum\limits_{n=1}^{{2}^{k-1}}\sum\limits_{m=0}^{M-1}{C}_{n,m}{\phi }_{n,m}\left(x\right)={A}^{T}\phi \left(x\right),$$
(2.2)

where \(A\) and \(\phi \left(x\right)\) are \({2}^{k-1}M\times 1\) matrix,

$${A}^{T}=[{C}_{\text{1,0}},\dots ,{C}_{1,M-1},{C}_{\text{2,0}},\dots ,{C}_{2,M-1},\dots ,{C}_{{2}^{k-1},0},\dots {C}_{{2}^{k-1},M-1}],$$
$$\phi (x)=[{\phi }_{\text{1,0}},\dots ,{\phi }_{1,M-1},{\phi }_{\text{2,0}},\dots {\phi }_{2,M-1},\dots {\phi }_{{2}^{k-1},0},\dots {\phi }_{{2}^{k-1},M-1}{]}^{T}.$$

Let \(\left\{{\phi }_{i,j}\right\}\) be the sequence of Bernoulli wavelets, \(m = 0, 1, \dots , M-1\), and \(n=1, 2, \dots ,{2}^{k-1}\). For every fixed \(n\), there is a Bernoulli space spanned by the elements of the sequence \(\left\{{\phi }_{i,j}\right\}\). That is, \(L\left(\left\{{\phi }_{i,j}\right\}\right)={L}^{2}\left[\text{0,1}\right)\) is Banach space.

Integration Operational Matrix

Here, we simplified some basis of the Bernoulli wavelets at \(k=1\) as follows:

$${\phi }_{\text{1,0}}\left(t\right)=1,$$
$${\phi }_{\text{1,1}}\left(t\right)=\sqrt{3}\left(-1+2t\right),$$
$${\phi }_{\text{1,2}}\left(t\right)=\sqrt{5}\left(1-6t+6{t}^{2}\right),$$
$${\phi }_{\text{1,3}}\left(t\right)=\sqrt{210}\left(t-3{t}^{2}+2{t}^{3}\right),$$
$${\phi }_{\text{1,4}}\left(t\right)=10\sqrt{21}\left(-\frac{1}{30}+{t}^{2}-2{t}^{3}+{t}^{4}\right),$$
$${\phi }_{\text{1,5}}\left(t\right)=\sqrt{\frac{462}{5}}\left(-t+10{t}^{3}-15{t}^{4}+6{t}^{5}\right),$$
$${\phi }_{\text{1,6}}\left(t\right)=\sqrt{\frac{1430}{691}}\left(1-21{t}^{2}+105{t}^{4}-126{t}^{5}+42{t}^{6}\right),$$
$${\phi }_{\text{1,7}}\left(t\right)=2\sqrt{\frac{143}{7}}\left(t-7{t}^{3}+21{t}^{5}-21{t}^{6}+6{t}^{7}\right),$$
$${\phi }_{\text{1,8}}\left(t\right)=\sqrt{\frac{7293}{3617}}\left(-1+20{t}^{2}-70{t}^{4}+140{t}^{6}-120{t}^{7}+30{t}^{8}\right),$$
$${\phi }_{\text{1,9}}\left(t\right)=\sqrt{\frac{1,939,938}{219,335}}\left(-3t+20{t}^{3}-42{t}^{5}+60{t}^{7}-45{t}^{8}+10{t}^{9}\right),$$
$${\phi }_{\text{1,10}}\left(t\right)=22\sqrt{\frac{125,970}{174,611}}\left(\frac{5}{66}-\frac{3{t}^{2}}{2}+5{t}^{4}-7{t}^{6}+\frac{15{t}^{8}}{2}-5{t}^{9}+{t}^{10}\right),$$
$${\phi }_{\text{1,11}}\left(t\right)=2\sqrt{\frac{676,039}{854,513}}\left(5t-33{t}^{3}+66{t}^{5}-66{t}^{7}+55{t}^{9}-33{t}^{10}+6{t}^{11}\right),$$

where

$${\phi }_{10}\left(t\right)={[{\phi }_{\text{1,0}}\left(t\right),{\phi }_{\text{1,1}}\left(t\right),{\phi }_{\text{1,2}}\left(t\right),{\phi }_{\text{1,3}}\left(t\right),{\phi }_{\text{1,4}}\left(t\right),{\phi }_{\text{1,5}}\left(t\right),{\phi }_{\text{1,6}}\left(t\right),{\phi }_{\text{1,7}}\left(t\right),{\phi }_{\text{1,8}}\left(t\right),{\phi }_{\text{1,9}}\left(t\right)]}^{T}.$$

Now integrate the above first ten basis concerning \(t\) limit from \(0\) to \(t\), then express as a linear combination of Bernoulli wavelet basis as;

$$\int\limits_{0}^{t}{\phi }_{1, 0}\left(t \right)dt=\left[\begin{array}{cccccccccc}\frac{1}{2}& \frac{1}{2\sqrt{3}}& 0& 0& 0& 0& 0& 0& 0& 0\end{array}\right]{\phi }_{10}\left(t\right),$$
$$\int\limits_{0}^{t}{\phi }_{\text{1,1}}\left(t\right)dt=\left[\begin{array}{cccccccccc}-\frac{1}{2\sqrt{3}}& 0& \frac{1}{2\sqrt{15}}& 0& 0& 0& 0& 0& 0& 0\end{array}\right]{\phi }_{10}\left(t\right),$$
$$\int\limits_{0}^{t}{\phi }_{\text{1,2}}\left(t\right)dt=\left[\begin{array}{cccccccccc}0& 0& 0& \frac{1}{\sqrt{42}}& 0& 0& 0& 0& 0& 0\end{array}\right]{\phi }_{10}\left(t\right),$$
$$\int\limits_{0}^{t}{\phi }_{\text{1,3}}\left(t\right)dt=\left[\begin{array}{cccccccccc}\frac{\sqrt{7}}{2\sqrt{30}}& 0& 0& 0& \frac{1}{2\sqrt{10}}& 0& 0& 0& 0& 0\end{array}\right]{\phi }_{10}\left(t\right),$$
$$\int\limits_{0}^{t}{\phi }_{\text{1,4}}\left(t\right)dt=\left[\begin{array}{cccccccccc}0& 0& 0& 0& 0& \frac{\sqrt{5}}{3\sqrt{22}}& 0& 0& 0& 0\end{array}\right]{\phi }_{10}\left(t\right),$$
$$\int\limits_{0}^{t}{\phi }_{\text{1,5}}\left(t\right)dt=\left[\begin{array}{cccccccccc}-\sqrt{\frac{11}{210}}& 0& 0& 0& 0& 0& \frac{\sqrt{691}}{10\sqrt{273}}& 0& 0& 0\end{array}\right]{\phi }_{10}\left(t\right),$$
$$\int\limits_{0}^{t}{\phi }_{\text{1,6}}\left(t\right)dt=\left[\begin{array}{cccccccccc}0& 0& 0& 0& 0& 0& 0& \sqrt{\frac{35}{1382}}& 0& 0\end{array}\right]{\phi }_{10}\left(t\right),$$
$$\int\limits_{0}^{t}{\phi }_{\text{1,7}}\left(t\right)dt=\left[\begin{array}{cccccccccc}\frac{\sqrt{143}}{20\sqrt{7}}& 0& 0& 0& 0& 0& 0& 0& \frac{\sqrt{3617}}{20\sqrt{357}}& 0\end{array}\right]{\phi }_{10}\left(t\right),$$
$$\int\limits_{0}^{t}{\phi }_{\text{1,8}}\left(t\right)dt=\left[\begin{array}{cccccccccc}0& 0& 0& 0& 0& 0& 0& 0& 0& \frac{\sqrt{219,335}}{3\sqrt{962,122}}\end{array}\right]{\phi }_{10}\left(t\right),$$
$$\int\limits_{0}^{t}{\phi }_{\text{1,9}}\left(t\right)dt=\left[\begin{array}{cccccccccc}-\sqrt{\frac{146,965}{2,895,222}}& 0& 0& 0& 0& 0& 0& 0& 0& 0\end{array}\right]{\phi }_{10}\left(t\right)+\frac{\sqrt{1,222,277}}{10\sqrt{482,537}}{\phi }_{\text{1,10}}\left(t\right).$$

Hence

$$\int\limits_{0}^{t}\phi \left(t\right)dt={B}_{10\times 10}{\phi }_{10}\left(t\right)+\stackrel{-}{{\phi }_{10}\left(t\right)},$$

where

$${B}_{10\times 10}=\left[\begin{array}{cccccccccc}\frac{1}{2}& \frac{1}{2\sqrt{3}}& 0& 0& 0& 0& 0& 0& 0& 0\\ -\frac{1}{2\sqrt{3}}& 0& \frac{1}{2\sqrt{15}}& 0& 0& 0& 0& 0& 0& 0\\ 0& 0& 0& \frac{1}{\sqrt{42}}& 0& 0& 0& 0& 0& 0\\ \frac{\sqrt{7}}{2\sqrt{30}}& 0& 0& 0& \frac{1}{2\sqrt{10}}& 0& 0& 0& 0& 0\\ 0& 0& 0& 0& 0& \frac{\sqrt{5}}{3\sqrt{22}}& 0& 0& 0& 0\\ -\sqrt{\frac{11}{210}}& 0& 0& 0& 0& 0& \frac{\sqrt{691}}{10\sqrt{273}}& 0& 0& 0\\ 0& 0& 0& 0& 0& 0& 0& \sqrt{\frac{35}{1382}}& 0& 0\\ \frac{\sqrt{143}}{20\sqrt{7}}& 0& 0& 0& 0& 0& 0& 0& \frac{\sqrt{3617}}{20\sqrt{357}}& 0\\ 0& 0& 0& 0& 0& 0& 0& 0& 0& \frac{\sqrt{219,335}}{3\sqrt{962,122}}\\ -\sqrt{\frac{146,965}{2,895,222}}& 0& 0& 0& 0& 0& 0& 0& 0& 0\end{array}\right],$$
$$\stackrel{-}{{\phi }_{10}\left(t\right)}=\left[\begin{array}{c}\begin{array}{c}0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ \frac{\sqrt{1,222,277}}{10\sqrt{482,537}}{\phi }_{\text{1,10}}\left(t\right)\end{array}\end{array}\right]$$

Next, twice integration of the above ten basis is given below;

$$\int\limits_{0}^{t}\int\limits_{0}^{t}{\phi }_{\text{1,0}}\left(t\right)dtdt=\left[\begin{array}{cccccccccc}\frac{1}{6}& \frac{1}{4\sqrt{3}}& \frac{1}{12\sqrt{5}}& 0& 0& 0& 0& 0& 0& 0\end{array}\right]{\phi }_{10}\left(t\right),$$
$$\int\limits_{0}^{t}\int\limits_{0}^{t}{\phi }_{\text{1,1}}\left(t\right)dtdt=\left[\begin{array}{cccccccccc}-\frac{1}{4\sqrt{3}}& -\frac{1}{12}& 0& \frac{1}{6\sqrt{70}}& 0& 0& 0& 0& 0& 0\end{array}\right]{\phi }_{10}\left(t\right),$$
$$\int\limits_{0}^{t}\int\limits_{0}^{t}{\phi }_{\text{1,2}}\left(t\right)dtdt=\left[\begin{array}{cccccccccc}\frac{1}{12\sqrt{5}}& 0& 0& 0& \frac{1}{4\sqrt{105}}& 0& 0& 0& 0& 0\end{array}\right]{\phi }_{10}\left(t\right),$$
$$\int\limits_{0}^{t}\int\limits_{0}^{t}{\phi }_{\text{1,3}}\left(t\right)dtdt=\left[\begin{array}{cccccccccc}\frac{\sqrt{7}}{4\sqrt{30}}& \frac{\sqrt{7}}{12\sqrt{10}}& 0& 0& 0& \frac{1}{12\sqrt{11}}& 0& 0& 0& 0\end{array}\right]{\phi }_{10}\left(t\right),$$
$$\int\limits_{0}^{t}\int\limits_{0}^{t}{\phi }_{\text{1,4}}\left(t\right)dtdt=\left[\begin{array}{cccccccccc}-\frac{1}{6\sqrt{21}}& 0& 0& 0& 0& 0& \frac{\sqrt{691}}{6\sqrt{30,030}}& 0& 0& 0\end{array}\right]{\phi }_{10}\left(t\right),$$
$$\int\limits_{0}^{t}\int\limits_{0}^{t}{\phi }_{\text{1,5}}\left(t\right)dtdt=\left[\begin{array}{cccccccccc}-\frac{\sqrt{11}}{2\sqrt{210}}& -\frac{\sqrt{11}}{6\sqrt{70}}& 0& 0& 0& 0& 0& \frac{1}{2\sqrt{390}}& 0& 0\end{array}\right]{\phi }_{10}\left(t\right),$$
$$\int\limits_{0}^{t}\int\limits_{0}^{t}{\phi }_{\text{1,6}}\left(t\right)dtdt=\left[\begin{array}{cccccccccc}\frac{\sqrt{143}}{4\sqrt{6910}}& 0& 0& 0& 0& 0& 0& 0& \frac{\sqrt{3617}}{4\sqrt{352,410}}& 0\end{array}\right]{\phi }_{10}\left(t\right),$$
$$\int\limits_{0}^{t}\int\limits_{0}^{t}{\phi }_{\text{1,7}}\left(t\right)dtdt=\left[\begin{array}{cccccccccc}\frac{\sqrt{143}}{40\sqrt{7}}& \frac{\sqrt{143}}{40\sqrt{21}}& 0& 0& 0& 0& 0& 0& 0& \frac{\sqrt{43,867}}{84\sqrt{9690}}\end{array}\right]{\phi }_{10}\left(t\right),$$
$$\int\limits_{0}^{t}\int\limits_{0}^{t}{\phi }_{\text{1,8}}\left(t\right)dtdt=\left[\begin{array}{cccccccccc}-\frac{5\sqrt{221}}{6\sqrt{119,361}}& 0& 0& 0& 0& 0& 0& 0& 0& 0\end{array}\right]{\phi }_{10}\left(t\right)+\frac{\sqrt{174,611}}{6\sqrt{7,559,530}}{\phi }_{\text{1,10}}\left(t\right),$$
$$\int\limits_{0}^{t}\int\limits_{0}^{t}{\phi }_{\text{1,9}}\left(t\right)dtdt=\left[\begin{array}{cccccccccc}-\frac{\sqrt{146,965}}{2\sqrt{2,895,222}}& -\frac{\sqrt{146,965}}{6\sqrt{965,074}}& 0& 0& 0& 0& 0& 0& 0& 0\end{array}\right]{\phi }_{10}\left(t\right)+\frac{\sqrt{77,683}}{2\sqrt{30,268,230}}{\phi }_{\text{1,11}}\left(t\right).$$

Hence,

$$\int\limits_{0}^{t}\int\limits_{0}^{t}\phi \left(t\right)dtdt={B}_{10\times 10}^{{\prime }}{\phi }_{10}\left(t\right)+{\stackrel{-}{{\phi }_{10}\left(t\right)}}^{{\prime }},$$

where

$${B}_{10\times 10}^{{\prime }}=\left[\begin{array}{cccccccccc}\frac{1}{6}& \frac{1}{4\sqrt{3}}& \frac{1}{12\sqrt{5}}& 0& 0& 0& 0& 0& 0& 0\\ -\frac{1}{4\sqrt{3}}& -\frac{1}{12}& 0& \frac{1}{6\sqrt{70}}& 0& 0& 0& 0& 0& 0\\ \frac{1}{12\sqrt{5}}& 0& 0& 0& \frac{1}{4\sqrt{105}}& 0& 0& 0& 0& 0\\ \frac{\sqrt{7}}{4\sqrt{30}}& \frac{\sqrt{7}}{12\sqrt{10}}& 0& 0& 0& \frac{1}{12\sqrt{11}}& 0& 0& 0& 0\\ -\frac{1}{6\sqrt{21}}& 0& 0& 0& 0& 0& \frac{\sqrt{691}}{6\sqrt{30,030}}& 0& 0& 0\\ -\frac{\sqrt{11}}{2\sqrt{210}}& -\frac{\sqrt{11}}{6\sqrt{70}}& 0& 0& 0& 0& 0& \frac{1}{2\sqrt{390}}& 0& 0\\ \frac{\sqrt{143}}{4\sqrt{6910}}& 0& 0& 0& 0& 0& 0& 0& \frac{\sqrt{3617}}{4\sqrt{352,410}}& 0\\ \frac{\sqrt{143}}{40\sqrt{7}}& \frac{\sqrt{143}}{40\sqrt{21}}& 0& 0& 0& 0& 0& 0& 0& \frac{\sqrt{43,867}}{84\sqrt{9690}}\\ -\frac{5\sqrt{221}}{6\sqrt{119,361}}& 0& 0& 0& 0& 0& 0& 0& 0& 0\\ -\frac{\sqrt{146,965}}{2\sqrt{2,895,222}}& -\frac{\sqrt{146,965}}{6\sqrt{965,074}}& 0& 0& 0& 0& 0& 0& 0& 0\end{array}\right],$$
$${\stackrel{-}{{\phi }_{10}\left(t\right)}}^{{\prime }}=\left[\begin{array}{c}\begin{array}{c}0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ \frac{\sqrt{174,611}}{6\sqrt{7,559,530}}{\phi }_{\text{1,10}}\left(t\right)\\ \frac{\sqrt{77,683}}{2\sqrt{30,268,230}}{\phi }_{\text{1,11}}\left(t\right)\end{array}\end{array}\right]$$

In the same way, we can generate matrices of different sizes for our handiness.

Some Theorems on Convergence Analysis and the Bernoulli Wavelet

The Space of Functions L2 (\({\mathbb{R}}\)): The set of all functions f  for which \(\left| {f\left( x \right)} \right|^{2}\) is integrable on the region \({\mathbb{R}}\).

Continuous Functions in L2 (\({\mathbb{R}}\)): Let \(\theta \left( {x,t} \right) \in L_{2} \left({\mathbb{R}} \right)\) with \(t \in \left[ {a,b} \right]\). Then \(\theta (x,t )\) is continuous in \(L_{2} \left({\mathbb{R}} \right)\)  in the variable t on [a, b] if \(\theta \left( {x~,t^{\prime } } \right) \to \theta \left( {~x,t} \right)\) in \(L_{2} \left({\mathbb{R}} \right)\) whenever \(t^{\prime} \to t\quad \forall ~t \in \left[ {a,b} \right]\).  

The above definition says that if the function \(\theta (x,t )\) is continuous in \(t\) on \([a,b]\), then the \(\left\| {\theta \left(x,t\right)} \right\|\) is continuous in \(t\) on \([a,b]\).

Riesz Fischer Theorem: If a sequence of functions \(\left\{ {f_{k} } \right\}_{{k = 1}}^{\infty }\) in \(L_{2} \left({\mathbb{R}} \right)\) converges itself in \(L_{2} \left({\mathbb{R}} \right)\) then there is a function \(f \in L_{2} \left( {{\mathbb{R}}} \right)\) such that \(\left\| {f_{k} - f} \right\| \to 0\) as \(k \to 0\)

Theorem 1

Let \(\theta \left( {x,t} \right)\) in \(L^{2} \left( {{\mathbb{R}} \times ~{\mathbb{R}}} \right)\) be a continuous bounded function defined on \(\left[ {0,1} \right)~ \times \left[ {0,1} \right)\), then Bernoulli wavelet expansion of \(\theta \left( {x,t} \right)\) is uniformly converges to it.

Proof

Let \(\theta \left( {x,t} \right)\) in \(L^{2} \left( {{\mathbb{R}} \times {\mathbb{R}}} \right)\) be a continuous function defined on \(\left[ {0,1} \right)~ \times \left[ {0,1} \right)\) and bounded by a real number \(\mu\). The approximation of \(\theta \left( {~x,t} \right)\) is;

$$\theta \left(x ,t\right)=\sum _{ i=1}^{\infty }\sum _{j=0}^{ \infty }{c}_{i,j}{\phi }_{i,j}\left( x\right) {\phi }_{i,j}\left( t\right),$$

where \({c}_{i, j}= \left\langle {\theta \left(x,t \right),{\phi }_{i,j}\left( x\right){\phi }_{i,j}\left( t\right)} \right\rangle\), and \(\left\langle {,} \right\rangle\) represents inner product. Since \({\theta }_{i,j} \left(x\right){ \theta }_{i,j}\left(t\right)\) are orthogonal functions on \(\left[\text{0,1}\right)\). Then,

$${c}_{i,j} = \int\limits_{0}^{1} \int\limits_{0}^{1}\theta \left( x, t\right){\phi }_{i,j} \left(x\right){\phi }_{i,j}\left(t\right)dxdt,$$
$${c}_{i, j}=\int\limits_{0}^{1 }\int\limits_{I}\theta \left( x,t\right)\frac{{2}^{\left(\frac{k-1}{2}\right)}}{\sqrt{\frac{{(- 1)}^{m-1}{(m !)}^{2}{\alpha }_{2 m}}{\left(2 m\right)!}}}{b}_{m}({2}^{k-1}x-n+1){\phi }_{i,j}\left(t\right)dxdt,$$
$$\text{where} \, I=\left[\frac{n-1}{{2}^{k-1}},\frac{n}{{2}^{k-1}}\right], \text{Put} \, {2}^{k-1}x-n+1=r \, \text{then},$$
$${c}_{i,j }=\frac{{2}^{\left(\frac{k-1}{2}\right)}}{\sqrt{\frac{{(- 1)}^{m-1}{(m!)}^{2}{\alpha }_{2 m}}{\left(2 m\right)!}}}\int\limits_{0}^{1}\int\limits_{0}^{1}\theta \left(\frac{r-1 +n}{{2 }^{k-1}},t\right){b}_{m}\left(r\right)\frac{dr}{{2 }^{k-1}}{\phi }_{i,j}\left( t\right)dt,$$
$${c}_{i,j}=\frac{{2}^{- \left(\frac{k-1}{2}\right)}}{\sqrt{\frac{{(- 1)}^{m-1}{(m !)}^{2}{\alpha }_{2 m}}{\left(2 m\right)!}}}\int\limits_{0}^{1}\left[\int\limits_{0}^{1}\theta \left(\frac{r -1+n}{{2}^{k-1}}, t\right){b}_{m}\left(r\right)dr\right]{\phi }_{i,j}\left( t\right)dt.$$

By generalized mean value theorem for integrals,

$${c}_{i,j}=\frac{{2}^{- \left(\frac{k-1}{2}\right)}}{\sqrt{\frac{{(-1)}^{m-1}{(m!)}^{2}{\alpha }_{2 m}}{\left(2 m\right)!}}}\int\limits_{0}^{1}\theta \left(\frac{ \xi -1+n}{{2}^{k-1}} ,t\right){\phi }_{i,j}\left( t\right)dt\left[\int\limits_{0}^{1}{b}_{m}\left( r\right)dr\right],$$

where \( \xi \in \left( 0,1 \right)\) and choose \(\int\limits_{0}^{1}{b}_{m}\left(r\right)dr=A,\)

$${c}_{i,j}=\frac{A{2}^{- \left(\frac{k-1}{2}\right)}}{\sqrt{\frac{{(-1)}^{m-1}{(m!)}^{2}{\alpha }_{2 m}}{\left(2 m\right)!}}} \int\limits_{\frac{n-1}{{2}^{k-1}}}^{\frac{n}{{2}^{k-1}}}\theta \left(\frac{\xi -1+n}{{2}^{k-1}},t\right)\frac{{2}^{\left(\frac{k-1}{2}\right)}}{\sqrt{\frac{{(-1)}^{m-1}{(m!)}^{2}{\alpha }_{2 m}}{\left(2 m\right)!}}}{b}_{m}({2}^{k-1}t-n+1)dt,$$
$${c}_{i,j}=\frac{A}{\left(\frac{{(-1)}^{m-1}{(m!)}^{2}{\alpha }_{2 m}}{\left(2 m\right)!}\right)} \int\limits_{\frac{n-1}{{2}^{k-1}}}^{\frac{n}{{2}^{k-1}}}\theta \left(\frac{\xi -1 +n}{{2}^{k- 1}},t\right){b}_{m}\left({2 }^{k-1}t-n+ 1\right)dt.$$

Put \({2}^{k-1}t-n+1=s\) then,

$${c}_{i,j}=\frac{ A}{\left(\frac{{(- 1)}^{m-1}{(m !)}^{2}{\alpha }_{2 m}}{\left(2 m\right)!}\right)} \int\limits_{0}^{1}\theta \left(\frac{\xi -1+n}{{2}^{k-1}},\frac{s-1+n}{{2}^{k-1}}\right){b}_{m}\left(s\right)\frac{ds}{{2}^{k-1}} ,$$
$${c}_{i,j}=\frac{A{2}^{-k+1}}{\left(\frac{{( -1)}^{m-1}{(m !)}^{2}{\alpha }_{2 m}}{\left(2 m \right)!}\right)} \int\limits_{0}^{1}\theta \left(\frac{\xi -1 +n}{{2 }^{k-1}},\frac{s- 1+n}{{2 }^{k-1}}\right){b}_{m}\left(s\right)ds,$$

By generalized mean value theorem for integrals,

$${c}_{i,j}=\frac{A{2}^{-k+1}}{\left(\frac{{(-1)}^{m-1}{(m!)}^{2}{\alpha }_{2 m}}{\left(2 m\right)!}\right)} \theta \left(\frac{\xi -1+n}{{2}^{k-1}},\frac{{\xi }_{1}-1+n}{{2}^{k-1}}\right)\int\limits_{0}^{1}{b}_{m}\left(s\right)ds,$$

where \({\xi }_{1}\in \left(\text{0,1}\right) \,\, \text{and} \, \int\limits_{0}^{1}{b}_{m}\left(s\right)ds=B \, \text{then},\)

$${c}_{i,j}=\frac{AB{2}^{-k+1}}{\left(\frac{{(-1)}^{m-1}{(m!)}^{2}{\alpha }_{2 m}}{\left(2 m\right)!}\right)} \theta \left(\frac{\xi -1+n}{{2}^{k-1}},\frac{{\xi }_{1}-1+n}{{2}^{k-1}}\right), \forall \xi ,{\xi }_{1}\in \left(\text{0,1}\right),$$

Therefore,

$$\left|{c}_{i,j}\right|=\left|\frac{AB{2}^{-k+1}}{\left(\frac{{(- 1)}^{m-1}{(m !)}^{2}{\alpha }_{2 m}}{\left(2 m \right)!}\right)}\right|\left|\theta \left(\frac{\xi -1 +n}{{2}^{k-1}},\frac{{\xi }_{1}-1 +n}{{2}^{k-1}}\right)\right|,$$

Since \(\theta\) is bounded by \(\mu\),

$$\left|{c}_{i,j}\right|=\frac{\left|A\right|\left|B\right|\left|{2}^{-k+1}\right|\mu }{\left|\frac{{(-1)}^{m-1}{(m!)}^{2}{\alpha }_{2 m}}{\left(2 m\right)!}\right|} .$$

Therefore \(\sum _{i=1}^{\infty }\sum _{j=0}^{\infty }{c}_{i,j}\) is convergent. Hence the Bernoulli wavelet expansion of \(\theta (x,t)\) converges uniformly.

Theorem 2

Let the Bernoulli wavelet sequence \(\left\{ {\phi _{{n,m}}^{k} \left( {x,t} \right)} \right\}_{{k = 1}}^{\infty }\) which are continuous functions defined in \(L^{2} \left({\mathbb{R}} \right)\) in t on [a, b] converges to the function \(\theta \left( {x,t} \right)\) in \(L^{2} \left({\mathbb{R}} \right)\) uniformly in t on [a, b]. Then \(\theta \left( {x,t} \right)\) is continuous in \(L^{2} \left({\mathbb{R}} \right)\) in t on [a, b].

Proof

Since the Bernoulli wavelet sequence \(\left\{ {\phi _{{n,m}}^{k} \left( {x,t} \right)} \right\}_{{k = 1}}^{\infty }\) is uniformly converges to \(\theta \left( {x,t} \right)\) in \(L^{2} \left({\mathbb{R}} \right)\). Therefore, for every \(\varepsilon > 0\), there exists a number \(k = k_{\varepsilon }\) such that,

$$\left\| {{\phi }_{n,m}^{k}\left(x,t\right)-\theta \left(x,t\right)} \right\| <\frac{\epsilon }{3} , \forall t\in \left[a,b\right],$$
(3.1)

Also, \(\left\{{\phi }_{n,m}^{k}\left(x,t\right)\right\}\) is continuous in \({L}_{2}\left(\mathbb{R}\right)\) in \(t\in \left[a,b\right]\). Then there exists a number \(\delta ={\delta }_{\epsilon }\) such that,

$$\left\| {{\phi }_{n,m}^{k}\left(x,{t}^{{\prime }}\right)-{\phi }_{n,m}^{k}\left(x,t\right)} \right\| <\frac{\epsilon }{3} ,\mathrm{whenever}\;\left\| {{t}^{{\prime }}-t} \right\| <\delta \forall {t}^{{\prime }},t\in \left[a,b\right],$$
(3.2)
$$\left\| {\theta (x,t{\prime } )-\theta (x,t)} \right\| = \left\| {\theta \left(x ,{t}^{{\prime }}\right)-{\phi }_{n,m}^{k}\left(x ,{t}^{{\prime }}\right)+{\phi }_{n,m}^{k}\left(x ,{t}^{{\prime }}\right)-{\phi }_{n,m}^{k}\left(x,t\right)+{\phi }_{n,m}^{k}\left(x ,t\right)-\theta (x,t)} \right\|,$$
$$\le \left\| {\theta \left(x,{t}^{{\prime }}\right)-{\phi }_{n,m}^{k}\left(x,{t }^{{\prime }}\right)} \right\| + \left\| {{\phi }_{n,m}^{k}\left( x,{t}^{{\prime }}\right)-{\phi }_{n,m}^{k}\left(x,t\right)} \right\| + \left\| {{\phi }_{n,m}^{k}\left( x,t\right)-\theta ( x,t)} \right\|,$$
$$<\frac{\epsilon }{3}+\frac{\epsilon }{3}+\frac{\epsilon }{3}=\epsilon,$$

\(\left\| {\theta (x,t{\prime } )-\theta (x,t)} \right\| <\epsilon\) for all \(\left\| {t-t{\prime }} \right\| <\delta\) with \(t,{t}^{{\prime }}\in \left[a,b\right]\). Hence \(\theta (x,t)\) is continuous in \({L}^{2}\left(\mathbb{R}\right)\) in \(t\) on \(\left[a,b\right]\).

Theorem 3

Let the Bernoulli wavelet sequence \(\left\{ {\phi _{{n,m}}^{k} \left( {x,t} \right)} \right\}_{{k = 1}}^{\infty }\) converges itself in \(L_{2} \left({\mathbb{R}} \right)\) uniformly in t on [a, b]. Then there is a function \(\theta \left( {x,t} \right)\) is continuous in \(L_{2} \left({\mathbb{R}} \right)\) in t on [a, b] and \(\mathop {\lim }\limits_{{k \to \infty }} \phi _{{n,m}}^{k} \left( {x,t} \right) = \phi _{{n,m}} \left( {x,t} \right)~~~\forall ~t \in \left[ {a,b} \right]\).

Proof

By Riesz Fischer theorem, for each \(t \in \left[ {a,b} \right]\) there is a function \(\theta \left( {x,t} \right)\) in \(L^{2} \left({\mathbb{R}} \right)\) such that

$$\lim\limits_{k\to \infty }{\phi }_{n,m}^{k}\left(x ,t\right)=\theta \left(x ,t\right),$$
(3.3)

Consider the subsequence \({\left\{{\phi }_{n,m}^{{k}_{i}}\left(x,t\right)\right\}}_{i=1}^{\infty }\) such that,

$$\left\| {{\phi }_{n,m}^{{k}_{i+1}}(x ,t)-{\phi }_{n,m}^{{k}_{i}}(x ,t)} \right\| <\frac{1}{{2}^{i}} , \forall t \in \left[a,b\right],$$
(3.4)

from Eq. (3.3)

$$\theta \left(x,t\right)=\lim\limits_{p\to \infty }{\phi }_{n,m}^{{k}_{p}}={\phi }_{n,m}^{{k}_{i}}+\left({\phi }_{n,m}^{{k}_{i+1}}-{\phi }_{n,m}^{{k}_{i}}\right)+\left({\phi }_{n,m}^{{k}_{i+2}}-{\phi }_{n,m}^{{k}_{i+1}}\right)+,\dots ,$$

from Eq. (3.4)

$$\left\| {{\theta \left(x,t\right)-\phi }_{n,m}^{{k}_{i}}} \right\| \le \left\| {{\phi }_{n,m}^{{k}_{i+1}}-{\phi }_{n,m}^{{k}_{i}}} \right\| + \left\| {{\phi }_{n,m}^{{k}_{i+2}}-{\phi }_{n,m}^{{k}_{i+1}}} \right\| +,\dots ,$$
$$\le \frac{1}{{2}^{i}}+\frac{1}{{2}^{i+1}}+,\dots ,=\frac{1}{{2}^{i-1}} , i=\text{1,2},3,\dots ,$$

This shows that the subsequence \(\left\{{\phi }_{n,m}^{{k}_{i}}\left(x,t\right)\right\}\) converges to \(\theta \left(x,t\right)\) in \({L}^{2}\left(\mathbb{R}\right)\) uniformly in \(t\) on \(\left[a,b\right]\). By theorem 2, the function \(\theta \left(x,t\right)\) is continuous in \({L}_{2}\left(\mathbb{R}\right)\) in \(t\) on \(\left[a,b\right]\).

Bernoulli Wavelet Collocation Method

Consider the nonlinear PDE is of the form:

$$F\left(x,t,\theta ,{\theta }_{t},{\theta }_{tt},{\theta }_{x},{\theta }_{xx},{\theta }_{xxt}\right)=0,$$
(4.1)

where \(x,t\) are independent variables, \(\theta\) is the dependent variable with the following physical conditions.

$$\theta \left(x,0\right)={F}_{1}\left(x\right), \theta \left(0,t\right)={F}_{2}\left(t\right), \theta \left(a,t\right)={F}_{3}\left(t\right),$$
(4.2)

where \(a\) be any constant, \({F}_{1}\left(x\right), {F}_{2}\left(t\right), {F}_{3}\left(t\right)\) are continuous real-valued functions. Assume that,

$$\frac{{\partial }^{3}\theta \left(x,t\right)}{{\partial x}^{2}\partial t}\approx {\theta }^{T}\left(x\right)K\theta \left(t\right),$$
(4.3)

where \({\theta }^{T}\left(x\right)=\left[{\theta }_{\text{1,0}} \left(x\right),\dots ,{\theta }_{1, M-1}\left(x\right),\dots ,{\theta }_{{2}^{k- 1},0}\left(x\right),\dots ,{\theta }_{{2}^{k-1},M- 1}\left(x\right)\right],\)

\(K=\left[{c}_{i,j}\right]\) be \({2}^{k-1}M\times {2}^{k-1}M\) unknown matrix such that \(i=1,\dots ,{2}^{k-1}, j=0,\dots ,M-1\).

$$\theta \left(t\right)={\left[{\theta }_{\text{1,0}}\left(t\right),\dots ,{\theta }_{1,M-1}\left(t\right),\dots ,{\theta }_{{2}^{k-1},0}\left(t\right),\dots ,{\theta }_{{2}^{k-1},M-1}\left(t\right)\right]}^{T},$$

Integrate (4.3) concerning \(t\) from limit 0 to \(t\).

$$\frac{{\partial }^{2}\theta \left(x,t\right)}{{\partial x}^{2}}=\frac{{\partial }^{2}\theta \left(x,0\right)}{{\partial x}^{2}}+{\theta }^{T}\left(x\right)K\left[B\theta \left(t\right)+\stackrel{-}{\theta \left(t\right)}\right],$$
(4.4)

Now integrate (4.4) twice concerning \(x\) from 0 to \(x\).

$$\frac{\partial \theta \left(x,t\right)}{\partial x}=\frac{\partial \theta \left(0, t\right)}{\partial x}+\frac{\partial \theta \left(x,0\right) }{\partial x}-\frac{\partial \theta \left(0 ,0\right)}{\partial x}+{\left[B\theta \left( x\right)+\stackrel{-}{\theta \left( x\right)}\right]}^{T}K\left[B\theta \left(t\right)+\stackrel{-}{\theta \left(t\right)}\right],$$
(4.5)
$$\theta \left( x,t\right)=\theta \left(0,t \right)+\theta \left( x,0\right)-\theta \left(\text{0,0}\right)+x\left[\frac{\partial \theta \left(0,t\right)}{\partial x}-\frac{\partial \theta \left(\text{0,0}\right)}{\partial x}\right]+{[{B}^{{\prime }} \theta \left(x\right)+{\stackrel{-}{\theta \left(x\right)}}^{\varvec{{\prime }}}]}^{T}K[B\theta \left(t\right)+\stackrel{-}{\theta \left(t\right)}],$$
(4.6)

Put \(x=a\) on (4.6) along with the physical conditions given in (4.2). We get,

$${F}_{3}\left(t\right)={F}_{2}\left(t\right)+{F}_{1}\left(a\right)-{F}_{1}\left(0\right)+a\left[\frac{\partial \theta \left(0,t\right)}{\partial x}-\frac{\partial \theta \left(\text{0,0}\right)}{\partial x}\right]+\lim\limits_{x\to a }{[{B}^{{\prime }}\theta \left(x\right)+{\stackrel{-}{\theta \left(x\right)}}^{\varvec{{\prime }}}]}^{T}K[B\theta \left(t\right)+\stackrel{-}{\theta \left(t\right)}]$$
$$\left[\frac{\partial \theta \left(0,t\right)}{\partial x}-\frac{\partial \theta \left(\text{0,0}\right)}{\partial x}\right]=\frac{1}{a}\left[{F}_{3}\left(t\right)-{F}_{2}\left(t\right)-{F}_{1}\left(a\right)+{F}_{1}\left(0\right)-\lim\limits_{x\to a }{\left[{B}^{{\prime }}\theta \left(x\right)+{\stackrel{-}{\theta \left(x\right)}}^{\varvec{{\prime }}}\right]}^{T}K\left[B\theta \left(t\right)+\stackrel{-}{\theta \left(t\right)}\right]\right],$$
(4.7)

Substitute (4.7) in (4.5) and (4.6)

$$\frac{\partial \theta \left(x,t\right)}{\partial x}=\frac{\partial {F}_{1}\left(x\right)}{\partial x}+\frac{1}{a}\left[{F}_{3}\left(t\right)-{F}_{2}\left(t\right)-{F}_{1}\left(a\right)+{F}_{1}\left(0\right)-\lim\limits_{x\to a }{[{B}^{{\prime }}\theta \left(x\right)+{\stackrel{-}{\theta \left(x\right)}}^{\varvec{{\prime }}}]}^{T}K[B\theta \left(t\right)+\stackrel{-}{\theta \left( t\right)}]\right]+{[B\theta \left(x\right)+\stackrel{-}{\theta \left(x\right)}]}^{T}K\left[B\theta \left(t\right)+\stackrel{-}{\theta \left(t\right)}\right],$$
(4.8)
$$\theta \left(x,t\right)={F}_{2}\left(t\right)+{F}_{1}\left(x\right)-{F}_{1}\left(0\right)+{\left[{B}^{{\prime }}\theta \left( x\right)+{\stackrel{-}{\theta \left(x\right)}}^{\varvec{{\prime }}}\right]}^{T}K\left[B\theta \left(t \right)+\stackrel{-}{\theta \left(t\right) }\right]+\frac{x}{a}\left[{F}_{3}\left( t\right)-{F}_{2}\left(t\right)-{F}_{1}\left(a\right)+{F}_{1}\left(0\right)-\lim\limits_{x\to a }{\left[{B}^{{\prime }}\theta \left( x\right)+{\stackrel{-}{\theta \left(x\right)}}^{\varvec{{\prime }}}\right]}^{T}K\left[B\theta \left(t\right)+\stackrel{-}{ \theta \left(t\right)}\right]\right],$$
(4.9)

Now, differentiate \(\theta \left(x,t\right)\) concerning \(t\) twice. We get,

$$\frac{\partial \theta \left(x,t\right)}{\partial t}={{F}_{2}}^{{\prime }}\left(t\right)+\frac{x}{a}\frac{d}{dt}\left[{F}_{3}\left(t\right)-{F}_{2}\left(t\right)-{F}_{1}\left(a\right)+{F}_{1}\left(0\right)-\lim\limits_{x\to a }{[{B}^{{\prime }}\theta \left( x\right)+{\stackrel{-}{\theta \left(x\right)}}^{\varvec{{\prime }}}]}^{T}K[B\theta \left(t\right)+\stackrel{-}{\theta \left(t\right)}]\right]+\frac{d}{dt}\left[{[{B}^{{\prime }}\theta \left(x\right)+{\stackrel{-}{\theta \left(x\right)}}^{\varvec{{\prime }}}]}^{T}K[B\theta \left(t\right)+\stackrel{-}{\theta \left(t\right)}]\right],$$
(4.10)
$$\frac{{\partial }^{2}\theta \left(x,t\right)}{\partial {t}^{2}}={{F}_{2}}^{{\prime }{\prime }}\left(t\right)+\frac{x}{a}\frac{{d}^{2}}{d{t}^{2}}\left[{F}_{3}\left(t\right)-{F}_{2}\left(t\right)-{F}_{1}\left(a\right)+{F}_{1}\left(0\right)-\lim\limits_{x\to a }{[{B}^{{\prime }}\theta \left(x\right)+{\stackrel{-}{\theta \left(x\right)}}^{\varvec{{\prime }}}]}^{T}K[B\theta \left(t\right)+\stackrel{-}{\theta \left(t\right)}]\right]+\frac{{d}^{2}}{d{t}^{2}}\left[{[{B}^{{\prime }} \theta \left(x\right)+{\stackrel{-}{\theta \left(x\right)}}^{\varvec{{\prime }}}]}^{T}K[B\theta \left(t\right)+\stackrel{-}{\theta \left(t\right)}]\right],$$
(4.11)

Now, fit \(\theta ,{\theta }_{t},{\theta }_{tt},{\theta }_{x},{\theta }_{xx}\) and \({\theta }_{xxt}\) in (4.1) and discretize by following discrete points,

$${x }_{i}={t}_{i}=\frac{2i-1}{2{\left[{2 }^{k-1}M\right]}^{2}} , i =\text{1,2},\dots ,{\left[{2}^{k-1}M\right]}^{2}$$

To extract the values of unknown coefficients, we use the Newton-Raphson method. Finally, substitute obtained values of unknown coefficients in (4.9) yield the Bernoulli wavelet numerical solution of the given PDE.

Results and Discussion

Consider the different error norms for measuring errors given by,

\({{L}}^{2} \, {\text {error}} = \sqrt{\sum _{i=1}^{n}{E}_{i}^{2}}\), \({{L}}^{\infty } {\text {error}} = Max\left({E}_{i}\right), 1\le i\le n-1\), \({R}{M}{S} \, {\text {error}} = \sqrt{\sum _{i=1}^{n}\frac{{E}_{i}^{2}}{n}} ,\) where, \({E}_{i}=|{\theta }_{i} \, \left({\text {exact solution}}\right)-{\theta }_{i} \, \left({\text {approximate solution}}\right)|.\) We used Matematica 11.3.0 version in the laptop with HP-i5, 11th generation, RAM: 4GB, SSD:512GB to obtain the required results.

Example 1

Consider the nonlinear Klein-Gordon equation [15];

$$\frac{{\partial }^{2}\theta \left(x,t\right)}{\partial {t}^{2}}-\frac{{\partial }^{2}\theta \left(x,t\right)}{\partial {x}^{2}}+\frac{{\pi }^{2}}{4}\theta \left( x,t\right)+{\theta }^{2}\left(x, t\right)={x}^{2}{sin}^{2}\left(\frac{\pi t}{2}\right), \forall x\in \left(- 1, 1\right), t>0,$$

with the initial condition,

$$\theta \left(x ,0\right)=0,$$

and boundary conditions,

$$\theta \left(- 1,t\right)=-sin\left(\frac{\pi t}{2}\right), \theta \left( 1,t\right)=sin\left(\frac{\pi t}{2}\right).$$

The exact solution is \(\theta \left(x,t\right)=xsin\left(\frac{\pi t}{2}\right)\). The above equation is solved by the Bernoulli wavelet collocation method. Figure 1 shows a graphical representation of the exact solution and the BWCM solution at different values of \(M\), along with its absolute error. Error norms of the proposed method, Tension spline approach of \(O({k}^{2}+{k}^{2}{h}^{2}+{h}^{2})\) method [32] and \(O({k}^{2}+{k}^{2}{h}^{2}+{h}^{4})\) method [32] from the literature are compared in Table 1. Figures 2 and 3 reflect the one-dimensional graphical representation of the present method solution with the exact solution for the different values of \(t\) and \(x\), respectively. The CPU time taken by the Mathematica software is 0.864 s for Table 1.

The BWCM solution at \(M=4\) is given by,

$$\theta \left(x,t\right)=4.8593\times {10}^{-16}{t}^{2}{x}^{2}-1.0299\times {10}^{-16}{t}^{3}{x}^{2}-4.2385\times {10}^{-17}{t}^{4}{x}^{2}-1.0253\times {10}^{-16}{t}^{5}{x}^{2}-1.0299\times {10}^{-16}{t}^{2}{x}^{3}+1.3477\times {10}^{-16}{t}^{3}{x}^{3}+1.6051\times {10}^{-16}{t}^{4}{x}^{3}-3.2724\times {10}^{-17}{t}^{5}{x}^{3}+7.7515\times {10}^{-17}{t}^{2}{x}^{4}-7.7424\times {10}^{-17}{t}^{3}{x}^{4}-3.8893\times {10}^{-17}{t}^{4}{x}^{4}+4.6563\times {10}^{-17}{t}^{5}{x}^{4}-5.1463\times {10}^{-17}{t}^{2}{x}^{5}+1.0629\times {10}^{-16}{t}^{3}{x}^{5}-5.6521\times {10}^{-17}{t}^{4}{x}^{5}+2.0230\times {10}^{-18}{t}^{5}{x}^{5}+xsin\left(\frac{\pi t}{2}\right).$$
Fig. 1
figure 1

Graphical representation of BWCM and Exact solution along with the absolute error, for example, 1

Table 1 Comparison of error norms of the present method and other methods available in the literature, for example, 1
Fig. 2
figure 2

Graphical judgment between the proposed method solution and exact solution at different values of \(t,\) for example, 1

Fig. 3
figure 3

Numerical comparison between the present method and exact solution at different values of \(x,\) for example, 1

Example 2

Consider one more nonlinear Klein-Gordon equation [11];

$$\frac{{\partial }^{2}\theta \left(x,t\right)}{\partial {t}^{2}}-\frac{{\partial }^{2}\theta \left(x,t\right)}{\partial {x}^{2}}+{\theta }^{2}\left(x,t\right)=-xcos\left(t\right)+{x}^{2}{cos}^{2}\left(t\right), \forall x\in \left(-1, 1\right), t>0,$$

with the following conditions,

$$\theta \left(x ,0\right)=x,$$
$$\theta \left(- 1,t\right)=-cos\left(t\right), \theta \left(1,t\right)=cos\left(t\right).$$

The exact solution is given by \(\theta \left(x,t\right)=xcos\left(t\right)\). Figure 4 compares the time-space graph of BWCM with the exact solution and its absolute error at different values of \(M\). Error norms of the proposed method, Tension spline approach of \(O({k}^{2}+{k}^{2}{h}^{2}+{h}^{2})\) method [32], \(O({k}^{2}+{k}^{2}{h}^{2}+{h}^{4})\) method [32] and Thin plate splines (TPS) radial basis function (RBF) approximation [35] from the literature are compared in Table 2. A graphical comparison between the projected method solution and the exact solution with different values of \(t\) and \(x\) is illustrated in Figs. 5 and 6, respectively. The CPU time taken by the Mathematica software is 0.912 s for Table 2.

The BWCM solution at \(M=4\) is given by,

$$\theta \left(x,t\right)=4.7233\times {10}^{-16}{t}^{2}{x}^{2}-2.1237\times {10}^{-18}{t}^{3}{x}^{2}-3.2091\times {10}^{-17}{t}^{4}{x}^{2}-2.1016\times {10}^{-17}{t}^{5}{x}^{2}-2.1237\times {10}^{-18}{t}^{2}{x}^{3}+1.1158\times {10}^{-16}{t}^{3}{x}^{3}-6.0894\times {10}^{-17}{t}^{4}{x}^{3}+4.7427\times {10}^{-17}{t}^{5}{x}^{3}-3.2091\times {10}^{-17}{t}^{2}{x}^{4}+1.0310\times {10}^{-16}{t}^{3}{x}^{4}-9.0474\times {10}^{-17}{t}^{4}{x}^{4}+2.3353\times {10}^{-17}{t}^{5}{x}^{4}-2.3200\times {10}^{-17}{t}^{2}{x}^{5}+4.6819\times {10}^{-17}{t}^{3}{x}^{5}-2.3828\times {10}^{-17}{t}^{4}{x}^{5}+2.5126\times {10}^{-19}{t}^{5}{x}^{5}+x\text{c}\text{o}\text{s}\left(t\right).$$
Fig. 4
figure 4

Graphical representation of BWCM and Exact solution with an absolute error, for example, 2

Table 2 Comparison of error norms of the present method and other methods available in the literature, for example, 2
Fig. 5
figure 5

Numerical comparison between the BWCM and exact solution at different values of \(t\), for example, 2

Fig. 6
figure 6

Numerical comparison between the BWCM and exact solution at different values of \(x,\) for example, 2

Example 3

Consider the nonlinear BBM equation of the form [7];

$$\frac{\partial \theta \left(x ,t\right)}{\partial t}-\frac{{\partial }^{3}\theta \left(x ,t\right)}{\partial {x}^{2}\partial t}+\theta \left(x ,t\right)\frac{\partial \theta \left( x,t\right)}{\partial t}=0, \forall 0\le x\le 1, t\ge 0,$$

with the initial condition,

$$\theta \left(x ,0\right)=0,$$

and boundary conditions,

$$\theta \left(0,t\right)=0, \theta \left(1,t\right)=\frac{1}{1+t} .$$

The exact solution is \(\theta \left(x,t\right)=\frac{x}{1+t}\). Figure 7 compares the time-space graph of the BWCM with the exact solution and error analysis at different values of \(M\). Table 3 compares numerical solutions obtained from the proposed method with the Finite difference method [33], Haar wavelet method [33], and exact solutions. A graphical comparison of the BWCM solution and exact solution with different values of \(t\) and \(x\) is illustrated in Figs. 8 and 9, respectively. Error norms of the proposed method are discussed in Table 4. The CPU time taken by the Mathematica software is 0.613 s for Table 3 and 0.849 s for Table 4.

The BWCM solution at \(M=4\) is given by,

$$\theta \left(x,t\right)=\frac{x}{1+t}-1.6335\times {10}^{-20}t{x}^{2}+8.0135\times {10}^{-16}{t}^{2}{x}^{2}+8.2986\times {10}^{-16}{t}^{3}{x}^{2}+9.4529\times {10}^{-17}{t}^{4}{x}^{2}-5.3423\times {10}^{-16}t{x}^{3}-4.7667\times {10}^{-16}{t}^{2}{x}^{3}+3.6364\times {10}^{-16}{t}^{3}{x}^{3}-1.7137\times {10}^{-16}{t}^{4}{x}^{3}+6.1757\times {10}^{-17}t{x}^{4}-3.1290\times {10}^{-16}{t}^{2}{x}^{4}+3.7877\times {10}^{-16}{t}^{3}{x}^{4}-1.2762\times {10}^{-16}{t}^{4}{x}^{4}+6.3814\times {10}^{-17}t{x}^{5}-1.9144\times {10}^{-16}{t}^{2}{x}^{5}+1.2762\times {10}^{-16}{t}^{3}{x}^{5}-5.2154\times {10}^{-28}{t}^{4}{x}^{5}.$$
Table 3 Numerical comparison of the present method with different methods available in the literature at \(t=0.125\), for example, 3
Fig. 7
figure 7

Graphical representation of the BWCM and Exact solution with an absolute error, for example, 3

Table 4 Error norms of the proposed method at \(M=4\), for example, 3
Fig. 8
figure 8

Numerical comparison between the present method solution and exact solution at different values of \(t\), for example, 3

Fig. 9
figure 9

Numerical comparison between the present method solution and exact solution at different values of \(x\), for example, 3

Example 4

Consider another nonlinear equation [34];

$$\frac{\partial \theta \left(x,t\right)}{\partial t}+\theta \left(x,t\right)\frac{\partial \theta \left(x,t\right)}{\partial x}-6\frac{{\partial }^{2}\theta \left(x,t\right)}{\partial {x}^{2}}=x(2tcos\left({t}^{2}\right)+{sin}^{2}\left({t}^{2}\right),$$

with the following conditions,

$$\theta \left(x,0\right)=0,$$
$$\theta \left(0,t\right)=0, \theta \left(1,t\right)=sin\left({t}^{2}\right).$$

The exact solution is \(\theta \left(x,t\right)=xsin\left({t}^{2}\right)\). Figure 10 compares the time-space graph of the Bernoulli wavelet method solution with the exact solution and error analysis at different values of \(M\). Table 5 represents the assessment of numerical solutions obtained from the projected method, ADM with the Bernstein polynomial (Method I) [34], ADM with modified Bernstein polynomial (Method 2) [34], and exact solutions by using their absolute errors listed. A graphical comparison between the current method solution and the exact solution with different values of \(t\) and \(x\) is illustrated in Figs. 11 and 12, respectively. Error norms of the proposed method are discussed in Table 6. The CPU time taken by the Mathematica software is 0.647 s for Table 3 and 0.878 s for Table 4.

The BWCM solution at \(M=4\) is given by,

$$\theta \left(x,t\right)=1.5500\times {10}^{-19}t{x}^{2}-7.6346\times {10}^{-16}{t}^{2}{x}^{2}+3.5475\times {10}^{-8}{t}^{3}{x}^{2}+2.9446\times {10}^{-9}{t}^{4}{x}^{2}+2.5458\times {10}^{-16}t{x}^{3}-5.1242\times {10}^{-8}{t}^{2}{x}^{3}-5.8941\times {10}^{-9}{t}^{3}{x}^{3}-9.7267\times {10}^{-13}{t}^{4}{x}^{3}+1.9708\times {10}^{-8}t{x}^{4}+2.9473\times {10}^{-9}{t}^{2}{x}^{4}+1.9715\times {10}^{-12}{t}^{3}{x}^{4}-1.4275\times {10}^{-15}{t}^{4}{x}^{4}+9.9348\times {10}^{-13}t{x}^{5}-9.9474\times {10}^{-13}{t}^{2}{x}^{5}+1.2688\times {10}^{-15}{t}^{3}{x}^{5}-1.4266\times {10}^{-17}{t}^{4}{x}^{5}+xsin\left({t}^{2}\right).$$
Fig. 10
figure 10

Graphical representation of Bernoulli wavelet solution and Exact solution with an absolute error, for example, 4

Table 5 Numerical comparison of the present method with different methods available in the literature at \(x=0.1\), for example, 4
Fig. 11
figure 11

Numerical comparison between the present method solution and exact solution at different values of \(t\), for example, 4

Fig. 12
figure 12

Numerical comparison between the present method solution and exact solution at different values of \(x\), for example, 4

Table 6 Error norms of the proposed method at \(M=4\), for example, 4

Conclusion

In this study, we have developed an operational integration matrix using the Bernoulli wavelet and generated method with the collocation technique. Successfully applied the BWCM to nonlinear Benjamin–Bona–Mahony and Klein–Gordon equations. First, we transform the given nonlinear PDEs into a system of nonlinear algebraic equations. The Newton-Raphson method is applied to determine the unknown coefficients. We have also observed the results numerically in detail. Analysis of this model has been shown through figures. Moreover, we have introduced the numerical values in the tables. From the tables, it may be concluded that approximate numerical results are very close to the exact solutions of the governing model and better than other methods in the literature [32,33,34,35]. Thus, considered problems are introduced to test the proposed method’s efficiency, accuracy, and validity. Moreover, this method may also be applied to obtaining numerical solutions of the other mathematical models with slight modification.