Code of The Multidimensional Fractional Quasi-Newton Method Using Recursive Programming
Code of The Multidimensional Fractional Quasi-Newton Method Using Recursive Programming
1, March 2022
Abstract
The following paper presents one way to define and classify the fractional quasi-Newton method through
a group of fractional matrix operators, as well as a code written in recursive programming to implement this
method, which through minor modifications, can be implemented in any fractional fixed-point method that allows
solving nonlinear algebraic equation systems.
Keywords: Fractional Operators; Group Theory; Fractional Iterative Methods; Recursive Programming.
Therefore, denoting by ∂nk the partial derivative of order n applied with respect to the k-th component of the
vector x, using the previous operator it is possible to define the following set of fractional operators
Onx,α (h) := oxα : ∃okα h(x) and lim okα h(x) = ∂nk h(x) ∀k ≥ 1 , (2)
α→n
On,c
x,α (h) := o α
x : ∃ok
α
h(x) ∀k ≥ 1 and lim ok
α
h(x) , ∂ n
k h(x) in at least one value k ≥ 1 , (3)
α→n
n o
On,u n n,c α α
c,x,α (h) := Ox,α (h) ∪ Ox,α (h) ∩ ox : ok c , 0 ∀c ∈ R \ {0} and ∀k ≥ 1 . (4)
On the other hand, considering a linear function h : Ω ⊂ Rm → Rm , it is possible to define the following set
n o
n,u
m Oc,x,α (h) := oxα : oxα ∈ On,u
c,x,α ([h]k ) ∀k ≤ m , (5)
* E-mail: [email protected]; ORCID: 0000-0001-6496-9505
1 Método quasi-Newton fraccional.
DOI : 10.5121/mathsj.2022.9102 9
1
Applied Mathematics and Sciences: An International Journal (MathSJ) Vol.9, No.1, March 2022
where [h]k : Ω ⊂ Rm → R denotes the k-th component of the function h. So, it is possible to define the following
set of fractional operators
\
∞,u k,u
m MOc,x,α (h) := m Oc,x,α (h), (6)
k∈Z
Then, considering that for each operator oxα it is possible to define the following fractional matrix operator
Aα (oxα ) = [Aα (oxα )]jk = okα , (8)
−1
∞,u ∞,u
m IMOc,x,α (h) := m MOc,x,α (h) ∩ oxα : ∃ Aα (oxα ) ◦ ATα (h) , (9)
where Aα (h) = [Aα (h)]jk = [h]k . On the other hand, considering that when using the classical Hadamard
pα qα (p+q)α
product in general ox ◦ ox , ox . It is possible to define the following modified Hadamard product [9]:
pα qα
pα qα oi,x ◦ oj,x ,
if i , j (Hadamard product of type horizontal)
oi,x ◦ oj,x := , (10)
o(p+q)α ,
if i = j (Hadamard product of type vertical)
i,x
n o
α rα rα
m G (Aα (ox )) := A◦r ◦r ◦r
α = Aα (ox ) : r ∈ Z and Aα = [Aα ]jk := ok , (11)
with which it is possible to prove that the set (11) fulfills the following properties, which correspond to the
properties of an Abelian group:
10
2
Applied Mathematics and Sciences: An International Journal (MathSJ) Vol.9, No.1, March 2022
From the previous theorem, it is possible to define the following group of fractional matrix operators [9]:
[
α
m GFQN (α) := m G (Aα (ox )) , (14)
oxα ∈m IMO∞,u
c,x,α (h)
◦p ◦q
where ∀Ai,α , Aj,α ∈ m GFQN (α), with i , j, the following property is defined
◦p ◦q pα qα
Ai,α ◦ Aj,α = A◦1
k,α := Ak,α oi,x ◦ oj,x , p, q ∈ Z \ {0} , (15)
pα qα ◦(r−1)
rpα rqα
α
∀A◦1 ◦r
k,α ∈ m GFQN (α) such that Ak,α ok,x = Ak,α oi,x ◦ oj,x ∃Ak,α = Ak,α ◦ A◦1
k,α = Ak,α oi,x ◦ oj,x . (16)
α T
∀A◦1 −1
α ∈ m GFQN (α) ∃Ah,α := Aα (ox ) ◦ Aα (h) , (17)
(
α, if |[x]k | , 0
β(α, [x]k ) := , (18)
1, if |[x]k | = 0
the fractional quasi-Newton method may be defined and classified through the following set of matrices:
n o
Ah,β = Ah,β A◦1
α : A◦1
α ∈ m GFQN (α) and Ah,β (x) = [Ah,β ]jk (x) . (19)
Therefore, if ΦFQN denotes the iteration function of the fractional quasi-Newton method, it is possible to obtain
the following result:
n o
Let α0 ∈ R \ Z ⇒ ∀A◦1
α0 ∈ m GFQN (α) ∃ΦFQN = ΦFQN (Aα0 ) ∴ ∀Aα0 ∃ ΦFQN (Aα ) : α ∈ R \ Z . (20)
To end this section, it is worth mentioning that the fractional quasi-Newton method has been used in the study
for the construction of hybrid solar receivers [8], and that in recent years there has been a growing interest in
fractional operators and their properties for solving nonlinear algebraic equation systems [7, 10–18].
For simplicity, a two-dimensional vector function is used to implement the code, that is, f : Ω ⊂ R2 → R2 ,
which may be denoted as follows:
!
[f ]1 (x)
f (x) = , (21)
[f ]2 (x)
11
Applied Mathematics and Sciences: An International Journal (MathSJ) Vol.9, No.1, March 2022
where Agf ,β (xi ) is a matrix evaluated in the value xi , which is given by the following expression
β(α,[x ] ) −1
i k
Agf ,β (xi ) = [Agf ,β ]jk (xi ) := ok [gf ]j (x) , (23)
xi
with gf (x) := f (xi ) + f (1) (xi )x. It is worth mentioning that one of the main advantages of fractional iterative
methods is that the initial condition x0 can remain fixed, with which it is enough to vary the order α of the
fractional operators involved until generating a sequence convergent {xi }i≥1 to the value ξ ∈ Ω. Since the order α
of the fractional operators is varied, different values of α can generate different convergent sequences to the same
value ξ but with a different number of iterations. So, it is possible to define the following set
( )
Convδ (ξ) := Φ : lim Φ(α, x) = ξα ∈ B(ξ; δ) , (24)
x→ξ
which may be interpreted as the set of fractional fixed-point methods that define a convergent sequence {xi }i≥1
to some value ξα ∈ B(ξ; δ). So, denoting by card (·) the cardinality of a set, under certain conditions it is possible to
prove the following result (see reference [9], proof of Theorem 2):
lim Pi → p,
i→∞
Before continuing it is necessary to mention that what is shown below is an extremely simplified way of how
a fractional iterative method should be implemented, a more detailed description, as well as some applications,
may be found in the references [7–9, 17–19]. Considering the following notation:
n o n o n o
ErrDom := kxi − xi−1 k2 , ErrIm := kf (xi )k2 , X := xi , (29)
i≥1 i≥1 i≥1
it is possible to implement a particular case of the multidimensional fractional quasi-Newton method through
recursive programming using the following functions:
12
4
Applied Mathematics and Sciences: An International Journal (MathSJ) Vol.9, No.1, March 2022
1 def Dfrac(α,µ,x):
2 s=µ-α
3 if µ>-1:
4 return (mt.gamma(µ+1)/mt.gamma(s+1)) * pow(complex(x),s) if mt.ceil(s)-s>0 or s>-1 else 0
5
6 def β(α,x):
7 return α if abs(x) >0 else 1
8
9 def FractionalQuasiNewton (ErrDom ,ErrIm ,X,α,x0):
10 Tol=pow (10,-5)
11 Lim=pow (10 ,2)
12 InvA=InvAgfβ(α,x0)
13
14 if abs(la.det(InvA)) >0:
15 x1=x0 -np.matmul(la.inv(InvA),f(x0))
16 ED=la.norm(x1 -x0)
17
18 if ED >0:
19 EI=la.norm(f(x1))
20
21 ErrDom.append(ED)
22 ErrIm.append(EI)
23 X.append(x1)
24 N=len(X)
25
26 if max(ED ,EI)>Tol and N<Lim:
27 ErrDom ,ErrIm ,X= FractionalQuasiNewton (ErrDom ,ErrIm ,X,α,x1)
28
29 return ErrDom ,ErrIm ,X
To implement the above functions, it is necessary to follow the steps shown below:
1 def InvAgfβ(α,x):
2 f0=f(x)
3 Df0=Df(x)
4
5 g11=f0[0]
6 g1x=Df0 [0][0]
7 g1y=Df0 [0][1]
8
9 g21=f0[1]
10 g2x=Df0 [1 ,0]
11 g2y=Df0 [1 ,1]
12
13 β1=β(α,x[0])
14 β2=β(α,x[1])
15
16 y=np.zeros ((2 ,2)).astype(complex)
17 y[0][0]=( g11+g1y * x[1]) * Dfrac(β1,0,x[0])+ g1x * Dfrac(β1,1,x[0])
18 y[0][1]=( g11+g1x * x[0]) * Dfrac(β2,0,x[1])+ g1y * Dfrac(β2,1,x[1])
19 y[1][0]=( g21+g2y * x[1]) * Dfrac(β1,0,x[0])+ g2x * Dfrac(β1,1,x[0])
20 y[1][1]=( g21+g2x * x[0]) * Dfrac(β2,0,x[1])+ g2y * Dfrac(β2,1,x[1])
21 return y
13
5
Applied Mathematics and Sciences: An International Journal (MathSJ) Vol.9, No.1, March 2022
iii) Three empty vectors, a fractional order α, and an initial condition x0 must be defined before implementing
the function FractionalQuasiNewton.
1 ErrDom =[]
2 ErrIm =[]
3 X=[]
4
5 α= -0.14154
6
7 x0 =1.87 * np.ones ((2 ,1))
8
9 ErrDom ,ErrIm ,X= FractionalQuasiNewton (ErrDom ,ErrIm ,X,α,x0)
When implementing the previous steps, if the fractional order α and initial condition x0 are adequate to ap-
proach a zero of the function f , results analogous to the following are obtained:
which is consistent with the Corollary 2, since if ΦFQN ∈ Convδ (ξ), in general ΦFQN fulfills the following
condition (see reference [18], proof of Proposition 1):
(1)
lim ΦFQN (α, x) , 0, (30)
x→ξ
from which it is concluded that the fractional quasi-Newton method has an order of convergence (at least)
linear in B(ξ; δ).
References
[1] José A Tenreiro Machado et al. A review of definitions for fractional derivatives and integral. Mathematical
Problems in Engineering, pages 1–6, 2014.
[2] G Sales Teodoro, JA Tenreiro Machado, and E Capelas De Oliveira. A review of definitions of fractional
derivatives and other operators. Journal of Computational Physics, 388:195–208, 2019.
[3] Mehmet Yavuz and Necati Özdemir. Comparing the new fractional derivative operators involving exponen-
tial and mittag-leffler kernel. Discrete & Continuous Dynamical Systems-S, 13(3):995, 2020.
[4] M Abu-Shady and Mohammed KA Kaabar. A generalized definition of the fractional derivative with appli-
cations. Mathematical Problems in Engineering, 2021.
[5] Khaled M Saad. New fractional derivative with non-singular kernel for deriving legendre spectral collocation
method. Alexandria Engineering Journal, 59(4):1909–1917, 2020.
14
Applied Mathematics and Sciences: An International Journal (MathSJ) Vol.9, No.1, March 2022
[6] Jian-Gen Liu, Xiao-Jun Yang, Yi-Ying Feng, and Ping Cui. New fractional derivative with sigmoid function
as the kernel and its models. Chinese Journal of Physics, 68:533–541, 2020.
[7] A. Torres-Hernandez, F. Brambila-Paz, and E. De-la-Vega. Fractional newton-raphson method and some
variants for the solution of nonlinear systems. Applied Mathematics and Sciences: An International Journal
(MathSJ), 7:13–27, 2020. DOI: 10.5121/mathsj.2020.7102.
[11] Alicia Cordero, Ivan Girona, and Juan R Torregrosa. A variant of chebyshev’s method with 3αth-order of
convergence by using fractional derivatives. Symmetry, 11(8):1017, 2019.
[12] Krzysztof Gdawiec, Wiesław Kotarski, and Agnieszka Lisowska. Newton’s method with fractional derivatives
and various iteration processes via visual analysis. Numerical Algorithms, 86(3):953–1010, 2021.
[13] Krzysztof Gdawiec, Wiesław Kotarski, and Agnieszka Lisowska. Visual analysis of the newton’s method with
fractional order derivatives. Symmetry, 11(9):1143, 2019.
[14] Ali Akgül, Alicia Cordero, and Juan R Torregrosa. A fractional newton method with 2αth-order of conver-
gence and its stability. Applied Mathematics Letters, 98:344–351, 2019.
[15] Giro Candelario, Alicia Cordero, and Juan R Torregrosa. Multipoint fractional iterative methods with (2α+
1) th-order of convergence for solving nonlinear problems. Mathematics, 8(3):452, 2020.
[16] Giro Candelario, Alicia Cordero, Juan R Torregrosa, and Marı́a P Vassileva. An optimal and low compu-
tational cost fractional newton-type method for solving nonlinear equations. Applied Mathematics Letters,
124:107650, 2022.
[17] A. Torres-Hernandez and F. Brambila-Paz. Fractional newton-raphson method. Applied Mathematics and
Sciences: An International Journal (MathSJ), 8:1–13, 2021. DOI: 10.5121/mathsj.2021.8101.
[18] A. Torres-Hernandez, F. Brambila-Paz, U. Iturrarán-Viveros, and R. Caballero-Cruz. Fractional newton-
raphson method accelerated with aitken’s method. Axioms, 10(2):1–25, 2021. DOI: 10.3390/ax-
ioms10020047.
15