Theory and Modern Applications

# Generalization of the bisection method and its applications in nonlinear equations

## Abstract

The aim of the current work is to generalize the well-known bisection method using quantum calculus approach. The results for different values of quantum parameter q are analyzed, and the rate of convergence for each $$q\in (0,1)$$ is also determined. Some physical problems in engineering are resolved using the QBM technique for various values of the quantum parameter q up to three iterations to examine the validity of the method. Furthermore, it is proven that QBM is always convergent and that for each interval there exists $$q\in (0,1)$$ for which the first approximation of root coincides with the precise solution of the problem.

## 1 Introduction

Numerical techniques deal with the approximation for the solution of complex mathematical problems. Approximation of roots of nonlinear equation is one of the areas of interest in numerical analysis. Different numerical methods like the Newton–Raphson method, secant method, regula falsi method, bisection method, etc. are used to solve nonlinear equations [1]. In the early twentieth century, Jackson introduced some crucial results of q-calculus, and this field has become an active area of research due to its wide range of applications in the field of combinatorics, mechanics, cryptography, hypergeometric series functions, number theory, and the theory of relativity [27]. Many researchers have utilized the quantum calculus approach to generalize the numerical methods. Quantum analogue of different root finding methods can be found in the literature [810].

Prashant et al. [11] used the q-Taylor formula and investigated the q-analogue of iterative methods, particularly the q-analogue of the generalized Newton–Raphson method, and compared the accuracy with the results obtained by the classical methods. Many linear and nonlinear models appearing in science and engineering problems can be modeled by using the q-differential equations. Jafari et al. [12] adopted the Daftardar decomposition technique for solving the q-difference equations and also determined the convergence of the method.

Many researchers have recently focused on improving the order of convergence of iterative methods. Several modified iterative strategies have been developed to improve the order of convergence and the proficiency index. In [13] Chun-Hui He modified an ancient Chinese algorithm and developed Chun-Hui He iterative scheme to increase its rate of convergence. Results show that the developed modified Chinese algorithms are more precise and efficient. Khan in [14] developed a numerical algorithm based on Chun-Hui He’s iteration algorithms and evaluated the effectiveness of the method by comparing the solution of some engineering problems with the classical iterative algorithm. Chun-Hui He’s iterative scheme is given as follows:

### Phase 1

Using an ancient Chinese algorithm to estimate first approximation

\begin{aligned} x_{2} =& x_{0}-\frac{f(x_{0})}{R(x_{0},x_{1})}, \end{aligned}
(1.1)

where $$f(x_{0})f(x_{1})<0$$ and $$R(x_{0},x_{1})=\frac{f(x_{0})-f(x_{1})}{x_{0}-x_{1}}$$.

### Phase 2

Using $$x_{2}$$ as an initial guess in Newton’s method

\begin{aligned} x_{3} =& x_{2}-\frac{f(x_{2})}{f^{\prime }(x_{2})}. \end{aligned}

### Phase 3

Putting $$x_{2}=x_{0}$$ and $$x_{3}=x_{1}$$ in (1.1) and repeating the iteration process until the desired accuracy is obtained.

The above-mentioned method is utilized in [15] to numerically estimate the Darcy friction factor in a water network problem. For more information in this regard, readers are referred to [16, 17].

The purpose of the current study is to analyze the approximations of q-analogue of the bisection method and its comparison with the classical iterative methods. The q-bisection method has linear order of convergence, but it is always convergent. For $$q\in (0,1)$$ and $$n\in N$$, the quantum number is defined as follows:

\begin{aligned}{} [n]_{q} =& \frac{1-q^{n}}{1-q}, \end{aligned}

when $$q\rightarrow 1$$, $$[n]_{q}=n$$.

The rest of the current article is organized as follows: Sect. 2 contains the proposed quantum iterative algorithm. Section 3 gives the order of convergence of the proposed method. Section 4 is all about the computation of roots of a numerical problem utilizing the QBM method. In Sect. 5, we compare the results of QBM with some well-known iterative algorithms. Finally, the findings of our article are given in Sect. 6.

## 2 Main result

Consider the nonlinear equation

\begin{aligned} f(x)=0, \end{aligned}

where $$f(x)$$ is a continuous real mapping. Suppose that the roots of the above equation lie in the interval $$[a,b]$$, i.e., $$f(a)f(b)<0$$. The approximation of root is obtained by using the following q-bisection iterative formulas:

\begin{aligned} c=\frac{a+qb}{[2]_{q}}, \end{aligned}
(2.1)

or

\begin{aligned} c=\frac{aq+b}{[2]_{q}}, \end{aligned}
(2.2)

