beplay体育手机官网安卓版Computation Meets Knowledge

Fractional Calculus in Wolfram Language 13.1

Fractional Calculus in Wolfram Language 13.1

What is the half-derivative ofx?

Fractional calculusstudies the extension of derivatives and integrals to such fractional orders, along with methods of solving differential equations involving these fractional-order derivatives and integrals. This branch is becoming more and more popular in fluid dynamics, control theory, signal processing and other areas. Realizing the importance and potential of this topic, we have added support forfractional derivatives and integralsin the recent release of Version 13.1 of thebeplay体育官网下载app.

The Idea of Fractional Calculus

The foundations of calculus were developed byNewtonandLeibnizback in the seventeenth century, with differentiation and integration being the two fundamental operations of this subject.

Every student of calculus knows that the first derivative of the square functionisx, while the result of integrating it isand that integration is essentially the inverse operation of differentiation (the integral of ordernmay be regarded as a derivative of order–n). However, speaking about derivatives or antiderivatives or integrals, we assume the ordernis integer.

Isaac Newton and Gottfried Leibniz


What if the ideas of differentiation and integration could be extended to noninteger or even complex orders? This is done in the theory of fractional calculus, which generalizes the classical calculus notions of derivatives and integrals to fractional ordersαsuch that the results of fractional operations coincide with the results of classical calculus operations when the orderαis a positive integer (differentiation) or negative integer (integration). As shown in the following illustration, derivatives of other real orders “interpolate” between the derivatives of integer orders:

Derivatives of other real orders interpolate between the derivatives of integer orders


Historical Overview

Fractional calculus is not a new subject. It has at least a two-century history starting from the two articles written byNiels Henrik Abelback in 1823 and 1826.

As explained inthis article, fractional calculus was introduced in one of Abel’s early papers, where all the elements can be found: the idea of fractional-order integration and differentiation; the mutually inverse relationship between them; the understanding that fractional-order differentiation and integration can be considered as the same generalized operation; and even the unified notation for differentiation and integration of arbitrary real order.

Niels Henrik Abel


Abel considered the generalized version of thetautochrone problem(also known asAbel’s problem) on how to determine the equation for the curveKCAalong the slope from the prescribed transit timeT=f(x) given as a function from the distancex=AB.

Generalized version of the tautochrone problem

Abel obtained the integral equationfor the unknown functionφ(x), the determination of which makes it possible to find the equation for the curve itself. After several algebraic manipulations, this integral equation might be rewritten in the form, which is what we call now theCaputo fractional derivative.

During the last two centuries, scientists from different areas and backgrounds worked on the theory of fractional calculus (considering it from different points of view). Hence, there are different approaches on how to define a fractional “differintegration” operation. Three of these definitions are the most popular and important in practice. We will talk about them in this blog post.

Half-Derivative of the Square Function

Let’s take the square function and derive the formula for the fractional derivatives using some simple algebraic manipulations. First, let’s calculate thenth-order ordinary derivative of the square function:



Putting negativenin this formula, one might easily get thenth-order antiderivative of this function:

% /. n -> -2


Let’s take the formula for thenth阶的导数平方函数,把一个noninteger orderninto it:

x^(2 - n)/Gamma


And what will we get if we take thenth-order ordinary derivative of the latter function and substitute 1/2 there?



This is the first derivative of the square function! It is obtained via two “half-order fractional differentiation” procedures. One might easily verify that the antiderivative of the square function can be obtained via two similar half-order integration procedures (substituting –1/2 in the previously shown formulas).

所以对于这个简单的示例,我们展示分数al calculus is and how it is connected with as well as how it generalizes the classical version.

Three Main Definitions of Fractional Derivatives

As integration is essentially the inverse operation of differentiation, we could define one united operation of differentiation/integration, which we call thedifferintegral: in the literature, this operator is written as,代表的部分differintegralorderαof the functionf(x) with respect toxand with the lower bounda. Fractional differintegrals depend on the value of the functionf(x) at the pointaso they use the “history” of the function. In practice, the lower bound is usually taken to be 0.

Grünwald–Letnikov Approach

TheGrünwald–Letnikov differintegralgives the basic extension of the classical derivatives/integrals and is based on limits:

The Grünwald–Letnikov differintegral

In practice, this approach is not very usable, as it contains an infinite number of approximations of a function at different points.

Riemann–Liouville Approach

TheRiemann–Liouville definitionis:

The Riemann–Liouville definition, where

It lies under a solid and strict mathematical theory of fractional calculus. This theory is well developed, but the Riemann–Liouville approach has a couple of limitations that make it not so suitable for applications in real-world problems.

Caputo Approach

The Caputo definition is:

The Caputo definition, where

There is some similarity between this and the Riemann–Liouville differintegral and, in fact, the Caputo differintegral can be defined via the Riemann–Liouville differintegral:

Riemann–Liouville Fractional differintegral

Obviously, for negativeα,Caputo fractional derivatives coincide with the Riemann–Liouville fractional derivatives.

