1 Introduction

Fractional differential equations (FDEs) occur in the modelling of many phenomena in various fields of science and engineering. Several studies by some researchers (Bagley and Torvik 1985; Kulish and Lage 2002; Oldham 2010; Dahaghin and Hassani 2017; Bhrawy and Zaky 2017; Parsa Moghaddam and Tenreiro Machado 2017; Karamali et al. 2018; Hassani and Naraghirad 2019; Hassani et al. 2019a; Heydari et al. 2019) have shown that many complex physical and engineering problems can be described with great success via FDEs. We refer the interested reader to refer (Tenreiro Machado et al. 2011) for a historical perspective on fractional calculus. Most of FDEs do not have analytic solutions, so approximate and numerical techniques must be used. Several analytical and numerical methods to solve FDEs have been given such as extrapolation method (Diethelm and Walz 1997), Predictor-Corrector method (Diethelm et al. 2002), Adomian decomposition method (Elsayed and Gaber 2006), multistep method (Galeone and Garrappa 2006), Homotopy perturbation method (Odibat et al. 2010), linear B-spline method (Lakestani et al. 2012), product integration method (Garrappa and Popolizio 2012) and wavelets method (Rehman and Khan 2011; Heydari et al. 2013).

Optimal control theory is a branch of optimization theory concerned with minimizing a cost or maximizing a pay-off. Optimal control theory has various applications in sciences, engineering, and industry. Several studies have been conducted by some researchers on the optimal control problems (Swan 1990; Martin 1992; Feichtinger et al. 1994; Howlett 2000; Vittek et al. 2017; Kheiri Sarabi et al. 2017; Liu et al. 2019). Despite the fact that the optimal control theory has been under development for years, the fractional optimal control theory is a new area in mathematics. Fractional optimal control problems (FOCPs) can be defined with respect to different definitions of fractional derivatives, like the Riemann–Liouville and Caputo fractional derivatives as the most important ones (Agrawal 2004). Yousefi et al. (2011) applied the Legendre multiwavelet basis with the aid of a collocation method to obtain the approximate solution for the FOCPs. Alipour et al. (2013) proposed a technique based on Bernstein polynomials OM for multi-dimensional FOCPs. An application of the Ritz method and polynomials OM in solving FOCPs were investigated in (Nemati and Yousefi 2016; Nemati et al. 2016). Sabouri et al. (2017) applied a neural network for the solution of a class of FOCPs. Zaky and Tenreiro Machado (2017) derived an analytical and numerical approach for an unconstrained convex distributed-order FOCPs. Behroozifar and Habibi (2018) tried Bernoulli polynomials for the approximate solution of FOCPs. Rahimkhani and Ordokhani (2018) introduced a numerical technique based on Müntz-Legendre wavelets for 2D FOCPs. Rahimkhani and Ordokhani (2019) implemented the generalized fractional-order Bernoulli–Legendre functions for solving 2D-FOCPs. The interested reader can refer to (Keshavarz et al. 2015; Safaie et al. 2015; Soradi Zeid et al. 2016; Rahimkhani et al. 2016; Mirinejad and Inanc 2017; Rabiei et al. 2017; Zahra and Hikal 2017; Haber and Verhaegen 2018; Heydari 2018; Mashayekhi and Razzaghi 2018; Hassani et al. 2019b; Heydari 2019; Li et al. 2019; Lotfi 2019; Olivier and Pouchol 2019; Rabiei and Parand 2019; Treanţă 2019) for some works on FOCPs.

The main purpose of this paper is to propose an optimization method based on the fractional-order Bernoulli wavelet functions (F-BWFs) for the following FOCPs

$$\begin{aligned} \min \,{\mathcal {J}}=\int _{0}^{1}{\mathcal {F}}\left( t,x(t),u(t)\right)\,\hbox {d}t, \end{aligned}$$
(1)

subject to the fractional dynamical system and inequality constraints

(2)

and the initial conditions

$$\begin{aligned} x(0)=x_{0},\dot{x}(0)=x_{1},\ldots ,x^{[\nu ]}(0)=x_{[\nu ]}, \end{aligned}$$
(3)

where \(x_{j}\) for \(j=0, 1, \ldots , \lceil \nu \rceil \) are real constants, \({\mathcal {F}}\) and \(\mathcal {G}\) are continuous functions and denotes the fractional derivative of order \(\nu \) in the Caputo sense of x(t).

Hereafter, an optimization method based on the F-BWFs is introduced, new OM of fractional integration and the product OM are constructed, and a numerical scheme to solve Eqs. (1)–(3) is developed.

This paper is organized as follows. Section 2 presents the fundamental aspects of the fractional calculus and fractional-order Bernoulli wavelet functions. Section 3 develops the operational matrices of F-BWFs. Section 4 presents a numerical method based on the F-BWFs. Section 5 includes illustrative examples demonstrating the accuracy and efficiency of the present method. Finally, Sect. 6 summarizes the main conclusions.

2 Definitions and Mathematical Preliminaries

This section introduces the fractional calculus and reviews the F-BWFs.

Definition 1

The Caputo fractional derivative of order \(\nu \), when \(q-1< \nu < q\), of f(t) is defined by (Hassani et al. 2019a, b)

(4)

where \(q = [\nu ] + 1,\) that \([\nu ]\) denotes the integer part of \(\nu \) and \(\varGamma (\cdot )\) denotes the gamma function defined for \(z>0\) as

$$\begin{aligned} \varGamma (z)=\int _{0}^{\infty }t^{z-1}e^{-t}\hbox {d}t. \end{aligned}$$

Definition 2

The Riemann–Liouville fractional integral operator of order \(\nu \) of f(t) is defined by (Rahimkhani and Ordokhani 2019)

