Differential Operators are elements of Weyl Algebra. The Operators
are defined by a list of polynomials in the base ring and the
parent ring of the Operator i.e. the algebra it belongs to.
Takes a list of polynomials for each power of Dx and the
parent ring which must be an instance of DifferentialOperatorAlgebra.
A Differential Operator can be created easily using
the operator Dx. See examples below.
An Ore Algebra is a set of noncommutative polynomials in the
intermediate Dx and coefficients in a base polynomial ring \(A\).
It follows the commutation rule:
.. math
Dxa= \sigma(a)Dx+ \delta(a)
for \(a \subset A\).
Where \(\sigma: A --> A\) is an endomorphism and \(\delta: A --> A\)
is a skew-derivation i.e. \(\delta(ab) = \delta(a) * b + \sigma(a) * \delta(b)\).
If one takes the sigma as identity map and delta as the standard derivation
then it becomes the algebra of Differential Operators also called
a Weyl Algebra i.e. an algebra whose elements are Differential Operators.
This class represents a Weyl Algebra and serves as the parent ring for
Differential Operators.
Examples
>>> from..polys.domainsimportZZ>>> from..importsymbols>>> from.holonomicimportDifferentialOperators>>> x=symbols('x')>>> R,Dx=DifferentialOperators(ZZ.old_poly_ring(x),'Dx')>>> RUnivariate Differential Operator Algebra in intermediate Dx over the base ringZZ[x]
This function is used to create annihilators using Dx.
Returns an Algebra of Differential Operators also called Weyl Algebra
and the operator for differentiation i.e. the Dx operator.
Parameters:
base – Base polynomial ring for the algebra.
The base polynomial ring is the ring of polynomials in \(x\) that
will appear as coefficients in the operators.
generator – Generator of the algebra which can
be either a noncommutative Symbol or a string. e.g. “Dx” or “D”.
Examples
>>> from..polys.domainsimportZZ>>> from..abcimportx>>> from.holonomicimportDifferentialOperators>>> R,Dx=DifferentialOperators(ZZ.old_poly_ring(x),'Dx')>>> RUnivariate Differential Operator Algebra in intermediate Dx over the base ring ZZ[x]>>> Dx*x(1) + (x)*Dx
A Holonomic Function is a solution to a linear homogeneous ordinary
differential equation with polynomial coefficients. This differential
equation can also be represented by an annihilator i.e. a Differential
Operator L such that \(L.f = 0\). For uniqueness of these functions,
initial conditions can also be provided along with the annihilator.
Holonomic functions have closure properties and thus forms a ring.
Given two Holonomic Functions f and g, their sum, product,
integral and derivative is also a Holonomic Function.
For ordinary points initial condition should be a vector of values of
the derivatives i.e. \([y(x_0), y'(x_0), y''(x_0) ... ]\).
For regular singular points initial conditions can also be provided in this
format:
\({s0: [C_0, C_1, ...], s1: [C^1_0, C^1_1, ...], ...}\)
where s0, s1, … are the roots of indicial equation and vectors
\([C_0, C_1, ...], [C^0_0, C^0_1, ...], ...\) are the corresponding intial
terms of the associated power series. See Examples below.
Returns function after composition of a holonomic
function with an algebraic function. The method can’t compute
initial conditions for the result by itself, so they can be also be
provided.
Finds numerical value of a holonomic function using numerical methods.
(RK4 by default). A set of points (real or complex) must be provided
which will be the path for the numerical integration.
The path should be given as a list \([x_1, x_2, ... x_n]\). The numerical
values will be computed at each point in this order
\(x_1 --> x_2 --> x_3 ... --> x_n\).
Returns values of the function at \(x_1, x_2, ... x_n\) in a list.
Finds recurrence relation for the coefficients in the series expansion
of the function about \(x_0\), where \(x_0\) is the point at
which the initial condition is stored.
If the point \(x_0\) is ordinary, solution of the form \([(R, n_0)]\)
is returned. Where \(R\) is the recurrence relation and \(n_0\) is the
smallest n for which the recurrence holds true.
If the point \(x_0\) is regular singular, a list of solutions in
the format \((R, p, n_0)\) is returned, i.e. [(R, p, n_0), … ].
Each tuple in this vector represents a recurrence relation \(R\)
associated with a root of the indicial equation p. Conditions of
a different format can also be provided in this case, see the
docstring of HolonomicFunction class.
If it’s not possible to numerically compute a initial condition,
it is returned as a symbol \(C_j\), denoting the coefficient of
\((x - x_0)^j\) in the power series about \(x_0\).
There may be zero, one, or infinite solutions. If one solution
exists, it will be returned. If infinite solutions exist, it will
be returned parametrically. If no solutions exist, It will throw
ValueError.
Parameters:
b (Matrix) – The right hand side of the equation to be solved for. Must have
the same number of rows as matrix A.
freevar (List) – If the system is underdetermined (e.g. A has more columns than
rows), infinite solutions are possible, in terms of an arbitrary
values of free variables. Then the index of the free variables
in the solutions (column Matrix) will be returned by freevar, if
the flag freevar is set to True.
Returns:
x (Matrix) – The matrix that will satisfy Ax = B. Will have as many rows as
matrix A has columns, and as many columns as matrix B.
params (Matrix) – If the system is underdetermined (e.g. A has more columns than
rows), infinite solutions are possible, in terms of an arbitrary
parameters. These arbitrary parameters are returned as params
Matrix.
A Holonomic Sequence is a type of sequence satisfying a linear homogeneous
recurrence relation with Polynomial coefficients. Alternatively, A sequence
is Holonomic if and only if its generating function is a Holonomic Function.
A Recurrence Operator Algebra is a set of noncommutative polynomials
in intermediate Sn and coefficients in a base ring A. It follows the
commutation rule:
Sn * a(n) = a(n + 1) * Sn
This class represents a Recurrence Operator Algebra and serves as the parent ring
for Recurrence Operators.
Examples
>>> from..polys.domainsimportZZ>>> from..importsymbols>>> from.recurrenceimportRecurrenceOperators>>> n=symbols('n',integer=True)>>> R,Sn=RecurrenceOperators(ZZ.old_poly_ring(n),'Sn')>>> RUnivariate Recurrence Operator Algebra in intermediate Sn over the base ringZZ[n]
Returns an Algebra of Recurrence Operators and the operator for
shifting i.e. the Sn operator.
The first argument needs to be the base polynomial ring for the algebra
and the second argument must be a generator which can be either a
noncommutative Symbol or a string.
The holonomic module is intended to deal with holonomic functions along
with various operations on them like addition, multiplication, composition,
integration and differentiation. The module also implements various kinds of
conversions such as converting holonomic functions to a different form and the
other way around.