Homogeneous basis for Fractional Derivative using inner product#

Created on Fri Sep 6 12:52:35 2024

@author: ppranjiv

frac_der_inner_homogen_bc.gm(x)#
Petrov-Galerkin methods for 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 : Innner product is used, instead of outer convolution orthogonality.

To fix : Jacobi Quadture weights and quad points.

frac_der_inner_homogen_bc.exp(x, a1, degree, alpha)#

Reconsturct the function f (x) = SUM_n a_n P_n,

where,

P_n is shifted Legendre polynomails over the interval [0,1] and, a_n are the coeffcients.

Parameters#

xarray

x in [0, 1]

a1array

coeffiencts for Galerkin projection

degreeint

max. degree for the polynomial

Returns#

fxarray

function values at x in [0,1]

frac_der_inner_homogen_bc.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]

frac_der_inner_homogen_bc.rhs_inner(degree, k1, k2, alpha)#

Computes the inner porduct from [0,1] of

rhs = g * P_n,
where,

P_n is shifted homogenehous Legendre polynomial and f is the function

Parameters#

degreeint

degree for the polynomial

k1 : int

k2 : int

alpha : float

Returns#

rhsfloat

inner porduct in [0,1]

frac_der_inner_homogen_bc.main(degree, k1, k2, alpha)#
frac_der_inner_homogen_bc.plot_err(degree, k1, k2, alpha)#