where c gives an approximate value of the root. Both of the iterative formulas can be used for the approximation of root. Throughout this paper (2.1) is adopted as standard QBM.

### Proposition 1

For a given interval $$[a,b]$$, there exists $$q\in (0,1)$$ such that the q-bisection method converges in a minimum number of iterations.

Suppose that if c is the root of $$f(x)$$, i.e., $$f(c)=0$$, then

\begin{aligned} q=\frac{c-a}{b-c} \end{aligned}
(2.3)

gives the value of q for which algorithm (2.1) rapidly converges to root. Expression equivalent to (2.3) can also be obtained for (2.2).

### Example 1

We consider the nonlinear equation

\begin{aligned} f(x)=x e^{x^{2}}-\sin^{2}x+3\cos x+5. \end{aligned}

The exact solution of the problem is $$x=-1.20764782713$$. From Fig. 1 we observe that one root lies between −2 and 2, so we take $$[-2,2]$$ as an initial interval.

Table 1 shows that for $$q=0.2470196903$$ the iterative process converges rapidly.

## 3 Order of convergence

We rewrite the q-bisection method as follows:

\begin{aligned} x_{n+1}=\frac{x_{n-1}+qx_{n}}{[2]_{q}}. \end{aligned}
(3.1)

If x is the root of some function f, then the difference of the nth approximation of root $$x_{n}$$ from x is taken as $$\epsilon _{n}$$ (error in the nth approximation), i.e.,

\begin{aligned} x=x_{n}+\epsilon _{n}. \end{aligned}

Similarly, we have

\begin{aligned}& x=x_{n-1}+\epsilon _{n-1}, \\& x=x_{n+1}+\epsilon _{n+1}. \end{aligned}

From (3.1), we obtain

\begin{aligned}& x-\epsilon _{n+1} = \frac{x-\epsilon _{n-1}+qx-q\epsilon _{n}}{[2]_{q}} \\& \hphantom{x-\epsilon _{n+1}} = \frac{[2]_{q}x-\epsilon _{n-1}-q\epsilon _{n}}{[2]_{q}} \\& \quad \Rightarrow \quad \epsilon _{n+1} = \frac{\epsilon _{n-1}+q\epsilon _{n}}{[2]_{q}} \\& \hphantom{\quad \Rightarrow \quad \epsilon _{n+1}} = \frac{q\epsilon _{n}}{[2]_{q}} \biggl[1+ \frac{\epsilon _{n-1}}{q\epsilon _{n}} \biggr]. \end{aligned}

By neglecting the fraction $$\frac{\epsilon _{n-1}}{q\epsilon _{n}}$$, we get

\begin{aligned} \epsilon _{n+1} \approx \frac{q\epsilon _{n}}{[2]_{q}}. \end{aligned}

This shows that q-bisection method has the linear order of convergence for all the values of quantum parameter q.

## 4 Numerical examples and comparison of results

This section focuses on the efficiency of the algorithm used to obtain the numerical results presented in the paper. All the computational experiments are performed on Intel(R) Core(TM) i3, 2.1 GHz, 8GB RAM, and the code is written in MATLAB. Approximate values of root are correct up to 15 decimal places, i.e., $$\varepsilon =10^{-16}$$.

Two types of stoping mechanism are used in the algorithm

\begin{aligned} \text{(i)} \quad \biggl\vert \frac{b-a}{2} \biggr\vert < \varepsilon \quad \text{and} \quad (\text{ii}) \quad \bigl\vert f(c) \bigr\vert < \varepsilon . \end{aligned}

Initially, in Examples 25, we analyze the performance of quantum iterative algorithm for different values of q up to three iterations. Later on, the number of iterations is increased to acquire the desired accuracy.

### Example 2

We consider the nonlinear equation

\begin{aligned} 40n^{1.5}-875n+35{,}000 =& 0. \end{aligned}

The equation represents an industrial engineering profit estimation problem. Solution of the nonlinear equation gives the minimum number of units n that a firm needs to sell in order to get profit.

The exact solution of the problem is $$n=62.691697150362522$$. From Fig. 2 we can see that the root of function lies between 62 and 63, so we have taken $$[62,64]$$ as an initial interval.

The above stated result concludes that $$n_{1}$$ gives better approximation of root when q is closer to 0.528. The exact solution of the problem is obtained by following the same procedure as the one stated in Table 2. The last row of the table gives the results for the classical bisection method. In contrast with the other values of q, we conclude that the first iteration of the classical bisection method is not a better approximation of root than $$q=0.528$$.

### Example 3

Consider the nonlinear equation

