File Exchange

image thumbnail

FLMM2

version 1.0.0.0 (17.9 KB) by Roberto Garrappa
Fractional linear multistep methods of second order for fractional differential equations

21 Downloads

Updated 30 Jun 2014

View License

FLMM2 solves an initial value problem for a fractional differential equation (FDE) by means of some implicit fractional linear multistep methods (FLMMs) of the second order.
FLMMs are a generalization to FDEs of classical linar multistep methods and were introduced by Lubich in 1986. This code implements 3 different implicit FLMMs of the second order: the generalization of the classical Trapezoidal rule, the generalization of the Newton-Gregory formula and the generalization of the Backward Differentiation Formula (BDF); by default the BDF is selected when no other methods are specified.

Comments and Ratings (4)

awesome!

Thank you for this amazing job.

a = 1 ; mu = 4 ;
fdefun = @(t,y) [ a-(mu+1)*y(1)+y(1)^2*y(2) ; mu*y(1)-y(1)^2*y(2) ] ;
Jfdefun = @(t,y) [ -(mu+1)+2*y(1)*y(2) , y(1)^2 ; mu-2*y(1)*y(2) , -y(1)^2 ] ;
alpha = 0.8 ;
t0 = 0 ; tfinal = 100 ; y0 = [ 0.2 ; 0.03] ;
h = 2^(-6) ;
[t, y_flmm2] = flmm2(alpha,fdefun,Jfdefun,t0,tfinal,y0,h) ;
[t, y_fde12] = fde12(alpha,fdefun,t0,tfinal,y0,h) ;
figure(1)
subplot(1,2,1),plot(t,y_flmm2(1,:),t,y_flmm2(2,:)) ;
xlabel('t') ; ylabel('y(t)') ;
legend('y_1(t)','y_2(t)') ;
title('FDE solved by the FLMM2.m code');
subplot(1,2,2),plot(y_flmm2(1,:),y_flmm2(2,:)) ;
xlabel('y1(t)') ; ylabel('y2(t)') ;
title('FDE solved by the FLMM2.m code');
figure(2)
subplot(1,2,1),plot(t,y_fde12(1,:),t,y_fde12(2,:)) ;
xlabel('t') ; ylabel('y(t)') ;
legend('y_1(t)','y_2(t)') ;
title('FDE solved by the FDE12.m code');
subplot(1,2,2),plot(y_fde12(1,:),y_fde12(2,:)) ;
xlabel('y1(t)') ; ylabel('y2(t)') ;
title('FDE solved by the FDE12.m code');

John Mike

Very useful! Excuse me, if the fractional differential equations include constant delay or time-varying delay, how do we solve it?

Very useful contribution, thanks

MATLAB Release Compatibility
Created with R2009b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.


Learn About Live Editor