0% found this document useful (0 votes)
14 views

Code of The Multidimensional Fractional Quasi-Newton Method Using Recursive Programming

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.

Uploaded by

mathsjjournal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Code of The Multidimensional Fractional Quasi-Newton Method Using Recursive Programming

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.

Uploaded by

mathsjjournal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Applied Mathematics and Sciences: An International Journal (MathSJ) Vol.9, No.

1, March 2022

Code of the multidimensional fractional


quasi-Newton method using recursive programming
A. Torres-Hernandez *,a
a Department of Physics, Faculty of Science - UNAM, Mexico

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.

1. Fractional Quasi-Newton Method


To begin this section, it is necessary to mention that due to the large number of fractional operators that may
exist [1–6], some sets must be defined to fully characterize the fractional quasi-Newton method1 [7, 8]. It is
worth mentioning that characterizing elements of fractional calculus through sets is the main idea behind of the
methodology known as fractional calculus of sets [9]. So, considering a scalar function h : Rm → R and the
canonical basis of Rm denoted by {êk }k≥1 , it is possible to define the following fractional operator of order α using
Einstein notation

oxα h(x) := êk okα h(x). (1)

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

whose complement may be defined as follows

 
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

as a consequence, it is possible to define the following set

  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

which under the classical Hadamard product it is fulfilled that

ox0 ◦ h(x) := h(x) ∀oxα ∈ m MO∞,u


c,x,α (h). (7)

Then, considering that for each operator oxα it is possible to define the following fractional matrix operator

   
Aα (oxα ) = [Aα (oxα )]jk = okα , (8)

it is possible to define the following set of fractional operators

  −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

with which it is possible to obtain the following theorem:


Theorem 1. Let oxα be a fractional operator such that oxα ∈ m MO∞,u c,x,α (h). So, considering the modified Hadamard product
given by (10), it is possible to define the following set of fractional matrix operator

n    o
α rα rα
m G (Aα (ox )) := A◦r ◦r ◦r
α = Aα (ox ) : r ∈ Z and Aα = [Aα ]jk := ok , (11)

which corresponds to the Abelian group generated by the operator Aα (oxα ).


Proof. It should be noted that due to the way the set (11) is defined, just the Hadamard product of type vertical is
◦p ◦q
applied among its elements. So, ∀Aα , Aα ∈ m G (Aα (oxα )) it is fulfilled that

◦p ◦q  ◦p   ◦q   (p+q)α   ◦(p+q)  ◦(p+q)


Aα ◦ Aα = [Aα ]jk ◦ [Aα ]jk = ok = [Aα ]jk = Aα , (12)

with which it is possible to prove that the set (11) fulfills the following properties, which correspond to the
properties of an Abelian group:

 ◦p ◦p ◦r α )) it is fulfilled that A◦p ◦ A◦q ◦ A◦r = A◦p ◦ A◦q ◦ A◦r


   


 ∀A α , A α , A α ∈ m G (Aα (ox α α α α α α
◦p ◦p ◦p

α α
 ∃A◦0 ◦0

α ∈ m G (Aα (ox )) such that ∀Aα ∈ m G (Aα (ox )) it is fulfilled that Aα ◦ Aα = Aα


◦p ◦−p ◦p ◦−p . (13)
∀Aα ∈ m G (Aα (oxα )) ∃Aα ∈ m G (Aα (oxα )) such that Aα ◦ Aα = A◦0




 α
◦p ◦q ◦p ◦q ◦q ◦p

∀Aα , Aα ∈ m G (Aα (oxα )) it is fulfilled that Aα ◦ Aα = Aα ◦ Aα

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)

as a consequence, it is fulfilled that

   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)

Then, it is possible to obtain the following result:

α T
∀A◦1 −1
α ∈ m GFQN (α) ∃Ah,α := Aα (ox ) ◦ Aα (h) , (17)

and defining the following function

(
α, 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].

2. Programming Code of Fractional Quasi-Newton Method


The following code was implemented in Python 3 and requires the following packages:
1 import math as mt
2 import numpy as np
3 from numpy import linalg as la

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)

where [f ]i : Ω ⊂ R2 → R ∀i ∈ {1, 2}. Then considering a function Φ : (R \ Z) × Cn → Cn , the fractional quasi-


Newton method may be denoted as follows [8, 9]:

xi+1 := Φ(α, xi ) = xi − Agf ,β (xi )f (xi ), i = 0, 1, 2 · · · , (22)

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):

card (Convδ (ξ)) = card (R) , (25)


from which it follows that the set (24) is generated by an uncountable family of fractional fixed-point methods.
Before continuing, it is necessary to define the following corollary [9]:
Corollary 1. Let Φ : (R \ Z) × Cn → Cn be an iteration function such that Φ ∈ Convδ (ξ). So, if Φ has an order of
convergence of order (at least) p in B(ξ; 1/2), for some m ∈ N, there exists a sequence {Pi }i≥m ∈ B(p; δK ) given by the
following values

log (kxi − xi−1 k)


Pi = , (26)
log (kxi−1 − xi−2 k)
such that it fulfills the following condition:

lim Pi → p,
i→∞

and therefore, there exists at least one value k ≥ m such that


