DifferentialRoot[lde][x]
gives the holonomic function
, specified by the linear differential equation lde[h,x].
DifferentialRoot[lde]
represents a pure holonomic function
.
DifferentialRoot
DifferentialRoot[lde][x]
gives the holonomic function
, specified by the linear differential equation lde[h,x].
DifferentialRoot[lde]
represents a pure holonomic function
.
Details
- Mathematical function, suitable for both symbolic and numerical manipulation; also known as holonomic function and D-finite function.
- The holonomic function
defined by a DifferentialRoot function satisfies a holonomic differential equation
with polynomial coefficients
and initial values
. - DifferentialRoot can be used like any other mathematical function.
- FunctionExpand will attempt to convert DifferentialRoot functions in terms of special functions.
- The functions representable by DifferentialRoot include a large number of special functions.
- DifferentialRootReduce can convert most special functions to DifferentialRoot functions.
- Holonomic functions are closed under many operations, including:
-
, 
constant multiple, integer power
, 
sums and products
,
, 
composition with polynomial, rational, and algebraic functions 
convolution
, 
derivatives and integrals - DifferentialRoot is automatically generated by functions such as Integrate, DSolve, and GeneratingFunction.
- Functions such as Integrate, D, SeriesCoefficient, and DSolve work with DifferentialRoot inputs.
- DifferentialRoot can be evaluated to arbitrary numerical precision.
- DifferentialRoot automatically threads over lists.
- DifferentialRoot[lde,pred] represents a solution restricted to avoid cuts in the complex
plane defined by pred[z], where pred[z] can contain equations and inequalities.
Examples
open all close allBasic Examples (2)
Define f to be the sin function:
f = DifferentialRoot[Function[{y, x}, {y''[x] + y[x] == 0, y[0] == 0, y'[0] == 1}]]Plot[f[x], {x, 0, 2Pi}]Evaluate numerically to any precision:
f[N[1 + I, 30]]Compare the result with the built-in Sin function:
Sin[N[1 + I, 30]]Solve a differential equation:
DSolve[y'''[x] - x^2 y'[x] - y[x] - Cos[x] == 0 && y[0] == 0 && y'[0] == 1 && y''[0] == 0, y, x]Table[y[n] /. First[%], {n, 1, 2, 0.2}]Scope (23)
Numerical Evaluation (7)
Evaluate at machine precision:
DifferentialRoot[Function[{y, x}, {y'[x] - y[x] == 0, y[0] == 1}]][0.5]DifferentialRoot[Function[{y, x}, {y'[x] - y[x] == 0, y[0] == 1}]][1 / 2`50]The precision of the output tracks the precision of the input:
DifferentialRoot[Function[{y, x}, {y'[x] - y[x] == 0, y[0] == 1}]][0.10000000000000000001]DifferentialRoot takes complex number parameters and arguments:
DifferentialRoot[Function[{y, x}, {x y''[x] + y'[x] - y[x] == 0, y[1 / 2] == 1, y'[1 / 2] == -3 / 4}]][1 / 2 + 1.I]DifferentialRoot[Function[{y, x}, {x y''[x] + I y'[x] - y[x] == 0, y[1 / 2] == 1 + 4I, y'[1 / 2] == -3 / 4}]][1 / 2 + 1.I]DifferentialRoot takes inexact input parameters:
DifferentialRoot[Function[{y, x}, {x y''[x] + y'[x] - y[x] == 0, y[1 / 2] == 1`20, y'[1 / 2] == -3 / 4}]][1 / 2 + 1I]Precision[%]Evaluate DifferentialRoot efficiently at high precision:
DifferentialRoot[Function[{y, x}, {x y''[x] + I y'[x] - y[x] == 0, y[1 / 2] == 1 + 4I, y'[1 / 2] == -3 / 4}]][2 / 10`100]//N//TimingDifferentialRoot threads elementwise over lists and matrices:
DifferentialRoot[Function[{y, x}, {x y''[x] + I y'[x] - y[x] == 0, y[1 / 2] == 1 + 4I, y'[1 / 2] == -3 / 4}]][{0.2, 1.4}]DifferentialRoot[Function[{y, x}, {x y''[x] + I y'[x] - y[x] == 0, y[1 / 2] == 1 + 4I, y'[1 / 2] == -3 / 4}]][(| | |
| :------- | :------- |
| 3.1 | 1 / 3`20 |
| 4 / 5`20 | 0.4 |)]Function Properties (5)
DifferentialRoot objects have all the standard features of a mathematical function:
f = DifferentialRoot[Function[{y, x}, {y'''[x] + 2x y''[x] - y[x] == 0, y[1 / 2] == 1, y'[1 / 2] == -3 / 4, y''[1 / 2] == 0}]]Integrate[f[x], x]D[f[x], x]Series[f[x], {x, 1 / 2, 3}]Plot[f[x], {x, -10, 10}]ComplexPlot[f[z], {z, 5}, RasterSize -> 50, PlotLegends -> Automatic]Simple exact values are generated automatically:
DifferentialRoot[Function[{y, x}, {y''[x] + y[x] == 0, y[0] == 0, y'[0] == 1}]][Pi / 2]Use FunctionExpand to attempt to convert a DifferentialRoot object to a built-in mathematical function:
DifferentialRoot[Function[{y, x}, {y''[x] + y[x] == 0, y[0] == 0, y'[0] == 1}]][x]%//FunctionExpandDifferentialRoot works on equations with rational coefficients:
DifferentialRoot[Function[{y, x}, {y'''[x] / x + y[x] == 0, y[0] == 0, y'[0] == 1, y''[0] == 0}]]Inhomogeneous holonomic equations are automatically transformed to higher-order homogeneous ones:
DifferentialRoot[Function[{y, x}, {y'[x] - y[x] - Cos[x] == 0, y[0] == 1}]]Differentiation (4)
The derivative of DifferentialRoot is a DifferentialRoot function:
f = DifferentialRoot[Function[{y, x}, {x + y[x] + y'[x] == 0, y[0] == 1}]][x]D[%, x]Differentiate a DifferentialRoot object with respect to a parameter:
f = DifferentialRoot[Function[{y, x}, {x + a y[x] + y'[x] == 0, y[0] == 1}]]D[f[x], a]Compute higher-order derivatives of a DifferentialRoot object:
f = DifferentialRoot[Function[{y, x}, {x + a y[x] + y'[x] == 0, y[0] == 1}]][x]D[f, {x, 2}]D[f, x, a]D[f, {a, 2}]Differentiate a DifferentialRoot object:
df = D[DifferentialRoot[Function[{y, x}, {4x^2 - y[x] + y'[x] == 0, y[0] == 1}]][x], x]df /. x -> RandomReal[{-5, 5}, 5]Plot[df, {x, -5, 5}]Integration (4)
The integral of a DifferentialRoot object is a DifferentialRoot object:
f = DifferentialRoot[Function[{y, x}, {x + y[x] + y'[x] == 0, y[0] == 1}]]Integrate[f[x], x]Compute higher-order integrals of a DifferentialRoot object:
f = DifferentialRoot[Function[{y, x}, {x + a y[x] + y'[x] == 0, y[0] == 1}]][x]Integrate[f, x, x]Compute the definite integral of a DifferentialRoot object:
f = DifferentialRoot[Function[{y, x}, {x^2 + y[x] + y'[x] == 0, y[0] == 1}]]Subsuperscript[∫, -1, 1]f[x]ⅆxIntegrate a DifferentialRoot object:
F = Integrate[DifferentialRoot[Function[{y, x}, {x^2 + x y[x] + y'[x] == 0, y[0] == 1}]][x], x]F /. x -> RandomReal[{-5, 5}, 5]Plot[F, {x, -5, 5}]Series Expansions (3)
Calculate the series expansion of a DifferentialRoot object:
Series[DifferentialRoot[Function[{y, x}, {y''[x] + y[x] == 0, y[0] == 1, y'[0] == 1}]][x], {x, 0, 5}]Find the ![]()
coefficient of the Taylor expansion of a DifferentialRoot object:
SeriesCoefficient[DifferentialRoot[Function[{y, x}, {y''[x] + y[x] == 0, y[0] == 0, y'[0] == 1}]][x], {x, 0, n}]Calculate the first 9 coefficients:
Table[%, {n, 0, 9}]Compare with the Sin function expansion coefficients:
CoefficientList[Series[Sin[x], {x, 0, 10}]//Normal, {x}]Calculate the series expansion of a DifferentialRoot object with a parameter:
Series[DifferentialRoot[Function[{y, x}, {y''[x] + a y[x] == 0, y[0] == 1, y'[0] == 1}]][x], {x, 0, 5}]Generalizations & Extensions (1)
Applications (4)
Generate a DifferentialRoot object from a special function:
DifferentialRootReduce[BesselJ[2, Sqrt[x ^ 2 + 1]], x]Integrate[%, x]DifferentialRoot objects have all the standard features of a mathematical function:
f = DifferentialRoot[Function[{y, x}, {y'''[x] + 2x y''[x] - y[x] == 0, y[1 / 2] == 1, y'[1 / 2] == -3 / 4, y''[1 / 2] == 0}]][x]Find the coefficients of the series expansion of a DifferentialRoot object:
SeriesCoefficient[f, {x, 1 / 2, n}]Calculate the first 5 coefficients of the expansion explicitly:
Table[%, {n, 0, 5}]Compute arbitrary-order derivatives of a DifferentialRoot object:
df = D[f, x]D[f, {x, 4}]Integrate the DifferentialRoot object:
F = Integrate[f, x]Extract the differential equation and initial conditions of the function that is the integral of f:
%[[0, 1]][y, x]Plot the function f, its integral and derivative functions:
Plot[{f, F, df}, {x, -10, 10}]Use DifferentialRoot to homogenize a differential equation:
dr = DifferentialRoot[Function[{y, x}, {y''[x] - x y[x] == Cos[x^2], y[0] == 1, y'[0] == -3 / 4 I}]]Extract the homogenized equation:
dr[[1]][y, x]Generate a DifferentialRoot object that is a combination of two mathematical functions:
DifferentialRootReduce[Sin[x] + 4 x Cos[x], x]Extract the differential equation and initial conditions that this function obeys:
%[[0, 1]][y, x]Properties & Relations (5)
DifferentialRootReduce generates DifferentialRoot objects:
DifferentialRootReduce[Cos[x], x]DSolve generates a DifferentialRoot object if the solution is not available in known functions:
DSolve[y'''[x] + y'[x] + x^3y[x] == 0, y[x], x]GeneratingFunction may generate a DifferentialRoot object:
GeneratingFunction[DifferenceRoot[Function[{y, n}, {y[n] + (1 + n) (2 + n) y[n + 2] == 0, y[0] == 0, y[1] == 1}]][n], n, x]Integrate returns a DifferentialRoot object for general holonomic functions:
Integrate[DifferentialRoot[Function[{y, x}, {x + y[x] + y'[x] == 0, y[0] == 1}]][x], x]D returns a DifferentialRoot object for general holonomic functions:
D[DifferentialRoot[Function[{y, x}, {x + y[x] + y'[x] == 0, y[0] == 1}]][x], x]Possible Issues (3)
DifferentialRoot takes only linear differential equations with polynomial coefficients:
DifferentialRoot[Function[{y, x}, {Sqrt[x]y''[x] - x y^2[x] == 0, y[0] == 1, y'[0] == -3 / 4 I}]][x]
DifferentialRoot will not evaluate if the initial values are given at a singular point:
DifferentialRoot[Function[{y, x}, {x y''[x] + y'[x] - y[x] == 0, y[0] == 1, y'[0] == -3 / 4 I}]][x]
The branch cut structure of a built-in function may differ from the automatically computed branch cut structure:
f = DifferentialRoot[Function[{y, x}, {x (x - 1)y''[x] + ((1 + 1 / 2 + 1 / 3)x - 1 / 4)y'[x] + 1 / 2 * 1 / 3y[x] == 0, y[1 + I] == Hypergeometric2F1[1 / 2, 1 / 3, 1 / 4, 1 + I], y'[1 + I] == (D[Hypergeometric2F1[1 / 2, 1 / 3, 1 / 4, z], z] /. z -> 1 + I)}]]For some regions of the complex plane, the value of f differs from corresponding built-in function value:
f[2. - I]Hypergeometric2F1[1 / 2, 1 / 3, 1 / 4, 2. - I]For other regions, DifferentialRoot will give the same result:
f[3. + 4I]Hypergeometric2F1[1 / 2, 1 / 3, 1 / 4, 3. + 4I]Neat Examples (1)
Solve a differential equation that is unsolved in known mathematical functions:
sol = DSolveValue[{y''[x] + (x^10 - 1)y[x] == 0, y[0] == 1 / 2, y'[0] == -3 / 4}, y[x], x]Calculate the numerical values of this solution:
Table[sol, {x, 0., 1, 0.2}]Plot[sol, {x, -3, 3}]dsol = D[sol, x]Tech Notes
Related Guides
Text
Wolfram Research (2008), DifferentialRoot, Wolfram Language function, https://reference.wolfram.com/language/ref/DifferentialRoot.html (updated 2020).
CMS
Wolfram Language. 2008. "DifferentialRoot." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/DifferentialRoot.html.
APA
Wolfram Language. (2008). DifferentialRoot. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DifferentialRoot.html
BibTeX
@misc{reference.wolfram_2026_differentialroot, author="Wolfram Research", title="{DifferentialRoot}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/DifferentialRoot.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_differentialroot, organization={Wolfram Research}, title={DifferentialRoot}, year={2020}, url={https://reference.wolfram.com/language/ref/DifferentialRoot.html}, note=[Accessed: 13-June-2026]}