General Fractional Derivative using Convolution Orthogonality over Homogeneous Basis#
Created on Mon Sep 2 08:51:44 2024
@author: ppranjiv
- gen_frac_deritivate_conv_homogeneous.gm(x)#
- Convolution Spectral methods for General Fractional Derivative,
exmaple Power function : x^k1 - x^k2. Since the function is homogenous, we use Sifted Homogeneuos Legendre Basis, where,
Trial function : phi_n = kappa * (L_n+2 - L_n ), Test function : (L_n+2 - L_n );
where L_n is nth order legendre polynomial and Kappa is a sonine kernel, assocaited with integral - in this case fractional
Note : Outer convolution orthogonality is used, instead of inner product.
To fix : Jacobi Quadture weights and quad points.
- gen_frac_deritivate_conv_homogeneous.exp(x, a1, b, degree, alpha)#
Reconsturct the function f (x) = SUM_n a_n (k * P_n),
- where,
P_n is shifted homogenous basis over the interval [0,1], a_n are the coeffcients for Galerkin projection, and k is the sonin kernel, kappa
Parameters#
- xarray
x in [0, 1]
- a1array
coeffiencts for Galerkin projection
- barray
coeffiencts for sonin kernel, kappa
- degreeint
max. degree for the polynomial
Returns#
- fxarray
function values at x in [0,1]
- gen_frac_deritivate_conv_homogeneous.func1(x, k1, k2)#
Test function
Parameters#
- xarray
x in [0, 1]
k1 : int
k2 : int
Returns#
- fxarray
function values at x in [0,1]
- gen_frac_deritivate_conv_homogeneous.kappa_cov(x, b, alpha, degree)#
Computes the convolution, kappa * Pn, where,
P_n is shifted homogenous basis over the interval [0,1], and k is the sonin kernel, kappa
Parameters#
- xarray
x in [0, 1]
- barray
coeffiencts for sonin kernel, kappa
- alphafloat
fractional order
- degreeint
max. degree for the polynomial
Returns#
- fxarray
conolution values at x in [0,1]
Note#
Sonine kernel, kapaa = SUM_k b_k x^{k+alpha-1} / Gamma (alpha) where, Gamma is Euler gamma fucntion
- gen_frac_deritivate_conv_homogeneous.k_cov(a, k1, alpha, degree)#
Computes the convolution, k * Pn, at x = 1 where,
P_n is shifted homogenous basis over the interval [0,1], and k is the sonin kernel, k
Parameters#
- aarray
coeffiencts for sonin kernel, k
- k1int
parameter for convolution, k * x^^k1
- alphafloat
fractional order
- degreeint
max. degree for the polynomial
Returns#
- fxarray
conolution values at x = 1
Note#
Sonine kernel, k = SUM_k a_k x^{k - alpha} / Gamma (1-alpha) where, Gamma is Euler gamma fucntion
- gen_frac_deritivate_conv_homogeneous.rhs_conv(degree, a, k1, k2, alpha)#
Computes the outer-convolution from [0,1] of
- rhs = g * P_n,
- where,
P_n is shifted homogenehous Legendre polynomial and g = ddx (k * f) is a function
Parameters#
- degreeint
degree for the polynomial
k1 : int
k2 : int
alpha : float
Returns#
- rhsfloat
convolution in [0,1]
- gen_frac_deritivate_conv_homogeneous.main(degree, k1, k2, alpha)#