338 Β© 2025 The Author(s). Published by College of Education for Pure Science (Ibn Al-Haitham), University of Baghdad. This is an open-access article distributed under the terms of the Creative Commons Attribution 4.0 International License A Numerical Study for Solving Fractional-Order Systems of Optimal Control Using B-Cubic Spline Oday Al-Shaher 1 , M. Mahmoudi 2 and Mohammed S. Mechee 3* 1,2Department of Mathematics, University of Qom, Qom, Iran 3Information Technology Research and Development Centre, University of Kufa, Najaf, Iraq. 3The General Directorate of Education in Najaf, Najaf, Iraq *Corresponding Author. Received: 9 July 2023 Accepted: 1 October 2023 Published: 20 April 2025 doi.org/10.30526/38.2.3665 Abstract Using B-cubic spline base, the numerical solutions of optimal control of dynamical systems of fractional-order have been examined. In order to determine the dynamical system's control function through time whilst optimizing an objective optimal function. There are numerous applications for the optimal control system in science, engineering and the one branch of applied mathematics operations research. The primary goal of this study is to approximate the numerical solutions for a fractional-order optimal control systems in both free and non-free terminal time (TT). The collocation approach considers a numerical solution to this problem by using a B-cubic spline base. A numerical comparison has been introduced between the analytical solutions with numerical solutions using the proposed method. Exemplifications of implementations using various computer simulations revealed that the proposed method is both accurate and efficient. Keywords: Quasi-linear, Fractional Differential Equations; Spline; B-cubic, Collocation, DEs; ODEs, FDEs. 1. Introduction One of the most significant subfields of applied mathematics is differential equations (DE), which finds use in engineering as well as science. The majority of mathematical modeling in different fields of engineering and science uses various types of DEs. Due to its significance in precisely describing a variety of events, such as anomalous transport, psychology, finance, ultrasonic wave, viscoelastic, anomalous diffusion, and fractional differential equations (FDEs) have received significant attention recently. A comprehensive study has been performed on numerous classical or modern analytical and numerical methods for solving DEs (1). In the twentieth century, significant research on fractional calculus was published in engineering and scientific journals. The historical development of fractional calculus is examined through a https://creativecommons.org/licenses/by/4.0/ https://creativecommons.org/licenses/by/4.0/ https://orcid.org/0000-0001-5129-1619 mailto:odayi.alshaher@gmail.com https://orcid.org/0000-0002-1607-9329 mailto:m.mahmoudi@qom.ac.ir https://orcid.org/0000-0002-6522-1811 mailto:mohammeds.abed@uokufa.edu.iq IHJPAS. 2025, 38(2) 339 variety of applications in various areas of applied mathematics. As a result, many mathematicians are interested in developing numerical strategies for solving FDEs, such as spectral methods, differential transform methods, finite element approximation, the Legendre wavelets method, and compact difference schemes. A fractional-order derivative component is involved in the differential equation controlling the dynamic system in the fractional optimal control (FOC) issue, which is an optimal control problem. FOC problems have been awarded high marks for their wide range of applications in a variety of fields (2). The Riemann-Liouville derivatives used numerous analytical and numerical techniques to solve distinguished FOC problem types (3) presented a broad characterization of FOC issues as well as a way for solving these problems using the variational virtual method and the Lagrange multiplier technique. It is commonly used in the domains of operations research, engineering, and science. A dynamic system might be a spacecraft getting controls that correspond to rocket engines, with the purpose of reaching the moon's surface with the least amount of energy. Additionally, fractional dynamics, a subfield of mathematics and physics, studies the behavior of systems and objects by differentiating fractional orders. Numerous experts, including mathematicians, physicists, applied researchers, and practitioners, showed interest in the fresh knowledge gained from investigations on fractional dynamical systems. A literature evaluation on numerical analysis of fractional-order optimal controls systems (FOCPs) is also required. It is additionally essential for conducting a literature review on numerical analysis of (FOCPs). For FOCPs, Agrawa (3) performed a formulation and numerical methodology for this problem. Some forms of FOCPs were numerically solved by (4,5). Furthermore, Akbarian and Keyanpour (6) proposed a new approach for numerically solving FOCPs. Bhrawy et al. (7) established a practical numerical technique for the quadratic performance index solution for multidimensional FOCPs. Parallel to these researchers, Sweilam et al. used the shifted Chebyshev polynomials of second type (8) but a discrete-technique for solving FOCPs introduced by Almeida and Torres (9). Following that, they solved certain types of FOCPs using collocation method with Legendre spectral, and a number of authors examined a variety of FDEs. Moreover, Ahmad and El-Khazali (10) introduced a dynamical model of fractional-order, and David et al. while (11) investigated fractional-order calculus. Lastly, some authors studied the solutions of optimal control systems using different approaches (12-19). The direct searching method is being investigated in order to overcome the unconstrained optimization difficulties. However, the collocation method with the base of a B-cubic spline was implemented to solve the problem FOCPs in both cases of (TT). Furthermore, the direct searching method is being investigated in order to overcome the unconstrained optimization difficulties. In this paper, we have approximated the numerical solutions for a fractional-order optimal control systems in both free and non-free terminal time (TT). After all, the collocation approach considers a numerical solution to this problem by using a B-cubic spline base. Accordingly, the computations in the proposed method are calculated the methodology for the well-known Hooke and Jeeves approach. 2. Preliminary We have discussed some background knowledge and concepts concerning the research problem in this section. IHJPAS. 2025, 38(2) 340 2.1 Fractional Derivatives Background information and basic definitions with regard to the study's problem have been provided. This section provides the essential definitions of fractional derivatives including the terminal times (TT) of FOCPs. Using the Riemann-Liouville derivative formulation, the fractional derivative of the function f is defined as follows for 𝜎 ∈ [𝑛 βˆ’ 1, 𝑛), and 𝑛 ∈ 𝑁, Definition 2.1. The following are left and right sides of the fractional-integral Riemann-Liouville (RL) operator of order 𝜎 > 0: aDΟ„ Οƒy(Ο„) = 1 Ξ“(nβˆ’Οƒ) dn dΟ„n ∫ y(Ο„) (Ο„βˆ’π‘₯)nβˆ’Οƒβˆ’1 Ο„ a dπ‘₯, (1) and aDΟ„ Οƒy(Ο„) = 1 Ξ“(nβˆ’Οƒ) dn dΟ„n ∫ (Ο„ βˆ’ s)nβˆ’Οƒβˆ’1 Ο„ a y(s)ds, (2) Caputo derivative of the function 𝑓 ; for 𝜎 ∈ [𝑛 βˆ’ 1, 𝑛), is defined as follows: Definition 2.2.The fractional-Caputo-derivative has the form as follows aDΟ„ σ𝑓 (Ο„) = 1 Ξ“(nβˆ’Οƒ) ∫ 𝑓(𝑛) (x) (Ο„βˆ’π‘₯)Οƒβˆ’nβˆ’1 Ο„ a dx, (3) The fractional-type derivatives and integrals for Οƒ > 0; n βˆ’ 1 ≀ Οƒ < n have the property of linearity where 𝑓 ∢ [π‘Ž;∞) β†’ β„œ and π‘Ž > 0. 2.2 A Quasi-Linear FODEs of First-Order The quasi linear First-Order fractional ordinary differential equation is written as follow: π·βˆπ‘’(𝜏) = 𝛷(𝜏, 𝑒(𝜏), π‘’κžŒ(𝜏)) ; 0 < 𝜏 < 𝑏, 0 < ∝ < 1 (4) with the initial condition (IC) 𝑒(0) = πœ‰0. (5) 2.2.1 Boundary Value Problem of Second-Order FODEs. Consider the following quasi-linear second-order fractional differential equation: π·βˆπ›·(Ο›) = πœ“(𝜏, 𝛷(Ο›),π›·κžŒ(Ο›),π›·κžŒκžŒ(Ο›)) ; 0 < Ο› < 1, 0 <∝< 2 (6) with the boundary conditions (BCs) 𝛷(0) = πœ‰0 ; 𝛷(1) = πœ‰1. (7) 2.3. Spline Functions We reviewed the cubic B-spline basis and how it may be utilized to solve ODEs in the next section. Spline refers to a comprehensive class of smooth functions used in data interpolation applications (20). In general, the spline function for interpolation is derived by reducing the appropriate roughness measures while maintaining the interpolation criteria in mind. Smoothing splines are the best base for interpolation the solution of differential equations. The base 𝛷(Ο›) = {𝛷1(Ο›), 𝛷2(Ο›), … , 𝛷𝑛(Ο›)} has been called as spline base of π‘›π‘‘β„Ž- order if all basis functions satisfy the conditions 𝛷𝑗(Ο›) ∈ 𝐢 π‘›βˆ’1(βˆ’βˆž,∞) for 𝑗 = 1,2, … , 𝑛. Firstly, we partition the unit interval [0,1] by selecting a positive integer π‘š with the norm of the partition Δ§ = 1 π‘š+1 . The mesh nodes π‘₯π‘˜ = π‘˜β„Ž, for π‘˜ = 0,1, … , 𝑛 + 1. Then, the basic functions {π›·π‘˜(Ο›)}π‘˜=0 𝑛+1 on the interval 𝐼 = [0,1] are given: 2.3.1 Cubic B-Spline Base (20) Some researchers used the B-cubic spline base, which is defined as follows: IHJPAS. 2025, 38(2) 341 𝑠(Ο›) = 1 4 { 0 , Ο› < βˆ’2 (2 + Ο›)3 , βˆ’ 2 ≀ Ο› ≀ βˆ’1 (2 + Ο›)3 βˆ’ 4(1 + Ο›)3 , βˆ’ 1 < Ο› ≀ 0 (2 βˆ’ Ο›)3 βˆ’ 4(1 βˆ’ Ο›)3, 0 < Ο› ≀ 1 (2 βˆ’ Ο›)3 , 1 < Ο› ≀ 2 0 , π‘₯ > 2 (8) Where 𝑠(Ο›) ∈ 𝐢0 2 (βˆ’βˆž,∞) . To construct a cubic spline, start with a base that satisfies the BCs π›·π‘˜(0) = π›·π‘˜(1) for π‘˜ = 𝑛, 𝑛 βˆ’ 1, . . ,1 However, the component cubic spline functions illustrated following have been created: 𝛷𝑖(Ο›) = { ( Ο› Δ§ ) βˆ’ 4𝑆 ( Ο› + Δ§ Δ§ ) , 𝑖 = 0 ( Ο› βˆ’ Δ§ Δ§ ) βˆ’ 𝑆 ( Ο› + Δ§ Δ§ ) , 𝑖 = 1 ( Ο› βˆ’ 𝑖ħ Δ§ ) , 2 ≀ 𝑖 ≀ π‘š ( Ο› βˆ’ π‘šΔ§ Δ§ ) βˆ’ 𝑆 ( Ο›(π‘š + 2)Δ§ Δ§ ) , 𝑖 = π‘š ( Ο› βˆ’ (1 + π‘š)Δ§ Δ§ ) βˆ’ 4𝑆 ( Ο› βˆ’ (2 + π‘š)Δ§ Δ§ ) , 𝑖 = 1 + π‘š (9) In the following Figure 1 represents the cubic spline functions. Table 1. Values at node points Cubic B-Spline π‘₯π‘˜ π›·π‘˜(π‘₯π‘˜) π›·π‘˜ ꞌ (π‘₯π‘˜) π›·π‘˜ ꞌꞌ (π‘₯π‘˜) π‘₯π‘˜βˆ’2 0 0 0 π‘₯π‘˜βˆ’1 1 4 3 4 βˆ’ 3 2 π‘₯π‘˜ 1 0 βˆ’ 3 4 π‘₯π‘˜+1 1 4 βˆ’ 3 4 βˆ’ 3 2 π‘₯π‘˜+2 0 0 0 2.3.2 Fractional B-Cubic Spline In this subsection, the derivative of 𝛼- order fractional of a cubic B-spline is calculated as follows: 𝐽π‘₯ ∝(π‘₯) = 1 Ξ“ (∝ +4) { 0 , Ο› < βˆ’2 3 2 π‘₯∝+3 , βˆ’ 2 =< π‘₯ <= βˆ’1 3 2 π‘₯∝+3 βˆ’ 6π‘₯1 ∝+3 , βˆ’ 1 < π‘₯ <= 0 3 2 π‘₯∝+3 βˆ’ 6π‘₯1 ∝+3 + 9π‘₯2 ∝+3; 0 < π‘₯ < 1 3 2 π‘₯∝+3 βˆ’ 6π‘₯1 ∝+3 + 9π‘₯2 ∝+3 βˆ’ 6π‘₯3 ∝+3 ; 1 < π‘₯ <= 2 0 , π‘₯ > 2 . (10) IHJPAS. 2025, 38(2) 342 Where π‘₯1 = βˆ’1 + π‘₯ , π‘₯2 = βˆ’2 + π‘₯ and π‘₯3 = βˆ’3 + π‘₯ I II Figure 1. (I) B-Cubic Spline and (II) Compound B-Cubic Functions 3. Materials and Methods 3.1. Analysis of the Numerical Collocation Method for Solving Second-Order Quasi-Linear FODEs Using B-Cubic Spline Base Collocation points should be defined π‘₯𝑗 = π‘Ž + π‘—β„Ž for 𝑗 = 0,1, … ,π‘š discretize the functions 𝛷(𝜁) = {𝛷0(𝜁),𝛷1(𝜁), , . . , π›·π‘š(𝜁)}. Suppose 𝑦(𝜁) =βˆ‘π‘π‘–π›·π‘–(𝜁) π‘š 𝑖=0 . (11) When the approximation of the function 𝑦(π‘₯) at the point π‘₯𝑗 in the domain of the ODE, then, we get the matrix of coefficient as Ξ¦i,j = Ξ¦i(xj) and Ξ¦i,j ꞌ = Ξ¦i ꞌ(xj) with dimensions π‘š Γ—π‘š. The function y(x) suppose to be integrable in the domain of interval (0,1) which it be represented as a finite sum of the B-spline base. The previous series terminates in finite terms if y(x) is a piecewise constant or can be approximated as a piecewise constant across each subinterval. Consider the general quasi-linear second-order FODE in Equation (4) with BCs in Equation (5). Substitute the approximation in Equation (11) which satisfy the BCs in Equation (4) at the point π‘₯ = 𝑑𝑗 for 𝑗 = 0,1, … , 𝑛. to obtain βˆ‘π›Όπ‘–π· 𝛼( 𝛷𝑖(πœπ‘—) ) = 𝑛 𝑖=1 𝛷(πœπ‘— ,βˆ‘π›Όπ‘–π›·π‘–(πœπ‘—) ,βˆ‘π›Όπ‘–π›·π‘– ꞌ(πœπ‘—) 𝑛 𝑖=1 , 𝑛 𝑖=1 βˆ‘π›Όπ‘–π›·π‘– ꞌꞌ(πœπ‘—) 𝑛 𝑖=1 ) ; 0 < 𝜁 < 1 , 0 <∝ < 2, (12) However, we get a linear system in n algebraic equations and the unknowns are the coefficients 𝑐𝑖 for 𝑖 = 1,2… , 𝑛. This system is a linear system if the function 𝛷 is linear. The coefficient matrix in this system has given as follows: π΄π‘˜π‘™ = 𝛩( πœπ‘™ βƒ—βƒ— βƒ—, π›·π‘˜βƒ—βƒ— βƒ—βƒ— βƒ—βƒ— ), and π‘π‘˜ = Ξ©π‘˜( 𝑑 ), for π‘˜π‘™ = 1,2, . . , 𝑛, where 𝛼 = (𝛼1, 𝛼2, … , 𝛼𝑛). The approximated of coefficients are determined by solving the above system of coefficients 𝐴𝛼 = 𝑏. IHJPAS. 2025, 38(2) 343 3.1.1. Algorithm of the Collocation Method For determining the solution of the boundary-value issue in Equations (6) with the BCs in Equation (7), we give the steps of the proposed numerical method as follows: Step I: Choose a suitable approximated base. βˆ… = {βˆ…0(𝜁), βˆ…1(𝜁), . . , βˆ…π‘š(𝜁)} where βˆ…π‘˜(0) = 0 for π‘˜ = π‘š,π‘š βˆ’ 1, . . ,1. Step II: Consider the approximated solution of Equation (6) with the BCs in Equation (7) as in Equation (11) Step III: endpoints b; integer N; initial condition 𝛽𝑗 for 𝑗 = 0,1,2, . . . , 𝑛 βˆ’ 1. Step IV: Set β„Ž = 𝑏 𝑁 then, the interval [π‘Ž, 𝑏] has the partition 𝑑1, 𝑑2, 𝑑3 , … , 𝑑𝑁 ; Step V: put 𝑑 = 𝑑𝑗 in Equation (13) to obtain 𝑦(𝑑𝑗) =βˆ‘π‘Žπ‘–βˆ…π‘–(𝑑𝑗) 𝑁 𝑖=0 . (13) for 𝑗 = 1,2, … , 𝑁 Step VI: Substitute Equation (13) in Equation (6) for 𝑗 = 1,2, … ,𝑁. Step IX: As a result of the Last Equation, the linear system 𝐴π‘₯ = 𝑏 is generated, which can be solved using any numerical technique for solving linear algebraic equation systems. 3.2 Main Problem In FOCPs aims to identify an optimal control function. In this paper, we present an original numerical approach for determining the solutions of (FOC) systems given both cases of (TT) Case I: Non Free-(TT) Let min π‘₯(𝜍),𝑒(𝜍) 𝐽( 𝜍 , π‘₯(𝜍) , 𝑒(𝜍) ) = min π‘₯(𝜍),𝑒(𝜍) ∫ 𝑃( 𝜍 , π‘₯(𝜍) , 𝑒(𝜍) ) 𝜍1 𝜍0 π‘‘πœ , (14) as a result of the restricted dynamical-system π›ΌοΏ½ΜˆοΏ½(𝜍) + 𝛽�̇�(𝜍) + 𝛾𝐷𝛾π‘₯(𝜍) = πœ€(𝜍)π‘₯(𝜍) + 𝑓(𝜍)𝑒(𝜍) + 𝑔(𝜍), 𝜍0 ≀ 𝜍 ≀ 𝜍1 , 0 ≀ 𝛾 ≀ 2, (15) and The restricted BCs are provided below: π‘₯( 𝜍0) = 𝜁 , π‘₯(𝜍1) = πœ‚ , (16) Where 𝛼, 𝛽 β‰  0 Case II: Free--(TT) Consider the FOCP in the following equation minimum π‘₯(𝜍), 𝑒(𝜍), 𝑇 𝐽( 𝜍 , 𝑇, π‘₯(𝜍) , 𝑒(𝜍) ) = minimum π‘₯(𝜍), 𝑒(𝜍), 𝑇 ∫ 𝑃( 𝜍 , π‘₯(𝜍) , 𝑒(𝜍) ) 𝑇 𝜍0 π‘‘πœ , (17) subject to: π‘₯( 𝜍0) = 𝜁 , π‘₯(𝑇) = πœ‚ , (18) where 𝑇 is a free-parameter? To begin, we employ the collocation technique to approximate the variable π‘₯(𝜍) with the control- variable 𝑒(𝜍) using the proposed numerical approach, where 𝑒(𝜍), 𝑓(𝜍), and 𝑔(𝜍) are known functions. In this study, the Hooke and Jeeves approach is utilized as a search method. 3.3. The Proposed Method In this subsection, the proposed method for solving (FOC) problems with cases of (TT) is discussed. the algorithm of the proposed approach for determining the solutions of (FOC) problems with free- and non-free (TT) is explained. The algorithm has two cases: ο‚· Non-free TT IHJPAS. 2025, 38(2) 344 1. Construct an approximate solution of (FOC) as in Equation (11) whenever the BCs are homogenous otherwise the approximated solution of (FOC) has the following form, π‘₯(𝑑) = 1 𝜏1 βˆ’ 𝜏0 (πœ‚(𝑑 βˆ’ 𝜏0) βˆ’ 𝜁(𝑑 βˆ’ 𝜏1)) + 𝑐0βˆ…0(𝑑) + 𝑐1βˆ…1(𝑑) + β‹―+ π‘π‘›βˆ…π‘›(𝑑). (19) in Equations (14)-(15) that, given the approximated base, satisfies the boundary requirements in Equation (000). 2. If the DE in Equation (15) is specified explicitly in the control function u(t), the function u(t) should be evaluated. 3. Substitute the approximated formulas for the functions x(t) and u(t) in Equation (14). 4. Use a suitable minimizing search approach, such as the Hooke-Jeeves method, to determine the minimal parameter(s) in Equation (14). ο‚· Free (TT) 1. Steps 1-4 of the previous method should be followed. 2. The optimal parameters (minimum), including the parameter T in Equation (14), can be determined using appropriate minimizing search methods, such as Hooke-Jeeves approach. 3.4. Dual Discreet Problem In case of non-Free (TT), the control function is obtained as optimal problem π‘šπ‘–π‘›π‘–π‘šπ‘’π‘š βˆ… (𝑐0, 𝑐1, 𝑐2, … , 𝑐𝑛, βˆ…0(𝑑), βˆ…1(𝑑), … , βˆ…π‘›(𝑑)) whilst in the case of non-Free (TT), the control function is obtained as optimal problem π‘šπ‘–π‘›π‘–π‘šπ‘’π‘š βˆ… (𝑐0, 𝑐1, 𝑐2, … , 𝑐𝑛, βˆ…0 (𝑑), βˆ…1(𝑑), … , βˆ…π‘›(𝑑), 𝑇) 4. Numerical Implementations In this part, we have examined two types of (FOC) systems where u(t) is the control function as known in the (FOC) problem. Example 1. Consider the following non-free TT system with min π‘₯(𝜎),𝑒(𝜎) 𝐽( 𝜎 , π‘₯(𝜎) , 𝑒(𝜎) ) = min π‘₯(𝜎),𝑒(𝜎) ∫ ( πœŽπ‘’(𝜎) βˆ’ (𝛾 + 2)π‘₯(𝜎) )2 1 0 π‘‘πœŽ , (20) subject to 𝐷𝛾π‘₯(𝜎) + οΏ½Μ‡οΏ½(𝜎) = 𝑒(𝜎) βˆ’ 𝜎2 βˆ’ (π‘Ž + π‘Žπ›Ύ)π‘’π‘ŽπœŽ, 𝜎0 ≀ 𝜎 ≀ 𝜎1 , 0 ≀ 𝛾 ≀ 2, (21) with the BCs π‘₯(0) = 1, π‘₯(1) = βˆ’π‘’π‘Ž + 1 , (22) where the problem has the exact-solution (ES) as follows: ( π‘₯(𝜎) , 𝑒(𝜎) ) = ( 𝜎2 βˆ’ π‘’π‘ŽπœŽ , 𝜎2 ). Using the B-spline approximation base, then, the approximation formula of π‘₯(𝜎) as in the Equation (19). Then, we have 𝑒(𝑑) = βˆ… (𝑐0, 𝑐1, 𝑐2, … , 𝑐𝑛, βˆ…0(𝑑), βˆ…1(𝑑),… , βˆ…π‘›(𝑑)). Substitute the Equation (19) in Equation (21) to obtain the optimal parameters and the non-free- parameter 𝑇. As a result, the problem is approximated in Figure 2-(a) using the Hooke-Jeeves technique. Example 2. Consider the following non-free TT problem. min π‘₯(𝜎),𝑒(𝜎),𝑇 𝐽( 𝜎 , π‘₯(𝜎) , 𝑒(𝜎), 𝑇 ) = min π‘₯(𝜎),𝑒(𝜎),𝑇 ∫ ( πœŽπ‘’(𝜎) βˆ’ 2π‘₯(𝜎) )2 𝑇 0 π‘‘πœŽ , (23) subject to condition IHJPAS. 2025, 38(2) 345 �̈�(𝜎) + οΏ½Μ‡οΏ½(𝜎) = 1 βˆ’ 𝜎2 + 𝑒(𝜎), (24) with the (BCs) π‘₯(0) = 0 , π‘₯(1) = 0 , (25) where the ES is has the form ( π‘₯(𝜎) , 𝑒(𝜎) ) = ( 𝜎(βˆ’πœŽ + 1), 2 + 2𝜎 βˆ’ 𝜎2 ). From the approximated solution which expressed in Equation (11), we get 𝑒(𝑑) = βˆ… (𝑐0, 𝑐1, 𝑐2, … , 𝑐𝑛, βˆ…0(𝑑), βˆ…1(𝑑), … , βˆ…π‘›(𝑑)). Substitute Equation (19) in Equation (23) to obtain the parameter 𝑇 = 0.997. Hence, π‘₯(𝜎) = 𝜎(βˆ’πœŽ + 2) and then, plotted in Figure 2-(b). Example 3. Consider the following FOCSs with non-free TT induced by Al-Shaher et al. (12) min π‘₯(𝜎),𝑒(𝜎),𝑇 𝐽( 𝜎 , π‘₯(𝜎) , 𝑒(𝜎), 𝑇 ) = min π‘₯(𝜎),𝑒(𝜎),𝑇 ∫ ( πœŽπ‘’(𝜎) βˆ’ (𝛾 + 2)π‘₯(𝜎) )2 𝑇 0 π‘‘πœŽ , (26) subject to: 𝐷𝜎 𝛾 π‘₯(𝜎) + οΏ½Μ‡οΏ½(𝜎) = 𝜎2 + 𝑒(𝜎), (27) with BCs π‘₯(0) = 0, π‘₯(𝑇) = 1 . (28) We get the approximation of π‘₯(𝜏) as in Equation (19) using the B-spline approximation base, which satisfied the BCs in Equation (28) then, we get the function 𝑒(𝑑) = βˆ… (𝑐0, 𝑐1, 𝑐2, … , 𝑐𝑛, βˆ…0(𝑑), βˆ…1(𝑑), … , βˆ…π‘›(𝑑)). To identify the optimal solution of this problem using the Hooke-Jeeves technique as shown in Figure 2-(c), substitute Equation (19) for minimizing the challenge in Equation (26). (a) (b) (c) Figure 2. A Numerical Comparison with the Exact-Solutions for the Examples (a) 1, (b) 2, and (c) 3 IHJPAS. 2025, 38(2) 346 5. Discussion From the numerical comparison with the exact solutions of the examples (a)1, (b) 2, and (c) 3 in Figure 2 (a-c) respectively, we can conclude that the numerical results of the implementations show that the proposed approach can be used to solve both types of this problem with free- or non-free terminal time. Furthermore, from the numerical results, there is a high level of agreement between numerical and analytical solutions. As a result, the new strategy is effective, and the results are promising. In the future, the scope underlying this research could be broadened in new ways, for as improved numerical methods. 6. Conclusion The main objective of this study is to provide a numerical solution for dealing with two situations of FOCPs with free- and non-free terminal time utilizing the collocation method using a B-cubic spline base. Accordingly, we aim to study the findings of the solutions of the fractional- order systems of optimal control using a B-cubic spline base. These numerical solutions for (FOCPs) are very important in the context of science, engineering, and operations research due to the various applications in this area. In addition, we try to compare the numerical results obtained by the proposed method using a B-cubic spline base to the exact solutions for three test problems in two types of free and non-free terminal time. Acknowledgment Our researcher extends his Sincere thanks to the editor and members of the preparatory committee of the Ibn AL-Haitham Journal of Pure and Applied Sciences. Conflict of Interest The authors declare that they have no conflicts of interest. Funding There is no funding for the article. References 1. Farlow SJ. Partial differential equations for scientists and engineers. Courier Dover Publications; 2012. 2. Bhrawy AH, Ezz-Eldien SS, Doha EH, Abdelkawy MA, Baleanu D. Solving fractional optimal control problems within a Chebyshev-Legendre operational technique. Int J Control. 2017;90(1):1230- 44. http://doi.org/10.1080/00207179.2016.1278267 3. Agrawal OP. A formulation and numerical scheme for fractional optimal control problems. J Vib Control. 2008;14(9-10):1291-9. http://doi.org/10.1177/1077546307087451 4. Sweilam NH, Al-Ajami TM, Hoppe RH. Numerical solution of some types of fractional optimal control problems. Sci World J. 2013;2013:306237. http://doi.org/10.1155/2013/306237 5. Bhrawy A, Doha E, Baleanu D, Ezz-Eldien S, Abdelkawy M. An accurate numerical technique for solving fractional optimal control problems. Differ Equ. 2015;15(23):1-15. 6. Akbarian T, Keyanpour M. A new approach to the numerical solution of fractional order optimal control problems. Appl Appl Math. 2013;8(2):582-97. 7. Bhrawy A, Doha E, Machado JT, Ezz-Eldien S. An efficient numerical scheme for solving multi- dimensional fractional optimal control problems with a quadratic performance index. Asian J Control. 2015;17(6):2389-402. http://doi.org/10.1002/asjc.1109 http://doi.org/10.1080/00207179.2016.1278267 http://doi.org/10.1177/1077546307087451 http://doi.org/10.1155/2013/306237 http://doi.org/10.1002/asjc.1109 IHJPAS. 2025, 38(2) 347 8. Sweilam N, Nagy A, El-Sayed AA. Second kind shifted Chebyshev polynomials for solving space fractional order diffusion equation. Chaos Solitons Fractals. 2015;73:141-7. http://doi.org/10.1016/j.chaos.2015.01.006 9. Almeida R, Torres DF. A discrete method to solve fractional optimal control problems. Nonlinear Dyn. 2015;80(4):1811-6. http://doi.org/10.1007/s11071-014-1378-1 10. Ahmad WM, El-Khazali R. Fractional-order dynamical models of love. Chaos Solitons Fractals. 2007;33(4):1367-75. http://doi.org/10.1016/j.chaos.2006.01.098 11. David SA, Linares JL, Pallone EM. Fractional order calculus: historical apologia, basic concepts and some applications. Rev Bras Ensino Fis. 2011;33(4):4302. 12. Al-Shaher OI, Mahmoudi M, Mechee MS. Numerical Method for Solving Fractional Order Optimal Control Problems with Free and Non-Free Terminal Time. Symmetry. 2023;15(3):624. http://doi.org/10.3390/sym15030624 13. Podlubny I. Fractional differential equations. Academic Press; 1999. http://doi.org/10.1016/S0076- 5392(99)X8001-5 14. Kilbas AA, Srivastava HM, Trujillo JJ. Theory and applications of fractional differential equations. Elsevier; 2006. http://doi.org/10.1016/S0304-0208(06)X8001-5 15. Diethelm K. The analysis of fractional differential equations. Springer; 2010. http://doi.org/10.1007/978-3-642-14574-2 16. Mainardi F. Fractional calculus and waves in linear viscoelasticity. Imperial College Press; 2010. http://doi.org/10.1142/p614 17. Machado JT, Kiryakova V, Mainardi F. Recent history of fractional calculus. Commun Nonlinear Sci Numer Simul. 2011;16(3):1140-53. http://doi.org/10.1016/j.cnsns.2010.05.027 18. Tarasov VE. Fractional dynamics: applications of fractional calculus to dynamics of particles, fields and media. Springer; 2010. http://doi.org/10.1007/978-3-642-14003-7 19. Sabatier J, Agrawal OP, Machado JT, eds. Advances in fractional calculus: theoretical developments and applications in physics and engineering. Springer; 2007. http://doi.org/10.1007/978-1-4020-6042-7 20. Baleanu D, Diethelm K, Scalas E, Trujillo JJ. Fractional calculus: models and numerical methods. World Scientific; 2012. http://doi.org/10.1142/9789814355216 http://doi.org/10.1016/j.chaos.2015.01.006 http://doi.org/10.1007/s11071-014-1378-1 http://doi.org/10.1016/j.chaos.2006.01.098 http://doi.org/10.3390/sym15030624 http://doi.org/10.1016/S0076-5392(99)X8001-5 http://doi.org/10.1016/S0076-5392(99)X8001-5 http://doi.org/10.1016/S0304-0208(06)X8001-5 http://doi.org/10.1007/978-3-642-14574-2 http://doi.org/10.1142/p614 http://doi.org/10.1016/j.cnsns.2010.05.027 http://doi.org/10.1007/978-3-642-14003-7 http://doi.org/10.1007/978-1-4020-6042-7 http://doi.org/10.1142/9789814355216