Function Repository Resource:

ButcherTrees

Source Notebook

Get a list of the trees for any Runge-Kutta method of a given order

Contributed by: Wolfram Research

ResourceFunction["ButcherTrees"][p]

gives a list, partitioned by order, of the trees for any Runge–Kutta method of order p.

Details and Options

The trees are represented in a functional form in terms of the elementrary symbol f (\[FormalF]).

Examples

Basic Examples (1) 

Give the trees that are needed for any third-order method:

In[1]:=
ResourceFunction["ButcherTrees"][3]
Out[1]=

Properties and Relations (2) 

Check the trees are all valid syntax using the resource function ButcherTreeQ:

In[2]:=
ButcherTreeQ /@ ResourceFunction["ButcherTrees"][4]
Out[2]=

The resource function ButcherPlot can be used to plot Butcher trees:

In[3]:=
ButcherPlot[ResourceFunction["ButcherTrees"][3]]
Out[3]=

Neat Examples (1) 

Plot and label the trees through order 5:

In[4]:=
(ButcherPlot[#, ButcherPlotLabel -> #] &)[
 Flatten[ResourceFunction["ButcherTrees"][4]]]
Out[4]=

Version History

  • 1.0.0 – 28 August 2019

Related Resources

License Information