Pk ∈ B(p; ). (27)
The previous corollary allows estimating numerically the order of convergence of an iteration function Φ that
generates at least one convergent sequence {xi }i≥1 . On the other hand, the following corollary allows characterizing
the order of convergence of an iteration function Φ through its Jacobian matrix Φ (1) [9, 18]:
Corollary 2. Let Φ : (R \ Z) × Cn → Cn be an iteration such that Φ ∈ Convδ (ξ). So, if Φ has an order of convergence of
order (at least) p in B(ξ; δ), it is fulfilled that:

1, if lim Φ (1) (α, x) , 0






 x→ξ
p :=  . (28)

 2, if lim Φ (1) (α, x) = 0



x→ξ

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:

i) A function must be programmed together with its Jacobian matrix.


1 def f(x):
2 y=np.zeros ((2 ,1)).astype(complex)
3 y[0]= np.sin(x[0]) * pow(x[0] ,2)+ np.cos(x[1]) * pow(x[1] ,3) -5
4 y[1]= np.cos(x[0]) * pow(x[0] ,3)-np.sin(x[1]) * pow(x[1] ,2) -7
5 return y
6
7 def Df(x):
8 y=np.zeros ((2 ,2)).astype(complex)
9 y[0][0]=2 * np.sin(x[0]) * x[0]+ np.cos(x[0]) * pow(x[0] ,2)
10 y[0][1]=3 * np.cos(x[1]) * pow(x[1] ,2)-np.sin(x[1]) * pow(x[1] ,3)
11 y[1][0]=3 * np.cos(x[0]) * pow(x[0] ,2)-np.sin(x[0]) * pow(x[0] ,3)
12 y[1][1]= -2 * np.sin(x[1]) * x[1]-np.cos(x[1]) * pow(x[1] ,2)
13 return y

ii) The matrix A−1


gf ,β must be programmed.

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:

i [xi ]1 [xi ]2 kxi − xi−1 k2 kf (xi )k2


1 2.253615105769526 1.1942449832449582 0.7770491567746352 15.554324370388906
2 −3.9004625603638927 7.157573208896508 8.569361437566664 240.708834467148
3 −1.5541583533037069 − 1.1179838230007044i 4.4928672793164015 − 2.962300422113517e − 15i 3.722323058480951 27.692687964920736
4 −1.944385547081847 − 1.0897773339058576i 4.940730623672673 − 0.13817042653542763i 0.6105288779230554 29.219708233069287
5 −1.8475774337627011 − 1.1801485625387642i 4.855392369520536 + 0.009503969164296189i 0.21593775616146188 8.81592186304761
6 −1.7960511251389712 − 1.250743007942112i 4.8220026103345015 + 0.10421795336899867i 0.13313208112481426 5.23303705045184
. . . . .
. . . . .
. . . . .
41 −1.76751483239573 − 1.2381890934335078i 4.798857098280522 + 0.06489785685468008i 9.746530597591146e − 07 7.151481519961957e − 05
42 −1.7675150566379345 − 1.2381893834982014i 4.798857321824474 + 0.06489811797226702i 5.025697814069152e − 07 8.392901211001586e − 05
43 −1.7675149484191435 − 1.2381895859611525i 4.798857156145471 + 0.06489836899944432i 3.783737954105193e − 07 6.69477928230414e − 05
44 −1.7675147384551197 − 1.2381895971905954i 4.798856853548587 + 0.06489842891980367i 3.7331798114472574e − 07 3.9363864098046455e − 05
45 −1.7675145927812685 − 1.2381894810754603i 4.798856620324174 + 0.0648983327382783i 3.1360501942818643e − 07 1.4419381217770664e − 05
46 −1.767514555643636 − 1.2381893489293105i 4.798856526732281 + 0.06489819878007232i 2.1341521058220815e − 07 4.62494486008204e − 06

Table 1: Results obtained using the fractional quasi-Newton method [8].

Therefore, from the Corollary 1, the following result is obtained:

log (kx46 − x45 k)


P46 = ≈ 1.0257 ∈ B(p; δK ),
log (kx45 − x44 k)

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.

[8] A. Torres-Hernandez, F. Brambila-Paz, and R. Montufar-Chaveznava. Acceleration of the order of conver-


gence of a family of fractional fixed point methods and its implementation in the solution of a nonlinear
algebraic system related to hybrid solar receivers. 2021. arXiv preprint arXiv:2109.03152.
[9] A. Torres-Hernandez and F. Brambila-Paz. Sets of fractional operators and numerical estimation of the order
of convergence of a family of fractional fixed-point methods. Fractal and Fractional, 5(4):240, 2021. DOI:
10.3390/fractalfract5040240.
[10] R Erfanifar, K Sayevand, and H Esmaeili. On modified two-step iterative method in the fractional sense:
some applications in real world phenomena. International Journal of Computer Mathematics, 97(10):2109–
2141, 2020.

[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.

[19] A. Torres-Hernandez, F. Brambila-Paz, P. M. Rodrigo, and E. De-la-Vega. Fractional pseudo-newton method


and its use in the solution of a nonlinear system that allows the construction of a hybrid solar receiver. Applied
Mathematics and Sciences: An International Journal (MathSJ), 7:1–12, 2020. DOI: 10.5121/mathsj.2020.7201.

15

You might also like