# Wolfram Function Repository

Instant-use add-on functions for the Wolfram Language

Function Repository Resource:

Compute and visualize the roots of fractional (noninteger) derivatives of polynomials

Contributed by:
Michael Trott

ResourceFunction["FractionalDPolynomialRoots"][{ returns a list of rules of the roots of poly. | |

ResourceFunction["FractionalDPolynomialRoots"][{ returns a list of lists of the roots of | |

ResourceFunction["FractionalDPolynomialRoots"][{ returns the property | |

ResourceFunction["FractionalDPolynomialRoots"][{ prop]returns the property poly. |

ResourceFunction["FractionalDPolynomialRoots"] allows you to compute and visualize the connections between the roots of derivatives of polynomials of successive order by computing roots that depend on the fractional derivative order *α*.

Roots of successively differentiated polynomials are typically arranged along curves in the complex plane.
Examples:

Roots of noninteger-times differentiated polynomials are located between the roots of derivatives of polynomials of integer order. As the derivative order *α* varies from integer *j* to *j*+1, the roots move along smooth curves between the roots of the integer-times differentiated polynomial. When *α* approaches an integer, one of the roots "disappears" at the origin, effectively reducing the order of the polynomial by 1 after differentiation. The set of all roots as functions of *α* forms a set of curves that can touch but cannot cross.

ResourceFunction["FractionalDPolynomialRoots"][{*poly*,*x*},*α*] can compute exact as well as numeric results.

Properties *prop* independent of *α* include:

"InterpolatingFunctions" | list of interpolating functions for the roots as a function of α |

"RootConnectingCurves" | list of graphic primitives of the curves connecting roots of successive integer order |

"RootConnectingCurves3D" | graphic primitives of the 3D curves connecting roots of successive order |

"IntegerOrderRoots" | nested list of rules of the roots of all nontrivial integer derivatives |

"IntegerOrderRootList" | nested list of the roots of all nontrivial integer derivatives |

"RootEquation" | equation for the roots of the fractional derivatives |

"DiscreteRootGraphic" | graphic showing the roots of the fractional derivatives |

"MouseoverGraphic" | graphic that highlights through mouseover the curves that connect integer derivative roots |

Properties *prop* dependent on *α* include:

"RootEquation" | equation for the roots of the fractional derivatives of order α |

"RootPathODE" | differential equation for the roots as a function of α |

The properties depending on *α* typically return results as lists for the successive derivative ranges 0≤*α*<1,1≤*α*<2,…,*deg*-1≤*α*<*deg*, where *deg* is the degree of the polynomial *poly*.

Find symbolic roots of fractional derivatives of polynomials with exact coefficients:

In[1]:= |

Out[2]= |

Show the explicit Root objects:

In[3]:= |

Out[3]= |

Find numeric roots of fractional derivatives of polynomials with inexact coefficients:

In[4]:= |

Out[5]= |

Use a higher working precision to get arbitrary-precision results:

In[6]:= |

Out[7]= |

Visualize the movement of the roots of a quintic polynomial when the polynomial is differentiated:

In[8]:= |

Plot the roots of the polynomial in red and the roots of the derivative of the polynomial in blue:

In[9]:= |

Out[9]= |

Add the roots of the fractional derivative of order * α* for some

In[10]:= |

Out[10]= |

Find the defining equation for the roots of fractional order of a generic quadratic equation:

In[11]:= |

Out[11]= |

Visualize the roots of this equation for 0≤* α*<1 as the intersection of vanishing real and imaginary parts:

In[12]:= |

In[13]:= |

Out[13]= |

Equation for the roots of fractional order of a generic cubic equation:

In[14]:= |

Out[14]= |

The factorial expressions containing * α* can be reduced to rational functions in

In[15]:= |

Out[15]= |

Use the identity to obtain a form of the equation for 0≤* α*<1:

In[16]:= |

Out[16]= |

The equation for the roots becomes a polynomial with coefficients that are polynomial in * α*:

In[17]:= |

Out[17]= |

In[18]:= |

Out[18]= |

For * α*≈0, the leading term becomes the original polynomial, and one factor of the leading term for

In[19]:= |

Out[19]= |

Equation for the roots of fractional order of a generic cubic equation:

In[20]:= |

Out[20]= |

Equation for the roots of fractional order of a generic quartic equation:

In[21]:= |

Out[21]= |

Use these equations to build an interactive demonstration that allows you to move the roots of a quadratic, cubic or quartic polynomial (each root of the defining equation is a Locator, and the dark gray dots represent the fractional derivatives from the interval (0,1)):

In[22]:= |

Out[22]= |

Visualize the movement of the roots of the * α*th derivative of a quartic polynomial with the derivative order

In[23]:= |

In[24]:= |

In[25]:= |

Out[25]= |

Visualize the movement of the real root from the original cubic polynomial root to the root of the differentiated polynomial:

In[26]:= |

Out[26]= |

In[27]:= |

Out[27]= |

In[28]:= |

Out[28]= |

Show the (piecewise-defined) equation that defines the roots' positions as a function of the derivative order * α*:

In[29]:= |

Out[29]= |

In[30]:= |

Out[30]= |

Compute the series expansions of these equations for * α*≈

In[31]:= |

Out[31]= |

Plot the connection between the roots of a decic polynomial:

In[32]:= |

In[33]:= |

Out[33]= |

Higher-degree polynomials can be analyzed; here is a polynomial of degree 60 with Gaussian-distributed coefficients:

In[34]:= |

Out[33]= |

Plot the roots of integer order in blue and the roots of half-integer order in pink:

In[35]:= |

In[36]:= |

Out[36]= |

The much more symmetrically positioned roots of a polynomial with coefficients *c*_{k}=*k*^{2}:

In[37]:= |

Out[38]= |

The roots of a polynomial with coefficients *c*_{k}=*sin*^{2}(4*k*):

In[39]:= |

Out[40]= |

In all situations, the half-integer-order roots are sandwiched between the integer-order roots.

The roots of the polynomials with *c*_{k}=*tan*(*a*+*bj*) show a rich variety of shapes as functions of *a* and *b*:

In[41]:= |

Out[41]= |

Plot the roots of higher multiplicity; for each integer-order differentiation, one root migrates to the origin due to the 1/(*j*-* α*)! term in the

In[42]:= |

In[43]:= |

In[44]:= |

Out[44]= |

The (piecewise-defined) equation for the roots of a polynomial fractional-order differentiated polynomial:

In[45]:= |

Out[43]= |

A plot and a log plot of the polynomial and its integer derivatives:

In[46]:= |

Out[46]= |

Plot the left-hand side of the first polynomial of the derivative over the *z*, * α* plane and mark the real solutions of the equation:

In[47]:= |

Out[47]= |

Plot the roots of a quantic polynomial with a triple root at *z*=-ⅈ as a function of * α*:

In[48]:= |

In[49]:= |

Out[49]= |

In[50]:= |

Out[50]= |

Plotting the roots in 3D as a function of * α* shows how the triple root splits in a double root and one root that drops out:

In[51]:= |

Out[51]= |

Keeping the triple root at *z*=-ⅈ but moving the other roots closer to the origin shows the split of the triple root into a double root and a single root:

In[52]:= |

In[53]:= |

Out[53]= |

In[54]:= |

Out[54]= |

The fractional differentiation order * α* can be a complex number. The next graphic shows the root curves as a function of

In[55]:= |

In[56]:= |

Out[56]= |

Explore the root paths for a generic quartic polynomial:

In[57]:= |

Out[57]= |

Investigate Vieta's formulas for noninteger differentiation order:

In[58]:= |

In[59]:= |

The sums of the products of roots for the original and the differentiated polynomial:

In[60]:= |

Out[60]= |

In[61]:= |

Out[61]= |

The sums of the products of roots for the noninteger-times differentiated polynomial seem to lie on the lines connecting the two point sets:

In[62]:= |

Out[62]= |

Check numerically the maximal distance of the fractional-order sums of root products from the line connecting the 0th- and 1st-order points:

In[63]:= |

Out[63]= |

The fractional derivative of a generic degree-12 polynomial for 0≤* α*<1:

In[64]:= |

Out[64]= |

See the structure of the fractional derivative by making the coefficients of the polynomial explicit polynomials in the *c*_{k} and * α*:

In[65]:= |

Out[65]= |

Obtain the defining equation for the simplest quadratic polynomial:

In[66]:= |

In[67]:= |

Out[67]= |

Solve for the roots of the fractionally differentiated polynomial and simplify the result:

In[68]:= |

Out[68]= |

In[69]:= |

Out[69]= |

Plot the two roots as a function of * α*:

In[70]:= |

Out[70]= |

Get the equation that determines the roots of a fractionally differentiated sextic:

In[71]:= |

In[72]:= |

Out[72]= |

Plot the curves of the vanishing real and imaginary parts and their intersections (the roots) as a function of * α* for the transition from the polynomial to the differentiated polynomial:

In[73]:= |

Out[73]= |

In[74]:= |

Out[74]= |

The polynomial equation that defines the fractional roots of a quintic:

In[75]:= |

Out[72]= |

For the * α* intervals between integers, plot the surfaces of vanishing real and imaginary parts over the complex

In[76]:= |

Display the integer derivative roots as spheres together with the surfaces:

In[77]:= |

In[78]:= |

Out[78]= |

Plot the roots of a cubic polynomial:

In[79]:= |

In[80]:= |

Out[80]= |

In[81]:= |

Out[81]= |

Compute the equation defining the fractional derivatives:

In[82]:= |

Out[82]= |

Compute series solutions for the roots for * α*≈0 and

In[83]:= |

Out[83]= |

In[84]:= |

Out[84]= |

In[85]:= |

Out[85]= |

In[86]:= |

Out[86]= |

Compute the asymptotic solution for small * α* at a double root of a cubic:

In[87]:= |

In[88]:= |

Out[88]= |

In[89]:= |

Out[89]= |

At the root with multiplicity 2, one has :

In[90]:= |

Out[90]= |

Plot the "speed" of the roots as a function of * α* for a septic polynomial:

In[91]:= |

In[92]:= |

Out[92]= |

In[93]:= |

Out[93]= |

Define the speed as , where is a 0 for the fractional derivative order * α*:

In[94]:= |

Out[94]= |

Plot the speeds (the initial speed at a 0 with multiplicity *m* diverges as *v*_{α}(*z*)∼*α*^{1/m} ):

In[95]:= |

Out[95]= |

The defining equation of a simple cubic polynomial with three real roots:

In[96]:= |

Out[92]= |

Plot the roots of the fractional derivative as a function of * α* (for this cubic, all roots are always real-valued):

In[97]:= |

Out[97]= |

Derive a differential equation for *z*(* α*) by differentiation of the defining equation for the range 0≤

In[98]:= |

Out[98]= |

In[99]:= |

Out[99]= |

In[100]:= |

Out[100]= |

Solve the differential equation numerically:

In[101]:= |

Out[101]= |

Plot the differential equation solution together with the previous contour plot:

In[102]:= |

Out[102]= |

A septic polynomial with seven real roots:

In[103]:= |

All 0s of the derivatives are also real:

In[104]:= |

Out[104]= |

Use ContourPlot to plot the roots of the fractionally differentiated polynomial:

In[105]:= |

Out[105]= |

In[106]:= |

In[107]:= |

Out[107]= |

Compute the defining equation for the roots for a degree-12 polynomial:

In[108]:= |

Single out the piece that applies to the * α* range 0≤

In[109]:= |

Out[109]= |

Plot the roots of the fractionally differentiated polynomial for 0<* α*<12 together with the roots of the singled-out equation outside its range of validity to show that the first equation's roots are globally quite similar to the exact roots:

In[110]:= |

Out[110]= |

A degree-12 polynomial with roots along a spiral-shaped curve:

In[111]:= |

Out[104]= |

The interpolating functions describing the movements of the roots in the complex plane:

In[112]:= |

Out[112]= |

Plot the interpolating functions in the complex plane together with points marking the integer-order derivatives:

In[113]:= |

In[114]:= |

Out[114]= |

In[115]:= |

Plot the absolute value of the roots as a function of * α* showing that at each integer

In[116]:= |

Out[116]= |

Plot the real and imaginary parts of all roots:

In[117]:= |

Out[117]= |

Visualize the curves connecting the integer roots for the polynomial 1+*z*+*z*^{2}+…+*z*^{16}:

In[118]:= |

In[119]:= |

Out[112]= |

Form a degree-32 polynomial with Gaussian-distributed coefficients:

In[120]:= |

Compute the roots and root connections:

In[121]:= |

In[122]:= |

Plot the roots and their connections:

In[123]:= |

Out[123]= |

Show a histogram of the distribution of the lengths of the curve segments connecting roots:

In[124]:= |

Out[124]= |

Show a histogram of the ratios of the absolute magnitudes of successive integer-order roots along "root curves":

In[125]:= |

Out[125]= |

Form a degree-24 polynomial with Gaussian-distributed complex coefficients:

In[126]:= |

Compute the roots and root connections:

In[127]:= |

In[128]:= |

Compute the shortest connections between the roots of order *j* and order *j*+1:

In[129]:= |

In[130]:= |

Show the root connections from fractional differentiation and from nearest successive roots together (often, the shortest connection connects the same roots as the root-connecting curves):

In[131]:= |

Out[131]= |

Compute the differential equation for the fractional-order roots of a generic quadratic polynomial:

In[132]:= |

Out[132]= |

Simplify the ODE:

In[133]:= |

Out[133]= |

Compute the ODE that governs the root movements from a given sextic polynomial to the roots of its derivative:

In[134]:= |

In[135]:= |

Out[135]= |

The flow field for the root flow at * α*=0:

In[136]:= |

Out[136]= |

Visualize the flow over the complex *z* plane:

In[137]:= |

Out[137]= |

Plot the absolute magnitude of the flow field together with the positions of the roots of the polynomial and its derivative:

In[138]:= |

In[139]:= |

Out[139]= |

The roots of the derivative are the blue tubes that coincide with the singularities of the flow field for * α*=0:

In[140]:= |

Out[140]= |

Compute again the ODE that governs the root movements from a given sextic polynomial to the roots of its derivative:

In[141]:= |

In[142]:= |

In[143]:= |

Visualize the flow of random points (not only the 0s) of the *z* plane under the flow field for the roots:

In[144]:= |

In[145]:= |

Out[145]= |

Show the curves in 3D:

In[146]:= |

In[147]:= |

Out[147]= |

Compute again the ODE that governs the movements of any point of the complex *z* plane from a given sextic polynomial (*c* is the value of the polynomial at the given point):

In[148]:= |

In[149]:= |

Visualize the canonical flow of random points (not only the 0s) of the *z* plane under the flow field for any point (the value of *poly*×(-* α*)! stays constant along each integral curve):

In[150]:= |

In[151]:= |

Out[151]= |

Plotting the curves in 3D shows the overall contractive nature of the flow generated by fractional differentiation (not only the 0s "disappear" at the origin at an integer order of differentiation, and many curves end at the origin):

In[152]:= |

In[153]:= |

Out[153]= |

Repeat the last computation for a larger set of start values:

In[154]:= |

Out[154]= |

Get a quick view of the roots of a multiple-times differentiated polynomial with circles indicating the smallest (in magnitude) roots of a given order:

In[155]:= |

Out[155]= |

Obtain a graphic with the flow of the roots made interactively visible order by order by mousing over the curve segments:

In[156]:= |

Out[156]= |

Find exact fractional roots:

In[157]:= |

Out[157]= |

Find fractional roots using machine arithmetic:

In[158]:= |

Out[158]= |

Find fractional roots to arbitrary precision:

In[159]:= |

Out[159]= |

A cubic polynomial with one real root:

In[160]:= |

Out[160]= |

The cubic curve has a local maximum and a local minimum, so that derivative has two real roots:

In[161]:= |

Out[161]= |

Visualize how the two real roots arise from two complex conjugate roots of the cubic:

In[162]:= |

Out[162]= |

Determine the saddle points where the two complex conjugate roots become real by finding where the * α*-dependent polynomial has a double root (meaning the polynomial and its first derivative have a coinciding root):

In[163]:= |

Out[163]= |

In[164]:= |

In[165]:= |

Out[165]= |

In[166]:= |

Out[166]= |

In[167]:= |

Out[167]= |

Add a yellow sphere indicating the special point:

In[168]:= |

Out[168]= |

Solve the equation exactly and plot the solutions:

In[169]:= |

Out[169]= |

In[170]:= |

Out[170]= |

Show how the derivative of a quartic double-well curve with no real roots develops three real roots:

In[171]:= |

Out[171]= |

In[172]:= |

Out[172]= |

In[173]:= |

Out[173]= |

Show how roots with multiplicity develop under fractional differentiation:

In[174]:= |

Out[174]= |

In[175]:= |

Out[175]= |

In[176]:= |

Out[176]= |

Plot the largest by magnitude root over the complex * α* plane:

In[177]:= |

In[178]:= |

Out[178]= |

Define a cubic with two complex conjugate roots:

In[179]:= |

Out[179]= |

Simplify the differential equation for the roots for the * α* range 0≤

In[180]:= |

Out[180]= |

In[181]:= |

Visualize the trajectories of the roots induced by the root flow field:

In[182]:= |

Out[182]= |

Make a contour plot of equi-direction surfaces:

In[183]:= |

Out[183]= |

Define a polynomial with roots at the points of a square lattice and the corresponding root flow field:

In[184]:= |

Out[184]= |

In[185]:= |

Visualize the flow field using ListLineIntegralConvolutionPlot:

In[186]:= |

Out[186]= |

Visualize the flow field of the roots from an integer to the next integer order for a simple polynomial:

In[187]:= |

Out[187]= |

In[188]:= |

Out[188]= |

Compute the right-hand side of the differential equation that governs the flow of the roots:

In[189]:= |

Out[189]= |

Expand the right-hand side at * α*=0 and

In[190]:= |

Out[190]= |

In[191]:= |

Out[191]= |

Show the vector field in the complex plane:

In[192]:= |

Out[192]= |

In[193]:= |

Out[193]= |

Obtain the equation for the roots of the fractional derivative with explicit * α*-dependent coefficients:

In[194]:= |

Out[194]= |

In[195]:= |

Out[195]= |

In[196]:= |

Eliminate * α* to obtain an implicit first-order differential equation

In[197]:= |

Out[197]= |

Eliminate * α* and

In[198]:= |

Out[198]= |

Compute the corresponding initial conditions:

In[199]:= |

Out[199]= |

Compare the differential equation solutions with the roots obtained from solving the polynomial directly:

In[200]:= |

Out[200]= |

Using *z*^{2}+*az*+*b*=(*z*-*z*_{1})(*z*-*z*_{2}), rewrite the equations of motion for the roots in terms of the roots of the initial polynomial rather than the coefficients:

In[201]:= |

Out[201]= |

In[202]:= |

Out[202]= |

For integer-derivative order, the fractional roots are just the roots of the differentiated polynomial:

In[203]:= |

Out[195]= |

In[204]:= |

Out[204]= |

The classic Gauss–Lucas theorem states that the roots of the derivative of a polynomial are within the convex hull of the roots of the original polynomial:

In[205]:= |

In[206]:= |

Out[197]= |

Construct a random polynomial and plot its roots, the roots of its first derivative and fractional roots, as well as the corresponding convex hulls:

In[207]:= |

In[208]:= |

In[209]:= |

Out[209]= |

Some fractional roots can be outside of the convex hull of the original polynomial:

In[210]:= |

In[211]:= |

In[212]:= |

Out[212]= |

Define a function that approximates the connection between a polynomial root *z*_{k} and the root of the differentiated polynomial based on the identity for :

In[213]:= |

Compare the root connection based on the approximate formula with the numerically computed root connections for a random sextic polynomial with complex coefficients:

In[214]:= |

Out[206]= |

In[215]:= |

Out[215]= |

In[216]:= |

In[217]:= |

Out[217]= |

Fractionals can only be computed for polynomials with numeric coefficients:

In[218]:= |

Out[218]= |

Only strict polynomials, not rational functions, are supported:

In[219]:= |

Out[219]= |

The root-connecting curves of a degree-20 polynomial:

In[220]:= |

In[221]:= |

Out[221]= |

Define points on a hexagonal lattice:

In[222]:= |

Out[219]= |

The corresponding sparse polynomial that uses the points as roots:

In[223]:= |

Out[215]= |

Compute the roots of the fractionally differentiated polynomial and the associated Voronoi meshes:

In[224]:= |

Out[224]= |

Interactively modify the differentiation order and visualize the associated Voronoi mesh:

In[225]:= |

Out[225]= |

Plot a fractional root church by using a polynomial with roots of high multiplicity:

In[226]:= |

In[227]:= |

In[228]:= |

Out[228]= |

Plot a fractional root tree by using a polynomial with roots of high multiplicity:

In[229]:= |

In[230]:= |

In[231]:= |

Out[231]= |

Plot a another root tree:

In[232]:= |

In[233]:= |

In[234]:= |

Out[234]= |

Plot integral curves of the root flow for fizzed values of * α*:

In[235]:= |

In[236]:= |

In[237]:= |

In[238]:= |

Out[238]= |

Define a function that plots the equi-surfaces of finite value *c* for the equation defining the fractional roots for 0≤* α*<1:

In[239]:= |

Plot the surfaces for a cubic and a quartic polynomial:

In[240]:= |

Out[240]= |

In[241]:= |

Out[241]= |

- "Deformation of Roots of Polynomials via Fractional Derivatives"–A. Galligo, Journal of Symbolic Computation
- "Visual Analysis of the Newton's Method with Fractional Order Derivatives"–K. Gdawiec, W. Kotarski and A. Lisowska, Symmetry
- "A Nonlocal Transport Equation Modeling Complex Roots of Polynomials under Differentiation"–S. O'Rourke and S. Steinerberger, arXiv.org
- "On the Local Pairing Behavior of Critical Points and Roots of Random Polynomials"–S. O'Rourke and N. Williams, arXiv.org
- "Pairing between Zeros and Critical Points of Random Polynomials with Independent Roots"–S. O'Rourke and N. Williams, arXiv.org

- 1.0.0 – 18 November 2019

This work is licensed under a Creative Commons Attribution 4.0 International License