The Caputo definition of fractional derivatives and integrals has many advantages in comparison with the Riemann–Liouville or Grünwald–Letnikov ones: first, it takes into consideration the values of the function and its derivatives at the origin (or, in general, at any lower-limit pointa), which automatically makes it suitable for solving fractional-order initial-value problems using Laplace transforms. Also, the Caputo fractional derivative of a constant is 0 (while, in general, the Riemann–Liouville fractional derivative is not), hence it is more consistent with classical calculus.

The following animation shows the behavior of the Caputo fractional derivatives of a square function in comparison with the ordinary ones—the fractional-order derivatives “interpolate” between the derivatives of integer orders:

Fractional order derivatives interpolate between derivatives of integer orders


Riemann–Liouville Fractional Differintegral in the Wolfram Language

We have implemented a function calledFractionalDinto Wolfram Language Version 13.1. This function computes the Riemann–Liouville fractional derivativeof orderαof the functionf(x).

As an example, let’s calculate the half-order fractional derivative of a cubic function:



Now verify this result using the Riemann–Liouville definition:



Repeating the half-order fractional differentiation procedure leads to the ordinary derivative of the cubic function:



The following calculation recovers the initial function using three nested fractional integrations:



Now let’s compute the arbitrary fractional-order derivative of this cubic function, make a table of its values for specific orders and plot the list of derivatives:







Next, let’s compute the 0.23-order fractional derivatives of theExpandBesselJfunctions:





Here, we show the fractional derivative of theMeijerGsuperfunction, as it is a very important theoretical case: the fractional derivatives ofMeijerGare given in terms of anotherMeijerGfunction:



As a final example, we present a table of theαthfractional andnthordinary derivatives for a few common special functions:

Fractional and ordinary derivatives


Caputo Fractional Differintegral

In Wolfram Language 13.1,CaputoDgives the Caputo fractional derivativeof orderαof the functionf(x).

As mentioned previously, the Caputo fractional derivative of a constant is 0:





For negative orders ofα,CaputoDoutput coincides withFractionalD:



% - FractionalD


Now, let’s compute the 0.23-order Caputo fractional derivative of theExpfunction:



Compute the half-order Caputo fractional derivative of theBesselJfunction:



And as a final example, we present the half-order Caputo fractional derivatives of some common mathematical functions:

Half-order Caputo fractional derivatives


Fractional Differential Equations

Fractional differential equations (FDEs) are differential equations involving fractional derivativesdαl d xα. These are generalizations of the ordinary differential equations (ODEs) thathave attracted much attention and have been widely used in engineering, physics, chemistry, biology and other fields.In most of their applications, FDEs involve relaxation and oscillation models.

Here is an example in which we solve an FDE using the powerfulDSolvefunction, which was heavily updated in Version 13.1 to support FDEs:

sol = DSolve


This solution is given in terms of theMittagLefflerEfunction, which is the basic function for fractional calculus applications. Its role in the solutions of FDEs is similar to the role and importance of theExpfunction for the solutions of ODEs: any FDE with constant coefficients can be solved in terms of Mittag–Leffler functions.

Now, let’s plot the previous solution:



As a more interesting example, we solve the equation of a fractional harmonic oscillator of order 1.9:

eqn = CaputoD


The behavior of this fractional harmonic oscillator is very similar to the behavior of the ordinary damped harmonic oscillator:

dampedOsc = DSolveValue


Plot these solutions and compare them:



This example clearly demonstrates that the order of FDE can be used as a controlling parameter to model some complicated systems.

Another method for solving FDEs is via the Laplace transformation of the equation (i.e. transforming the initial FDE to some algebraic equation). We’ve also addedLaplaceTransformsupport for FDEs in Version 13.1:



Now, calculating the inverse Laplace transform of this solution, we will immediately get the same solution obtained viaDSolve:



Closing Words and Acknowledgments

Here atWolfram Research, we are constantly updating the Wolfram Language, covering more and more topics that could be revolutionary and push scientists to start innovative research in their areas of study.

In Wolfram Language 13.1, we have implemented two basic operators for fractional calculus (theFractionalDandCaputoDfunctions), and also made a huge effort to add support for solving fractional differential equations viaDSolveandLaplaceTransform. We have also updated the algorithms of theMittagLefflerEfunctions, as they have crucial importance in the theory of fractional calculus. You can learn more about this from both the blog post “Launching Version 13.1 of Wolfram Language & Mathematica” by Stephen Wolfram and theNew in Wolfram Language 13.1webinar series.

Also, I would like to acknowledge the work done by my colleagues Aram Manaselyan and Hrachya Khachatryan on the implementation of fractional calculus in the Wolfram Language; the invaluable contribution of Professor Oleg Marichev to the theory of fractional calculus and symbolic computational algorithms within it; and Devendra Kapadia for managing the project as well as for valuable remarks and critical comments on this text.


Join the discussion


!Please enter your name.

!Please enter a valid email address.

1 comment

  1. One of the joys with each Mathematica revision is discovering which arcane but elegant mathematical concept is now part of the Language. The latest revision, with this hitherto unknown (to me) chimera between differentiation and integration, does not disappoint. Kudos to all who made it so.