$$\begin{aligned} I_{t}^{\nu }f(t)=\left\{ \begin{array}{ll} \frac{1}{\varGamma {(\nu )}}\int _{0}^{t}\frac{f(s)}{(t-s)^{1-\nu }}\,\hbox {d}s, &{}\quad \nu>0, t>0, \\ f(t),&{}\quad \nu =0. \end{array}\right. \end{aligned}$$
(5)

The useful relation between the Riemann–Liouville operator and Caputo operator is given by the following expression (Rahimkhani and Ordokhani 2019)

(6)

where n is an integer, and \(f \in C_1^n\).

Also, it is worth noting that based on the definition of the fractional derivative in the Caputo sense as above, we have the following useful property (Hassani et al. 2019b)

(7)

where \(q-1<\nu \le q\).

2.1 Fractional-Order Bernoulli Wavelets

The fractional-order Bernoulli wavelets of order \(\alpha \), \(\psi _{n, m}^{\alpha },\)\(n=1, 2,\ldots , 2^{k-1}\), \(m=0, 1, \ldots , M\), on the interval [0,1) defined by (Rahimkhani et al. 2016)

$$\begin{aligned} \psi _{n,m}^{\alpha }(t)=\displaystyle \left\{ \begin{array}{ll} \displaystyle 2^{\frac{k-1}{2}}{\tilde{\beta }}_{m}(2^{k-1}t^{\alpha }-n+1), &{}\quad \frac{n-1}{2^{k-1}}\le t^{\alpha }<\frac{n}{2^{k-1}},\\ \displaystyle 0,&{}\quad \hbox{otherwise}, \end{array}\right. \end{aligned}$$
(8)

that k can assume any positive integer and

$$\begin{aligned} {\tilde{\beta }}_{m}(2^{k-1}t^{\alpha }-n+1)=\displaystyle \left\{ \begin{array}{ll} 1,&{}\quad m=0,\\ \displaystyle \frac{1}{\sqrt{\frac{(-1)^{(m-1)}(m!)^2}{(2m)!} \beta _{2m}}}\beta _{m}(2^{k-1}t^{\alpha }-n+1),&{}\quad m>0, \end{array}\right. \end{aligned}$$
(9)

where \(\beta _{m}(t)\) are Bernoulli polynomials of order m on [0, 1]. The Bernoulli polynomials of degree m, \(\beta _{m}(t)\), is defined by (Keshavarz et al. 2015)

$$\begin{aligned} \beta _{m}(t)=\sum _{i=1}^{m}\left( \begin{array}{l} m\\ i \end{array}\right) \beta _{m-i} t^{i}, \end{aligned}$$
(10)

where \(\beta _{i}\) are rational numbers called Bernoulli numbers which are obtained using the series expansion of trigonometric functions

$$\begin{aligned} \frac{t}{e^{t}-1}=\sum _{i=0}^{\infty }\beta _{i}\frac{t^i}{i!}. \end{aligned}$$

The first few Bernoulli numbers are

$$\begin{aligned} \beta _{0}=1,\beta _{1}=\frac{-1}{2},\beta _{2}=\frac{1}{6}, \beta _{4}=\frac{-1}{30}, \end{aligned}$$

with \(\beta _{2i+1}=0\), \(i=1, 2, \ldots \), and the first few Bernoulli polynomials are

$$\begin{aligned} \beta _{0}(t) &= 1,\beta _{1}(t)=t-\frac{1}{2},\beta _{2}(t)=t^2-t+\frac{1}{6},\\ \beta _{3}(t) &= t^3-\frac{3}{2}t^2+\frac{1}{2}t. \end{aligned}$$

2.2 The Functions Approximation

An arbitrary function f(t) which is square integrable in the interval [0, 1] can be expanded by F-BWFs as (Rahimkhani et al. 2016)

$$\begin{aligned} f(t)=\sum _{n=1}^{\infty }\sum _{m=0}^{\infty }c_{n,m}\psi _{n, m}^{\alpha }(t). \end{aligned}$$
(11)

The infinite series in Eq. (11) is truncated to approximate f(t) in terms of the F-BWFs as

$$\begin{aligned} f(t)\simeq \sum _{n=1}^{2^{k-1}}\sum _{m=0}^{M}c_{n, m}\psi _{n, m}^{\alpha }(t)=C^{\mathrm{T}}\varPsi ^{\alpha }(t), \end{aligned}$$
(12)

where T indicates transposition and the unknown vector C and \(\varPsi ^{\alpha }(t) \) are \(2^{k-1}(M+1)\) column vectors and given by

$$\begin{aligned}&C=\left[ c_{1, 0},c_{1, 1},\ldots ,c_{1, M},c_{2, 0},c_{2, 1},\ldots , c_{2, M},\ldots ,\right. \nonumber \\&\qquad \qquad \left. c_{2^{k-1}, 0},c_{2^{k-1}, 1},\ldots ,c_{2^{k-1}, M}\right] ^{\mathrm{T}},\nonumber \\&\varPsi ^{\alpha }(t)=\left[ \psi _{1,0}^{\alpha }(t), \psi _{1,1}^{\alpha }(t),\ldots ,\psi _{1,M}^{\alpha }(t), \psi _{2,0}^{\alpha }(t),\right. \nonumber \\&\qquad \qquad \qquad \psi _{2,1}^{\alpha }(t), \ldots ,\psi _{2,M}^{\alpha }(t), \ldots ,\nonumber \\&\left. \psi _{2^{k-1},0}^{\alpha }(t), \psi _{2^{k-1},1}^{\alpha }(t),\ldots ,\psi _{2^{k-1},M}^{\alpha }(t)\right] ^{\mathrm{T}}, \end{aligned}$$
(13)

and

$$\begin{aligned} C^T &= F^T D^{-1},\nonumber \\ D &= \langle \varPsi ^{\alpha },\varPsi ^{\alpha }\rangle =\int _{0}^{1}\varPsi ^{\alpha }(t)\varPsi ^{\alpha \text {T}}(t)t^{\alpha -1}\hbox {d}t,\nonumber \\ D &= \left[ d_{n,m,i,j}\right] ,\quad d_{n,m,i,j}=\langle \psi _{n,m}^{\alpha }, \psi _{i,j}^{\alpha } \rangle ,\nonumber \\ F &= \left[ f_{1,0},f_{1,1},\ldots ,f_{1,M},f_{2,0},f_{2,1},\ldots ,f_{2,M},\ldots ,\right. \nonumber \\&\left. f_{2^{k-1},0},f_{2^{k-1},1},\ldots ,f_{2^{k-1},M}\right] ^{\mathrm{T}},\nonumber \\ f_{ij} &= \langle f,\psi _{ij}^{\alpha }\rangle =\int _{0}^{1}f(t)\psi _{ij}^{\alpha }(t)t^{\alpha -1}\hbox {d}t,\nonumber \\&i=1,2,\ldots ,2^{k-1},\,\,\,j=1,2,\ldots ,M, \end{aligned}$$
(14)

that \(\langle .,.\rangle \) denotes the inner product in \(L^2 [0,1]\).

3 The Operational Matrices

The main objective of this section is to derive the F-BWFs OM of fractional integration and product OM.

3.1 The Operational Matrix of Fractional Integration

The Riemann–Liouville fractional integral of the vector \(\varPsi ^{\alpha }(t)\) defined in Eq. (13) can be obtained as

$$\begin{aligned} I_{t}^{\nu }\varPsi ^{\alpha }(t)\simeq P^{(\nu , \alpha )}\varPsi ^{\alpha }(t), \end{aligned}$$
(15)

where \(P^{(\nu , \alpha )}\) denotes the \(2^{k-1}(M+1)\times 2^{k-1}(M+1)\) dimensional OM for Riemann–Liouville fractional integration defined by

$$\begin{aligned} I_{t}^{\nu }\varPsi ^{\alpha }(t) &= \left[ \begin{array}{c} I_{t}^{\nu }\psi _{1,0}^{\alpha }(t)\\ I_{t}^{\nu }\psi _{1,1}^{\alpha }(t)\\ \vdots \\ I_{t}^{\nu }\psi _{1,M}^{\alpha }(t)\\ I_{t}^{\nu }\psi _{2,0}^{\alpha }(t)\\ I_{t}^{\nu }\psi _{2,1}^{\alpha }(t)\\ \vdots \\ I_{t}^{\nu }\psi _{2,M}^{\alpha }(t)\\ \vdots \\ I_{t}^{\nu }\psi _{2^{k-1},0}^{\alpha }(t)\\ I_{t}^{\nu}\psi _{2^{k-1},1}^{\alpha }(t)\\ \vdots \\ I_{t}^{\nu } \psi _{2^{k-1},M}^{\alpha }(t) \end{array}\right] \simeq \left[ \begin{array}{c} \sum \limits _{n=1}^{2^{k-1}}\sum \limits _{m=0}^{M}E_{n,m}^{1,0}\psi _{n,m}^{\alpha }(t)\\ \sum \limits _{n=1}^{2^{k-1}}\sum \limits _{m=0}^{M}E_{n,m}^{1,1}\psi _{n,m}^{\alpha }(t)\\ \vdots \\ \sum \limits _{n=1}^{2^{k-1}}\sum \limits _{m=0}^{M}E_{n,m}^{1,M}\psi _{n,m}^{\alpha }(t)\\ \sum \limits _{n=1}^{2^{k-1}}\sum \limits _{m=0}^{M}E_{n,m}^{2,0}\psi _{n,m}^{\alpha }(t)\\ \sum \limits _{n=1}^{2^{k-1}}\sum \limits _{m=0}^{M}E_{n,m}^{2,1}\psi _{n,m}^{\alpha }(t)\\ \vdots \\ \sum \limits _{n=1}^{2^{k-1}}\sum \limits _{m=0}^{M}E_{n,m}^{2,M}\psi _{n,m}^{\alpha }(t)\\ \vdots \\ \sum \limits _{n=1}^{2^{k-1}}\sum \limits _{m=0}^{M}E_{n,m}^{2^{k-1},0}\psi _{n,m}^{\alpha }(t)\\ \sum \limits _{n=1}^{2^{k-1}}\sum \limits _{m=0}^{M}E_{n,m}^{2^{k-1},1}\psi _{n,m}^{\alpha }(t)\\ \vdots \\ \sum \limits _{n=1}^{2^{k-1}}\sum \limits _{m=0}^{M}E_{n,m}^{2^{k-1},M}\psi _{n,m}^{\alpha }(t) \end{array}\right] \nonumber \\ &= \left[ \begin{array}{c} (E^{1,0})^T\varPsi ^{\alpha }(t)\\ (E^{1,1})^T\varPsi ^{\alpha }(t)\\ \vdots \\ (E^{1,M})^T\varPsi ^{\alpha }(t)\\ (E^{2,0})^T\varPsi ^{\alpha }(t)\\ (E^{2,1})^T\varPsi ^{\alpha }(t)\\ \vdots \\ (E^{2,M})^T\varPsi ^{\alpha }(t)\\ \vdots \\ (E^{2^{k-1},0})^T\varPsi ^{\alpha }(t)\\ (E^{2^{k-1},1})^T\varPsi ^{\alpha }(t)\\ \vdots \\ (E^{2^{k-1},M})^T\varPsi ^{\alpha }(t) \end{array}\right] \nonumber \\ &= \left[ \begin{array}{ccccccccc} E_{1,0}^{1,0}&{}\quad E_{1,1}^{1,0}&{}\quad \ldots &{}\quad E_{1,M}^{1,0}&{}\quad \ldots &{}\quad E_{2^{k-1},0}^{1,0} &{}\quad E_{2^{k-1},1}^{1,0} &{}\quad \ldots &{}\quad E_{2^{k-1},M}^{1,0}\\ E_{1,0}^{1,1}&{}\quad E_{1,1}^{1,1}&{}\quad \ldots &{}\quad E_{1,M}^{1,1}&{}\quad \ldots &{}\quad E_{2^{k-1},0}^{1,1} &{}\quad E_{2^{k-1},1}^{1,1} &{}\quad \ldots &{}\quad E_{2^{k-1},M}^{1,1}\\ \vdots &{}\quad \vdots &{}\quad &{}\quad \vdots &{}\quad &{}\quad \vdots &{}\quad \vdots &{}\quad &{}\quad \vdots \\ E_{1,0}^{1,M}&{}\quad E_{1,1}^{1,M}&{}\quad \ldots &{}\quad E_{1,M}^{1,M}&{}\quad \ldots &{}\quad E_{2^{k-1},0}^{1,M} &{}\quad E_{2^{k-1},1}^{1,M} &{}\quad \ldots &{}\quad E_{2^{k-1},M}^{1,M}\\ E_{1,0}^{2,0}&{}\quad E_{1,1}^{2,0}&{}\quad \ldots &{}\quad E_{1,M}^{2,0}&{}\quad \ldots &{}\quad E_{2^{k-1},0}^{2,0} &{}\quad E_{2^{k-1},1}^{2,0} &{}\quad \ldots &{}\quad E_{2^{k-1},M}^{2,0}\\ E_{1,0}^{2,1}&{}\quad E_{1,1}^{2,1}&{}\quad \ldots &{}\quad E_{1,M}^{2,1}&{}\quad \ldots &{}\quad E_{2^{k-1},0}^{2,1} &{}\quad E_{2^{k-1},1}^{1,0} &{}\quad \ldots &{}\quad E_{2^{k-1},M}^{1,0}\\ \vdots &{}\quad \vdots &{}\quad &{}\quad \vdots &{}\quad &{}\quad \vdots &{}\quad \vdots &{}\quad &{}\quad \vdots \\ E_{1,0}^{2,M}&{}\quad E_{1,1}^{2,M}&{}\quad \ldots &{}\quad E_{1,M}^{2,M}&{}\quad \ldots &{}\quad E_{2^{k-1},0}^{2,M} &{}\quad E_{2^{k-1},1}^{2,M} &{}\quad \ldots &{}\quad E_{2^{k-1},M}^{2,M}\\ \vdots &{}\quad \vdots &{}\quad &{}\quad \vdots &{}\quad &{}\quad \vdots &{}\quad \vdots &{}\quad &{}\quad \vdots \\ E_{1,0}^{2^{k-1},0}&{}\quad E_{1,1}^{2^{k-1},0}&{}\quad \ldots &{}\quad E_{1,M}^{2^{k-1},0}&{}\quad \ldots &{}\quad E_{2^{k-1},0}^{2^{k-1},0} &{}\quad E_{2^{k-1},1}^{2^{k-1},0} &{}\quad \ldots &{}\quad E_{2^{k-1},M}^{2^{k-1},0}\\ E_{1,0}^{2^{k-1},1}&{}\quad E_{1,1}^{2^{k-1},1}&{}\quad \ldots &{}\quad E_{1,M}^{2^{k-1},1}&{}\quad \ldots &{}\quad E_{2^{k-1},0}^{2^{k-1},1} &{}\quad E_{2^{k-1},1}^{2^{k-1},1} &{}\quad \ldots &{}\quad E_{2^{k-1},M}^{2^{k-1},1}\\ \vdots &{}\quad \vdots &{}\quad &{}\quad \vdots &{}\quad &{}\quad \vdots &{}\quad \vdots &{}\quad &{}\quad \vdots \\ E_{1,0}^{2^{k-1},M}&{}\quad E_{1,1}^{2^{k-1},M}&{}\quad \ldots &{}\quad E_{1,M}^{2^{k-1},M}&{}\quad \ldots &{}\quad E_{2^{k-1},0}^{2^{k-1},M} &{}\quad E_{2^{k-1},1}^{2^{k-1},M} &{}\quad \ldots &{}\quad E_{2^{k-1},M}^{2^{k-1},M} \end{array}\right] \varPsi ^{\alpha }(t)=P^{(\nu , \alpha )}\varPsi ^{\alpha }(t), \end{aligned}$$
(16)

where

$$\begin{aligned} E^{i,j} &= {\hat{E}}^{i,j} D^{-1},\\ {\hat{E}}^{i,j} &= \left[ {\hat{E}}_{1,0}^{i,j},{\hat{E}}_{1,1}^{i,j},\ldots ,{\hat{E}}_{1,M}^{i,j},\ldots ,{\hat{E}}_{2,0}^{i,j},{\hat{E}}_{2,1}^{i,j},\ldots ,{\hat{E}}_{2,M}^{i,j},\ldots ,\right. \nonumber \\&\left. {\hat{E}}_{2^{k-1},0}^{i,j},{\hat{E}}_{2^{k-1},1}^{i,j},\ldots ,{\hat{E}}_{2^{k-1},M}^{i,j}\right] ^{\mathrm{T}},\\ {\hat{E}}_{n,m}^{i,j} &= \left\langle I_{t}^{\nu }\psi _{i,j}^{\alpha }(t),\psi _{n,m}^{\alpha }(t)\right\rangle ,\nonumber \\&n=1,\ldots ,2^{k-1},\,\,\,m=0,\ldots ,M. \end{aligned}$$

To illustrate the calculation procedure, we choose (\(\nu =1\), \(\alpha =\frac{3}{2}\), \(k=1\), \(M=2\)). Thus, we have

$$\begin{aligned} P^{\left( 1, \frac{3}{2}\right) }=\left[ \begin{array}{ccc} \frac{3}{5}&{}\quad \frac{3\sqrt{3}}{20}&{}\quad -\frac{3\sqrt{5}}{220} \\ -\frac{3\sqrt{3}}{10}&{}\quad -\frac{9}{220}&{}\quad \frac{51\sqrt{15}}{1540}\\ \frac{6\sqrt{5}}{55}&{}\quad -\frac{39\sqrt{15}}{1540}&{}\quad -\frac{87}{5236} \end{array}\right] , \end{aligned}$$

also by choosing (\(\nu =\alpha =\frac{3}{2}\), \(k=1\), \(M=2\)), we have

$$\begin{aligned} P^{\left( \frac{3}{2}, \frac{3}{2}\right) }=\left[ \begin{array}{ccc} 0.3761263890318 &{}\quad 0.2171566719569&{}\quad 0\\ -0.3956383388839&{}\quad -0.1545696576686&{}\quad 0.05720570205399\\ 0.234689686294&{}\quad 0.02705211835561&{}\quad -0.04961323923435\\ \end{array}\right] , \end{aligned}$$

where

$$\begin{aligned} D=\left[ \begin{array}{ccc} \frac{2}{3}&{}\quad 0&{}\quad 0\\ 0&{}\quad \frac{2}{3}&{}\quad 0\\ 0&{}\quad 0&{}\quad \frac{2}{3}\\ \end{array}\right] . \end{aligned}$$

3.2 The Product Operational Matrix of F-BWFs

The product of two F-BWFs vectors satisfies in the following equation

$$\begin{aligned} \varPsi ^{\alpha }(t)\varPsi ^{\alpha \text {T}}(t)A\simeq {\tilde{A}} \varPsi ^{\alpha }(t), \end{aligned}$$
(17)

where A is an arbitrary \((M+1)\times 1\) vector and \({\tilde{A}}\) is a \((M+1)\times (M+1)\) matrix. For obtaining \({\tilde{A}}\), we can approximate \(\varPsi ^{\alpha }(t)\varPsi ^{\alpha \text {T}}(t)A\) by \(\varPsi ^{\alpha }(t)\) as follows

$$\begin{aligned} \varPsi ^{\alpha }(t)\varPsi ^{\alpha \text {T}}(t)A=[a_{0}(t),\ldots , a_{M}(t)]^{\mathrm{T}}, \end{aligned}$$
(18)

where

$$\begin{aligned} a_{i}(t)\simeq \sum _{n=1}^{2^{k-1}}\sum _{m=0}^{M} {\tilde{a}}_{i,n,m}\psi _{n,m}^{\alpha }(t) ={\tilde{A}}_{i}^{\mathrm{T}}\varPsi ^{\alpha }(t), \end{aligned}$$
(19)

and

$$\begin{aligned} \begin{array}{l} {\tilde{A}}_{i}=[{\tilde{a}}_{i,1,0},{\tilde{a}}_{i,1,1},\ldots ,{\tilde{a}}_{i,1,M},{\tilde{a}}_{i,2,0},{\tilde{a}}_{i,2,1},\ldots ,{\tilde{a}}_{i,2,M},\ldots ,\\ {\tilde{a}}_{i,2^{k-1},0},{\tilde{a}}_{i,2^{k-1},1},\ldots ,{\tilde{a}}_{i,2^{k-1},M}]^{\mathrm{T}}. \end{array} \end{aligned}$$
(20)

Using Eq. (19) we obtain

$$\begin{aligned} \displaystyle a_{i}^{k,j} &= \left\langle \sum _{n=1}^{2^{k-1}} \sum _{m=0}^{M}{\tilde{a}}_{i,n,m}\psi _{n,m}^{\alpha }(t), \psi _{k,j}^{\alpha }(t)\right\rangle \nonumber \\ &= \sum _{n=1}^{2^{k-1}} \sum _{m=0}^{M}{\tilde{a}}_{i,n,m}d_{n,m,k,j},\nonumber \\&k=1,\ldots ,2^{k-1},\,\,\, j=0,1,\ldots ,M, \end{aligned}$$
(21)

where

$$\begin{aligned} a_{i}^{k,j}=\langle a_{i},\psi _{k,j}^{\alpha }\rangle , d_{n,m,k,j}=\langle \psi _{n,m}^{\alpha }, \psi _{k,j}^{\alpha } \rangle . \end{aligned}$$
(22)

So by considering

$$\begin{aligned} A_{i} = & \left[ a_{i}^{1,0},a_{i}^{1,1},\ldots ,a_{i}^{1,M},a_{i}^{2,0},a_{i}^{2,1},\ldots ,\right. \nonumber \\ & \left. a_{i}^{2,M},\ldots ,a_{i}^{2^{k-1},0},a_{i}^{2^{k-1},1},\ldots ,a_{i}^{2^{k-1},M}\right] ^{\mathrm{T}}, \end{aligned}$$

we have

$$\begin{aligned} A_{i}^T={\tilde{A}}_{i}^T D, \end{aligned}$$

or

$$\begin{aligned} {\tilde{A}}_{i}^T=A_{i}^T D^{-1}, \end{aligned}$$

therefore the OM of multiplication is obtained.

To illustrate the calculation procedure, we choose (\(k=1\), \(M=2\), \(\alpha =1\)).

Thus, we have

$$\begin{aligned} A=[A_{1},A_{2}, A_{3}],\,{\tilde{A}}=\left[ \begin{matrix} A_{1}&{} A_{2}&{}A_{3} \\ A_{2}&{}A_{1}+\frac{2\sqrt{5}}{5}A_{3}&{}\frac{2\sqrt{5}}{5}A_{2}\\ A_{3}&{} \frac{2\sqrt{5}}{5}A_{2}&{} A_{1}+\frac{2\sqrt{5}}{7}A_{3} \end{matrix}\right] . \end{aligned}$$
(23)

Also, by choosing (\(k=1\), \(M=2\), \(\alpha =3/2\)), we have

$$\begin{aligned} {\tilde{A}}=\left[ \begin{matrix} 1.4142135A_{1}+1.5e^{-40}A_{2}&{} 1.5e^{-40}A_{1}+1.4142135A_{2}&{}0&{}0 \\ 1.5e^{-40}A_{1}+1.4142135A_{2}&{}1.4142135A_{1}+1.5e^{-16}A_{2}&{}0&{}0\\ 0&{} 0&{}1.4142135A_{3}- 1.2e^{-39}A_{4}&{} 1.4142135A_{4}\\ 0&{}0&{}- 1.01e^{-40}A_{3}+1.4142135A_{4}&{}1.4142135A_{3}+1.5e^{-16}A_{4} \end{matrix}\right] . \end{aligned}$$
(24)

3.3 Convergence Analysis

The following theorems will be useful in subsequent results. Here, we assume \(D^{-1}=[d_{n,m}^{i,j}]\), \(\max|d_{n,m}^{i,j}|=M_{2}\).

Theorem 1

Suppose \(f\in L^{2}[0,1]\)be a continuous function and \(|f(t)|\le M_{1}\), \(\forall t\in [0,1]\)and \(f(t)\simeq \displaystyle \sum\nolimits_{n=1}^{2^{k-1}}\sum\nolimits_{m=0}^{M}\displaystyle c_{n, m}\psi _{n, m}^{\alpha }(t)\). Then, we have

$$\begin{aligned} \displaystyle |c_{n,m}|<\sum _{i=1}^{2^{k-1}}\sum _{j=0}^{M} \frac{16j!M_{1}M_{2}A}{(2\pi )^{j+1}2^{\frac{k-1}{2}}\alpha }, \end{aligned}$$
(25)

where

$$\begin{aligned} A=\displaystyle \frac{1}{\sqrt{\frac{(-1)^{j-1}(j!)^{2}}{(2j)!}\beta _{2j}}}. \end{aligned}$$

Proof

Suppose that \(f^{*}(t)\) is approximate of f(t) by using F-BWFs. Then, using Eq. (12) we have

$$\begin{aligned} \displaystyle f^{*}(t)=\sum _{n=1}^{2^{k-1}}\sum _{m=0}^{M} c_{n, m}\psi _{n, m}^{\alpha }(t)=C^{\mathrm{T}}\varPsi ^{\alpha }(t), \end{aligned}$$

where \(C^T=F^T D^{-1}\). Then, we get

$$\begin{aligned} \displaystyle c_{n,m}=\sum _{i=1}^{2^{k-1}}\sum _{j=0}^{M} f_{i,j}d_{n,m}^{i,j},\,f_{i,j}=\langle f,\psi _{i,j}^{\alpha } \rangle , \end{aligned}$$

and

$$\begin{aligned} f_{i,j} &= \int _{0}^{1}f(t)\psi _{i,j}^{\alpha }(t)t^{\alpha -1}\hbox {d}t\\ &= \int _{(\frac{i-1}{2^{k-1}})^{\frac{1}{\alpha }}}^{(\frac{i}{2^{k-1}}) ^{\frac{1}{\alpha }}} 2^{\frac{k-1}{2}}A f(t)B_{j}(2^{k-1}t^{\alpha }-i+1) t^{\alpha -1}\hbox {d}t. \end{aligned}$$

Here, by changing the variable \(2^{k-1}t^{\alpha }-i+1=x\), we achieve

$$\begin{aligned} f_{i,j}=\displaystyle \int _{0}^{1}\frac{A}{2^{\frac{k-1}{2}}\alpha } f\left( \left( \frac{x+i-1}{2^{k-1}}\right) ^{\frac{1}{\alpha }}\right) \beta _{j}(x)\hbox {d}x. \end{aligned}$$

We know that if \(|f(x)|\le M_{1}\), \(\forall x\in [0,1]\) then, \(\left|f(x^{\frac{1}{\alpha }})\right|\le M_{1}\) and using the following property of Bernoulli polynomials (Sahu and Saha Ray 2017)

$$\begin{aligned} \int _{0}^{1}|\beta _{j}(t)|\hbox {d}t<\frac{16 j!}{(2\pi )^{j+1}},j\ge 0. \end{aligned}$$

we have

$$\begin{aligned} |f_{i,j}|\displaystyle &\le \frac{A}{2^{\frac{k-1}{2}}\alpha }\int _{0}^{1} \left|f\left( \left( \frac{x+i-1}{2^{k-1}}\right) ^{\frac{1}{\alpha }}\right) \right| |\beta _{j}(x)|\hbox {d}x\\ &< \frac{16j!M_{1}A}{(2\pi )^{j+1}2^{\frac{k-1}{2}}\alpha }. \end{aligned}$$

On the other hand, \(\max|d_{n,m}^{i,j}|=M_{2}\), so \(|d_{n,m}^{i,j}|\le M_{2}\). Considering the above discussion, we get the following relation

$$\begin{aligned} \displaystyle |c_{n,m}| &< |\sum _{i=1}^{2^{k-1}}\sum _{j=0}^{M} f_{i,j}d_{n,m}^{i,j}| \le \sum _{i=1}^{2^{k-1}}\sum _{j=0}^{M}\\ |f_{i,j}| |d_{n,m}^{i,j}| &< \sum _{i=1}^{2^{k-1}}\sum _{j=0}^{M} |f_{i,j}|M_{2}< \\&\displaystyle \sum _{i=1}^{2^{k-1}}\sum _{j=0}^{M} \frac{16j!M_{1}M_{2}A}{(2\pi )^{j+1}2^{\frac{k-1}{2}}\alpha }. \end{aligned}$$

Theorem 2

Assume that \(f\in L^{2}[0,1]\)be a continuous function and \(|f(t)|\le M_{1}\), \(\forall t\in [0,1]\). If \(f^{*}(t)\)be the truncated F-BWFs expansion then, the norm of truncated error E(t) can be bounded as

$$\begin{aligned} \displaystyle \Vert E(t)\Vert _{2} &= \Vert f(t)-f^{*}(t)\Vert _{2}\nonumber \\ &\le \sum _{m=0}^{M} \sum _{n=2^{k-1}+1}^{\infty }B_{i,j}+\sum _{m=M+1}^{\infty } \sum _{n=1}^{\infty }B_{i,j}, \end{aligned}$$
(26)

where

$$\begin{aligned} B_{i,j}=\displaystyle \sum _{j=0}^{M}\sum _{i=1}^{2^{k-1}} \frac{16j!M_{1}M_{2}A}{(2\pi )^{j+1}2^{\frac{k-1}{2}}\alpha ^2}, A=\displaystyle \frac{1}{\sqrt{\frac{(-1)^{j-1}(j!)^{2}}{(2j)!}\beta _{2j}}}. \end{aligned}$$

Proof

Using Eq. (11) if \(f^{*}(t)\) be the truncated F-BWFs expansion, then the truncated error term can be computed as

$$\begin{aligned} \displaystyle E(t)=f(t)-f^{*}(t) &= \sum _{m=0}^{M}\sum _{n=2^{k-1}+1}^{\infty }c_{n,m}\psi _{n, m}^{\alpha }(t)\nonumber \\&+\sum _{m=M+1}^{\infty }\sum _{n=1}^{\infty }c_{n,m}\psi _{n, m}^{\alpha }(t), \end{aligned}$$

then, we derive

$$\begin{aligned} \Vert E(t)\Vert _{2} &\le \Vert f(t)-f^{*}(t)\Vert _{2}\le \left\| \displaystyle \sum _{m=0}^{M} \sum _{n=2^{k-1}+1}^{\infty }c_{n,m}\psi _{n, m}^{\alpha }(t)\right\| _{2}\nonumber \\&+\left\| \displaystyle \sum _{m=M+1}^{\infty } \sum _{n=1}^{\infty }c_{n,m}\psi _{n, m}^{\alpha }(t)\right\| _{2}\nonumber \\ &\le \displaystyle \sum _{m=0}^{M}\sum _{n=2^{k-1}+1}^{\infty }\left\| c_{n,m}\psi _{n, m}^{\alpha }(t)\right\| _{2}\nonumber \\&+\displaystyle \sum _{m=M+1}^{\infty }\sum _{n=1}^{\infty }\left\| c_{n,m}\psi _{n, m}^{\alpha }(t)\right\| _{2}\nonumber \\ &= \displaystyle \sum _{m=0}^{M}\sum _{n=2^{k-1}+1}^{\infty }| c_{n,m}|\left\| \psi _{n, m}^{\alpha }(t)\right\| _{2}\nonumber \\&+\displaystyle \sum _{m=M+1}^{\infty }\sum _{n=1}^{\infty }| c_{n,m}|\left\| \psi _{n, m}^{\alpha }(t)\right\| _{2}. \end{aligned}$$

Moreover, we have

$$\begin{aligned} \displaystyle \Vert \psi _{n, m}^{\alpha }(t)\Vert _{2} &= \int _{0}^{1}(\psi _{n, m}^{\alpha }(t))^2t^{\alpha -1}\hbox {d}t\nonumber \\ &= \int _{(\frac{n-1}{2^{k-1}})^{\frac{1}{\alpha }}}^{(\frac{n}{2^{k-1}})^{\frac{1}{\alpha }}}(2^{\frac{k-1}{2}}A \beta _{m}(2^{k-1}t^{\alpha }-n+1))^2t^{\alpha -1}\hbox {d}t. \end{aligned}$$

By changing the variable \(2^{k-1}t^{\alpha }-n+1=x\), we get

$$\begin{aligned} \displaystyle \Vert \psi _{n, m}^{\alpha }(t)\Vert _{2} &= \int _{0}^{1}2^{k-1}A^2 \beta _{m}(x)^2\frac{1}{2^{k-1}\alpha }\hbox {d}x=\frac{A^2}{\alpha }\int _{0}^{1} \beta _{m}(x)^2 \hbox {d}x\nonumber \\ \displaystyle &= A^2\frac{1}{\alpha }(-1)^{m-1}\frac{(m!)^2}{(2m)!}\beta _{2m}=\frac{1}{\alpha }. \end{aligned}$$

Thus, using the above equation and Theorem 1, we have

$$\begin{aligned} \displaystyle \Vert E(t)\Vert _{2} &\le \sum _{m=0}^{M}\sum _{n=2^{k-1}+1}^{\infty }\frac{1}{\alpha } |c_{n,m}|+\sum _{m=M+1}^{\infty }\sum _{n=1}^{\infty }\frac{1}{\alpha }|c_{n,m} |\\ &\le \displaystyle \sum _{m=0}^{M} \sum _{n=2^{k-1}+1}^{\infty }B_{i,j} +\sum _{m=M+1}^{\infty }\sum _{n=1}^{\infty }B_{i,j}, \end{aligned}$$

where

$$\begin{aligned} B_{i,j}=\displaystyle \sum _{j=0}^{M} \sum _{i=1}^{2^{k-1}}\frac{16j!M_{1}M_{2}A}{(2\pi )^{j+1}2^{\frac{k-1}{2}} \alpha ^2}. \end{aligned}$$

4 Description of the Proposed Method

In this section, the F-BWFs expansion and their OM of fractional derivative are used together to solve the following FOCPs with inequality constraints

(27)

where x(t) and u(t) are state and control functions.

For do this, we expand by the F-BWFs as

(28)

By integrating from order \(\nu \) on both sides of Eq. (28) with respect to t, considering Eq. (15) and the initial conditions expressed in Eq. (27), we get

$$\begin{aligned} x(t) &= I_{t}^{\nu }( C^T \varPsi ^{\alpha }(t))+\sum _{i=0}^{[\nu ]} \frac{x_{i}t^{i}}{i!}\nonumber \\ &= C^T P^{(\nu ,\alpha )} \varPsi ^{\alpha }(t) +\sum _{i=0}^{[\nu ]}\frac{x_{i}t^{i}}{i!}\nonumber \\ &= C^T P^{(\nu ,\alpha )} \varPsi ^{\alpha }(t)+d^T \varPsi ^{\alpha }(t), \end{aligned}$$
(29)

where

$$\begin{aligned} \sum _{i=0}^{[\nu ]}\frac{x_{i}t^{i}}{i!} \simeq d^T \varPsi ^{\alpha }(t), \end{aligned}$$

and we suppose \(u(t)\simeq U^T \varPsi ^{\alpha }(t)\).

By substituting Eq. (29) and \(u(t)\simeq U^T \varPsi ^{\alpha }(t)\) in Eq. (27), our problem is converted to following problem

$$\begin{aligned}&\min \,{\mathcal {J}}\nonumber \\&\quad =\int _{0}^{1}{\mathcal {F}}\left( t,C^T P^{(\nu ,\alpha )} \varPsi ^{\alpha }(t)+d^T \varPsi ^{\alpha }(t),U^T \varPsi ^{\alpha }(t)\right) \hbox {d}t,\nonumber \\&C^T \varPsi ^{\alpha } (t)\nonumber \\&\quad =\mathcal {G}\left( t,C^T P^{(\nu ,\alpha )} \varPsi ^{\alpha }(t)+d^T \varPsi ^{\alpha }(t),U^T \varPsi ^{\alpha }(t)\right) ,\nonumber \\&\qquad 0< \nu ,\,\,\,t\in [0,1],\nonumber \\&S_{j}(t,C^T P^{(\nu ,\alpha )} \varPsi ^{\alpha }(t)+d^T \varPsi ^{\alpha }(t),U^T \varPsi ^{\alpha }(t))\le 0,\nonumber \\&\qquad j=1,\ldots ,s. \end{aligned}$$
(30)

We convert the inequality constraint to the equality constraint by slack variables as

$$\begin{aligned} S_{j}(t,C^T P^{(\nu ,\alpha )} \varPsi ^{\alpha }(t)+d^T \varPsi ^{\alpha }(t),U^T \varPsi ^{\alpha }(t))+Z_{j}^{2}(t)= 0. \end{aligned}$$
(31)

By expanding \(Z_{j}(t)\) by F-BWFs and using the product OM of F-BWFs Eq. (17), we have

$$\begin{aligned}&S_{j}(t,C^T P^{(\nu ,\alpha )} \varPsi ^{\alpha }(t)+d^T \varPsi ^{\alpha }(t),U^T \varPsi ^{\alpha }(t))\nonumber \\&\quad +z_{j}^T{\tilde{z}}_{j}\varPsi ^{\alpha }(t)= 0. \end{aligned}$$
(32)

Applying the above equations and removing \(\varPsi ^{\alpha }(t)\) from Eq. (30), we obtain

$$\begin{aligned}&\min \,{\mathcal {J}}=\int _{0}^{1}{\mathcal {F}}\left( t,C^T P^{(\nu ,\alpha )} \varPsi ^{\alpha }(t)+d^T \varPsi ^{\alpha }(t),U^T \varPsi ^{\alpha }(t)\right) \hbox {d}t,\nonumber \\&C^T =\mathcal {G}\left( t,C^T P^{(\nu ,\alpha )} +d^T,U^T \right) ,\qquad 0< \nu ,\quad t\in [0,1],\nonumber \\&S_{j}(t,C^T P^{(\nu ,\alpha )} +d^T,U^T )+z_{j}^T{\tilde{z}}_{j} =0,\qquad j=1,\ldots ,s. \end{aligned}$$
(33)

Now, by using the method of Lagrange multipliers method, we have

$$\begin{aligned} {\bar{J}} &= {\mathcal {J}}+\left( C^T -\mathcal {G}\left( t,C^T P^{(\nu ,\alpha )}+d^T,U^T \right) \right) \lambda \nonumber \\&+\left( S_{j}(t,C^T P^{(\nu ,\alpha )}+d^T,U^T )+z_{j}^T{\tilde{z}}_{j}\right) \delta _{j}, \end{aligned}$$
(34)

where the vectors \(\lambda \) and \(\delta _{j}\) are the unknown Lagrange multipliers of dimension \(2^{k-1}(M+1)\times 1\). Also, the necessary conditions for the extremum are given by following system

$$\begin{aligned}&\frac{\partial {\bar{J}}}{\partial C}=0, \frac{\partial {\bar{J}}}{\partial U}=0, \frac{\partial {\bar{J}}}{\partial Z}=0, \frac{\partial {\bar{J}}}{\partial \lambda }=0,\nonumber \\&\frac{\partial {\bar{J}}}{\partial \delta _{j}}=0,\quad j=1,\ldots ,s. \end{aligned}$$
(35)

We can determine C and U by means of packages such as MATLAB, and we obtain the approximate solution of Eq. (27).

5 Illustrative Test Problems

In this section, some numerical examples are provided to demonstrate the efficiency and reliability of the proposed method. All the numerical computations have been done using MATLAB 2018a.

Example 1

Consider the following FOCP with inequality constraint described by (Lotfi 2019)

(36)

For this problem, the values \(x(t)=-t^{\frac{3}{2}}\) and \(u(t)=1-t^{\frac{3}{2}}\) are the minimizing solutions for the state and control variables, respectively, and the performance index \({\mathcal {J}}\) has the minimum value of \({\mathcal {J}}=-0.7\). Let

(37)

then

$$\begin{aligned} x(t)=C^T P^{(\frac{3}{2} ,\alpha )}\varPsi ^{\alpha }(t),u(t)=U^T\varPsi ^{\alpha }(t), \end{aligned}$$
(38)

where C and U are unknown coefficient vectors to be calculated. By substituting Eq. (38) into Eq. (36), we have

$$\begin{aligned}&\min \,{\mathcal {J}}=\int _{0}^{1} \left( \left( C^T P^{\left( \frac{3}{2} ,\alpha \right) }\varPsi ^{\alpha }(t)\right) ^2 +\left( U^T\varPsi ^{\alpha }(t)\right) ^2\right. \nonumber \\&\qquad \qquad \qquad \qquad +2t^{\frac{3}{2}}\left( C^T P^{\left( \frac{3}{2} ,\alpha \right) }\varPsi ^{\alpha }(t)\right) \\&\qquad \qquad \qquad \qquad \left. -2\left( 1-t^{\frac{3}{2}}\right) \left( U^T\varPsi ^{\alpha }(t)\right) \right) \hbox {d}t, \end{aligned}$$

subject

$$\begin{aligned} C^T\varPsi ^{\alpha }(t)=\frac{3\sqrt{\pi }}{4}(C^T P^{(\frac{3}{2} ,\alpha )}\varPsi ^{\alpha }(t)-U^T\varPsi ^{\alpha }(t)), \end{aligned}$$

and also, we have \(x(t)\le 0\) and \(0\le u(t)\le 1\). Therefore, by using slack variables, we have

$$\begin{aligned} x(t)+s^2(t)=0,\quad u(t)-z^2(t)=0,\quad u(t)+w^2(t)=1, \end{aligned}$$

where \(s(t)=S^T\varPsi ^{\alpha }(t)\), \(z(t)=Z^T\varPsi ^{\alpha }(t)\), \( w(t)=W^T\varPsi ^{\alpha }(t)\), \(1=E^T\varPsi ^{\alpha }\) and S, Z and W are unknown coefficient vectors. Thus,

$$\begin{aligned}&C^T P^{(\frac{3}{2} ,\alpha )}\varPsi ^{\alpha }(t)+S^T\varPsi ^{\alpha }(t)\varPsi ^{\alpha }(t)^T S=0,\\&U^T \varPsi ^{\alpha }(t)-Z^T\varPsi ^{\alpha }(t)\varPsi ^{\alpha }(t)^T Z=0,\\&U^T \varPsi ^{\alpha }(t)+W^T\varPsi ^{\alpha }(t)\varPsi ^{\alpha }(t)^T W=E^T\varPsi ^{\alpha }, \end{aligned}$$

and

$$\begin{aligned}&C^T P^{(\frac{3}{2} ,\alpha )}\varPsi ^{\alpha }(t)+S^T{\tilde{S}}\varPsi ^{\alpha }(t)=0,\nonumber \\&U^T \varPsi ^{\alpha }(t)-Z^T{\tilde{Z}}\varPsi ^{\alpha }(t)=0,\nonumber \\&U^T \varPsi ^{\alpha }(t)+W^T{\tilde{W}}\varPsi ^{\alpha }(t)=E^T\varPsi ^{\alpha }. \end{aligned}$$
(39)

By removing \(\varPsi ^{\alpha }(t)\) from both side of Eq. (39), we have

$$\begin{aligned}&C^T P^{(\frac{3}{2},\alpha )}+S^T{\tilde{S}}=0,\quad U^T -Z^T{\tilde{Z}}=0,\nonumber \\&U^T +W^T{\tilde{W}}-E^T=0. \end{aligned}$$
(40)

Now Eq. (36) is converted to

$$\begin{aligned}&\min \,{\mathcal {J}}=\int _{0}^{1} \left( \left( C^T P^{(\frac{3}{2} ,\alpha )}\varPsi ^{\alpha }(t)\right) ^2+\left( U^T\varPsi ^{\alpha }(t)\right) ^2\right. \nonumber \\&\qquad \left. +2t^{\frac{3}{2}}\left( C^T P^{\left( \frac{3}{2} ,\alpha \right) }\varPsi ^{\alpha }(t)\right) -2\left( 1-t^{\frac{3}{2}}\right) (U^T\varPsi ^{\alpha }(t))\right) \hbox {d}t,\nonumber \\&C^T-\frac{3\sqrt{\pi }}{4}\left( C^T P^{(\frac{3}{2},\alpha )}-U^T\right) =0,\nonumber \\&C^T P^{\left( \frac{3}{2},\alpha \right) }+S^T{\tilde{S}}=0,\nonumber \\&U^T -Z^T{\tilde{Z}}=0,\nonumber \\&U^T +W^T{\tilde{W}}-E^T=0. \end{aligned}$$
(41)

To solve this problem, we use the proposed method with different values of k and M. Table 1 lists the values obtained for the performance index \({\mathcal {J}}\) with \(k=1\), \(M=1\) and \(k=1\), \(M=2\) for different values of \(\alpha \). In Table 2, the results for \({\mathcal {J}}\) of this paper and Epsilon penalty with Ritz method are compared. Table 3 contains the absolute errors in the state and control variables with \(k=1\) and \(M=1\). Figure 1 demonstrates the behaviour of the numerical solutions for the state variable x(t) and the control variable u(t) with \(k=1\), \( M = 2\) and \(\alpha =1\) and \(\alpha =\frac{3}{2}\). From Tables 1, 2, 3 and Fig. 1, we verify that the F-BWFs method provides approximate solutions with acceptable accuracy.

Table 1 The value of the performance index \({\mathcal {J}}\) with \(k=1\), \(M=1\) and \(k=1\), \(M=2\) for Example 1
Table 2 The estimated values of \({\mathcal {J}}\) using the Ritz method and the F-BWFs method for \(\nu =\alpha =\frac{3}{2}\) for Example 1
Table 3 The absolute errors in the state and control variables with \(k=1\), \(M=1\) and \(\nu =\alpha =\frac{3}{2}\) for Example 1
Fig. 1
figure 1

The behaviour of the approximate state and control variables x(t) and u(t) with \(k=1\), \( M=2\) and \(\alpha =1, \frac{3}{2}\) for Example 1

Example 2

Consider the following FOCP with inequality constraint described by (Kirk 1970)

(42)

For this problem, the performance index \({\mathcal {J}}\) has the minimum value of \({\mathcal {J}}=8.07054\) with \(\nu =1\). To solve this problem, we use the proposed method with different values of k and M. Figure 2 demonstrates behaviour of the state functions for different values of \(\nu \) with \(k= 3\), \(M = 2\) and \(\alpha =1\). In Table 4, we compared the results for \({\mathcal {J}}\) that \(\nu =\alpha =1\) of the proposed method with others methods. Table 5 shows the estimated value of \({\mathcal {J}}\) with different values of \(\nu \), \(\alpha \) and \(k = M = 2\). Table 6 shows estimated value of u(t) with \(\nu =\alpha =1\). From these tables and figure one can see that the F-BWFs method is efficient and accurate.

Fig. 2
figure 2

The behaviour of the approximate state variables \(x_{1}(t)\), \(x_{2}(t)\) for different values of \(\nu \) for Example 2 with \(k=3\), \(M=2\) and \(\alpha =1\)

Table 4 The values of the performance index \({\mathcal {J}}\) with \(\nu =\alpha =1\) for Example 2
Table 5 The estimated values of the performance index \({\mathcal {J}}\) for different values of \(\nu \), \(\alpha \) and \(k=M=2\) for Example 2
Table 6 The estimated value of u(t) with \(\nu =\alpha =1\) for Example 2

Example 3

Consider the following FOCP with inequality constraint described by (Hager and Lanculescu 1984)

(43)

For this problem, the exact values for state and control variables x(t), u(t) are

$$\begin{aligned} x(t)=\displaystyle \left\{ \begin{array}{ll} \displaystyle t+\frac{1+3e}{2(1-e)}&{} 0\le t \le \frac{1}{2},\\ \displaystyle \frac{e^t+e^{2-t}}{\sqrt{e}(1-e)} &{} \frac{1}{2}\le t \le 1, \end{array}\right.\quad u(t)=\displaystyle \left\{ \begin{array}{cc} \displaystyle 1&{} 0\le t \le \frac{1}{2},\\ \displaystyle \frac{e^t-e^{2-t}}{\sqrt{e}(1-e)} &{} \frac{1}{2}\le t \le 1, \end{array}\right. \end{aligned}$$

and the performance index \({\mathcal {J}}\) has the minimum value of \({\mathcal {J}}=2\frac{55e^2-2e^{-5}}{48(e-1)^2}\simeq 5.5879556\) with \(\alpha =\nu =1\).

To solve this problem, similar to the previous examples, we use the proposed method with different values of K and M. Table 7 lists the values obtained for the performance index \({\mathcal {J}}\) with \(k=1\), \(M=1\) and \(k=1\), \(M=2\) for different values of \(\alpha \), \(\nu \). In Table 8, the results for \({\mathcal {J}}\) of this paper and other methods are compared. Figure 3 demonstrates the behaviour of the numerical solutions for the state variable x(t) and the control variable u(t) with \(k=2\), \( M = 2\) and \(\alpha =1\), for different values of \(\nu = 0.7, 0.8, 0.9, 1\).

Table 7 The estimated values of the performance index \({\mathcal {J}}\) for different values of \(\alpha \), \(\nu \) for Example 3
Table 8 The values of the performance index \({\mathcal {J}}\) with \(\nu =1\) for Example 3
Fig. 3
figure 3

The behaviour of the approximate state and control variables x(t) , u(t) for some different values of \(\nu \) for Example 3 with \(k=2\), \(M=2\)

Example 4

Consider the following FOCP with inequality constraint described by (Lotfi 2019)

(44)

For this problem, the exact solutions are \({\mathcal {J}}=-0.25\), \(x(t)=-t^{\frac{3}{2}}\), \(u(t)=\frac{1}{2}+\frac{1}{2}sin^2(t^{\frac{3}{2}})\). To solve this problem, we use the proposed method with different values for k and M. Table 9 lists the values obtained for the performance index \({\mathcal {J}}\) with \(k=1,2\), \(M=1,2\) for \(\alpha =1\) and \(\alpha =\frac{3}{2}\). Figure 4 demonstrates the behaviour of the numerical solutions for the state variable x(t) and the control variable u(t) with \(k=2\), \( M = 2\) and \(\alpha =1\) and \(\alpha =\frac{3}{2}\). From Table 9 and Fig. 4 we verify that the F-BWFs method provides approximate solutions with acceptable accuracy and we see the good effect of the fractional order \(\alpha \) for F-BWFs basis.

Table 9 The value of performance index \({\mathcal {J}}\) with \(k=1,2\), \(M=1,2\) for Example 4
Fig. 4
figure 4

The behaviour of the approximate state and control variables x(t), u(t) for Example 4 with \(k=2\), \(M=2\) and \(\alpha =1, \frac{3}{2}\)

Example 5

Consider the following FOCP with inequality constraint

(45)

For this problem, the exact solutions with \(\nu =1\) are \({\mathcal {J}}=0\), \(x(t)=-t^{2}\), \(u(t)=t^{\frac{4}{3}}\). To solve this problem, we use the proposed method with different values for k and M. Table 10 shows the estimated value of \({\mathcal {J}}\) with \(\nu =1\) and different values of \(\alpha \), k and M. Table 11 shows the estimated value of \({\mathcal {J}}\) with \(\alpha =1\) and different values of \(\nu \), for \(k=3\), \(M=2\). Figure 5 demonstrates behaviour of the state variable x(t) and the control variable u(t) for different values of \(\nu \) with \(k= 3\), \(M = 2\) and \(\alpha =1\). From these tables and figure one can see that the F-BWFs method is efficient and accurate. In this exam, like the other examples, the effect of the fractional order of the used basis is visible.

Figure 5 shows the behaviour of the numerical solutions of the problem at \(k=3\), \(M = 2\), for different values of \(\nu = 0.7, 0.8, 0.9, 1\).

Table 10 The value of performance index \({\mathcal {J}}\) with different k, M for Example 5
Table 11 The estimated value of \({\mathcal {J}}\) for different \(\nu \) with \(\alpha =1\) and \(k=3\), \(M=2\) for Example 5
Fig. 5
figure 5

The behaviour of the approximate state and control variables x(t), u(t) for some different values of \(\nu \) for Example 5 with \(k=3\), \(M=2\) and \(\alpha =1\)

6 Conclusion

This paper introduced a new efficient numerical method based on the F-BWFs and the Lagrange multipliers for solving FOCPs with inequality constraint. The main idea consists of expanding the solution by means of F-BWFs. The FOCPs was successfully reduced to a system of algebraic equations using the F-BWFs basis, their operational matrices and Lagrange multipliers. From the numerical results, it is obvious that the proposed method provides better accuracy and efficiency than other methods.