\begin{aligned} h^{3}-9h^{2}+3.8197 =& 0. \end{aligned}

The equation represents a physical problem of designing a scale to determine the volume of oil in a spherical tank. The solution of this chemical engineering problem gives the height of dipstick h corresponding to given volume of the spherical tank.

The exact solution of the problem is 8.952339769727381. From Fig. 3 we can see that the root of function lies between 8 and 10, so $$[8,10]$$ is taken as an initial interval for the iteration process. Continuing the process repeatedly gives the exact root of the problem. The last row of Table 3, where $$q=1$$, gives the result of the classical bisection method. Comparison shows that the first iteration for $$q=0.909$$ is still a better approximation of root than the classical bisection method.

### Example 4

((Population model) [1])

Consider the nonlinear equation

\begin{aligned} 0.610679 e^{-2k}-e^{-k}+0.389321 =& 0. \end{aligned}

This equation represents logistic population growth model of USA from 1950 to 1970, where k is the population growth rate.

The exact solution of the problem is $$k=0.450167256004448$$. From Fig. 4 we can see that the root of function lies between 0 and 1, so $$[0,1]$$ is taken as an initial interval. Proceeding likewise, we obtain the exact root of the problem. For $$q=1$$, the computation algorithm reduces to the classical bisection method. Clearly, from Table 4, the first iteration obtained corresponding to $$q=0.819$$ is better approximation than the classical bisection method.

### Example 5

([18])

Consider the transcendental equation

\begin{aligned} \frac{ (1+\sqrt {1-4 \lambda})^{2}}{4}+2 \lambda \ln \biggl( \biggl\vert \frac{1-\sqrt {1-4 \lambda}}{2} \biggr\vert \biggr) =& 0. \end{aligned}

This equation is associated with the formulation of dynamical pull in the problem of micro-electromechanical system (MEMS). For MEMS applications, an analytical closed-form solution of the equation is crucial. From Fig. 5, the root lies closer to 0 and $$f(0.1)f(0.25)<0$$, so $$[0.1, 0.25]$$ is taken as an initial interval.

From Table 5, it is evident that QBM gives better approximation of root in three iterations for $$q=0.4477$$ than the classical bisection method.

## 5 Comparison of QBM with some classical methods

This section is concerned with the comparison of QBM with the classical methods like bisection method, Newton–Raphson’s, and regula falsi method. The efficiency of the proposed quantum iterative method is determined by analyzing the solution of some of the nonlinear equations. The value of $$f(x_{n})$$, the number of iterations (IT), and the difference between successive approximations $$(\delta )$$ are all shown in Table 5

\begin{aligned}& f_{1}(x) = e^{x}-2^{-x}+2 \operatorname{Cos}(x)-6, \\& f_{2}(x) = 1{,}000{,}000 e^{x}+\frac{435{,}000}{x} \bigl(e^{x}-1\bigr)-1{,}564{,}000, \\& f_{3}(x) = \ln(x-1)+\operatorname{Cos}(x-1), \\& f_{4}(x) = 2x \operatorname{Cos}(x)-(x-2)^{2}, \\& f_{5}(x) = e^{\sin(x)}-\cos^{2}(3x), \\& f_{6}(x) = \ln\bigl(\tan(x)\bigr)-e^{-2x}, \\& f_{7}(x) = 230x^{4} + 18x^{3} + 9x^{2} - 221x - 9, \\& f_{8}(x) = x - 0.8 - 0.2 \sin (x), \\& f_{9}(x) = \operatorname{Sin}(x)-e^{-x}, \\& f_{10}(x) = \frac{ (1+\sqrt {1-4 x})^{2}}{4}+2 x \ln \biggl( \biggl\vert \frac{1-\sqrt {1-4 x}}{2} \biggr\vert \biggr). \end{aligned}

In Tables 615, $$q=0.5$$ and $$q=0.75$$ are taken for $$\mathrm{QBM}_{a}$$ and $$\mathrm{QBM}_{b}$$, respectively. For $$\mathrm{QBM}_{c}$$, q is evaluated by using (2.3).

### Remark 1

• The order of convergence of the proposed quantum iterative method is linear, but it converges faster for some values of q.

• Tables show that if $$\mathrm{QBM}_{c}$$ converges for the value of q obtained from Proposition 1, then it approaches to the root in the minimum number of iterations.

• The classical bisection method is always convergent, but the q-bisection method may be divergent for some values of q.

## 6 Conclusions

The main purpose of the current article is to develop an iterative algorithm for solving nonlinear equation utilizing quantum calculus. The proposed algorithm generalizes the classical bisection method, and it is observed that the quantum bisection method converges at different rates for different values of quantum parameter $$q\in (0,1)$$. Although QBM has linear order of convergence, there exists q for which the method converges to root rapidly. The comparison of the algorithm shows that, in contrast to the classical method, the generalized quantum bisection method is more reliable and gives better results for some values of q. Although Newton’s method has a higher order of convergence, it is extremely sensitive to the initial guess, i.e., a bad initial guess may lead to the failure of the algorithm. Similarly, in some problems, the regula falsi and the classical bisection method fail to obtain the desired accuracy of the solution. On the other hand, QBM gives better approximation of roots for some values of q. In the future, q-analogues of some well-known numerical methods can be developed to improve the efficiency of the methods.

## Availability of data and materials

Data sharing not applicable to this paper as no data sets were generated or analysed during the current study.

## References

1. Burden, R.L., Faires, J.D.: Numerical Analysis. PWS Publishing Company, Boston (2001)

2. Ernst, T.: A new notation for q-calculus and a new q-Taylor formula. Uppsala University. Department of Mathematics (1999)

3. Koelink, E.: 8 Lectures on quantum groups and q-special functions (1996). arXiv:q-alg/9608018. arXiv preprint

4. Erzan, A.: Finite q-differences and the discrete renormalization group. Phys. Lett. A 225(4–6), 235–238 (1997)

5. Eryilmaz, A.: Spectral analysis of Sturm-Liouville problem with the spectral parameter in the boundary condition. J. Funct. Spaces Appl. (2012)

6. He, J.H.: A new iteration method for solving algebraic equations. Appl. Math. Comput. 135(1), 81–84 (2003)

7. Koornwinder, T.H., Swarttouw, R.F.: On q-analogues of the Fourier and Hankel transforms. Trans. Am. Math. Soc. 333(1), 445–461 (1992)

8. Kac, V., Cheung, P.: Quantum Calculus. Springer, New York (2002)

9. Ernst, T.A.: Comprehensive Treatment of q-Calculus. Springer, Basel (2012)

10. Tassaddiq, A., Qureshi, S., Soomro, A., Hincal, E., Baleanu, D., Shaikh, A.A.: A new three-step root-finding numerical method and its fractal global behavior. Fractal Fract. 5, 204 (2021)

11. Singh, P., Mishra, P.K., Pathak, R.S.: q-iterative methods. IOSR J. Math. 9(1), 06 (2013)

12. Jafari, H., Johnston, S.J., Sani, S.M., Baleanu, D.: A decomposition method for solving q-difference equations. Appl. Math. Inf. Sci. 9(6), 2917 (2015)

13. He, C.H.: An introduction to an ancient Chinese algorithm and its modification. Int. J. Numer. Methods Heat Fluid Flow (2016)

14. Khan, W.A.: Numerical simulation of Chun-Hui He’s iteration method with applications in engineering. Int. J. Numer. Methods Heat Fluid Flow (2021)

15. Khan, W.A., Arif, M., Mohammed, M., Farooq, U., Farooq, F.B., Elbashir, M.K., AlHussain, Z.A.: Numerical and theoretical investigation to estimate Darcy friction factor in water network problem based on modified Chun-Hui He’s algorithm and applications. Math. Probl. Eng. (2022)

16. Ibrahim, R.W., Baleanu, D.: On quantum hybrid fractional conformable differential and integral operators in a complex domain. Rev. R. Acad. Cienc. Exactas Fís. Nat., Ser. A Mat. 115(1), 1–13 (2021)

17. Rashid, S., Hammouch, Z., Ashraf, R., Baleanu, D., Nisar, K.S.: New quantum estimates in the setting of fractional calculus theory. Adv. Differ. Equ. 1, 1–17 (2020)

18. He, J.H., Qie, N., He, C.H., Gepreel, K.: Fast identification of the pull-in voltage of a nano/micro-electromechanical system. J. Low Freq. Noise Vib. Act. Control 41(2), 566–571 (2022)

## Acknowledgements

The authors would like to express their sincere thanks to the editor and the anonymous reviewers for their helpful comments and suggestions.

## Funding

There is no funding.

## Author information

Authors

### Contributions

HB: supervision, writing—review and editing. PK: computation, writing—original draft. All authors read and approved the final manuscript.

### Corresponding author

Correspondence to Hüseyin Budak.

## Ethics declarations

### Competing interests

The authors declare that they have no competing interests.

## Rights and permissions

Reprints and permissions

Gulshan, G., Budak, H., Hussain, R. et al. Generalization of the bisection method and its applications in nonlinear equations. Adv Cont Discr Mod 2023, 18 (2023). https://doi.org/10.1186/s13662-023-03765-5