Skip to content

tapir442/delierium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

delierium

Differential Equations' LIE symmetries Research InstrUMent

Searching for symmetries in ODEs using Python/SageMath/sympy

Status

  • still playing around with Janet bases
  • Lie ouput form a alpha

Release 0.0.1.dev1

  • Just constructing a Janet basis from a list of homogenuous linear PDEs (for grevlex and degrevlex order, lex is dubious)

Literature (and inspiration):

Goals:

  • Short term:
    • All kinda stuff for symmetry analysis of ODE/PDE , doing is step by step, whatver comes to my mind
  • Mid term:
    • Make it a valuable package
  • Long term:
    • Maybe integration into SciPy|SymPy|SageMath

Release History

Release 0.1.0

offers two functions 'Janet_Basis' and 'infinitesimalsODE' as described below.

Note that 'infinitesimalsODE' does only return the overdetermined system stemming from the prolongation of the original ODE. The real infinitesimal are part of the next release.

Documentation(work in progress)

How to use

Get the determining equations for the symmetry of an third order ODE:

>>> from delierium.Infinitesimals import infinitesimalsODE
>>> from sage.calculus.var import var, function
>>> from sage.calculus.functional import diff
>>> x   = var('x')
>>> y   = function('y')
>>> ode = diff(y(x), x, 3) + y(x) * diff(y(x), x, 2)
>>> inf = infinitesimalsODE(ode, y, x)
>>> print("determining system:")
>>> for _ in inf:
>>>     print(_)
>>> -3*D[0](xi)(y(x), x)
>>> -6*D[0, 0](xi)(y(x), x)
>>> y(x)*D[0](xi)(y(x), x) + 3*D[0, 0](phi)(y(x), x) - 9*D[0, 1](xi)(y(x), x)
>>> y(x)*D[1](xi)(y(x), x) + phi(y(x), x) + 3*D[0, 1](phi)(y(x), x) - 3*D[1, 1](xi)(y(x), x)
>>> -D[0, 0, 0](xi)(y(x), x)
>>> -y(x)*D[0, 0](xi)(y(x), x) + D[0, 0, 0](phi)(y(x), x) - 3*D[0, 0, 1](xi)(y(x), x)
>>> y(x)*D[0, 0](phi)(y(x), x) - 2*y(x)*D[0, 1](xi)(y(x), x) + 3*D[0, 0, 1](phi)(y(x), x) - 3*D[0, 1, 1](xi)(y(x), x)
>>> 2*y(x)*D[0, 1](phi)(y(x), x) - y(x)*D[1, 1](xi)(y(x), x) + 3*D[0, 1, 1](phi)(y(x), x) - D[1, 1, 1](xi)(y(x), x)
>>> y(x)*D[1, 1](phi)(y(x), x) + D[1, 1, 1](phi)(y(x), x)    

If you are using JupyterLab, you can print the results in a more human readable way:

from IPython.display import Math

from delierium.helpers import latexer

from delierium.helpers import latexer

from delierium.helpers import latexer

x = var('x')

y = function('y')

ode = diff(y(x), x, 3) + y(x) * diff(y(x), x, 2)

display(Math(latexer(ode)))

inf = infinitesimalsODE(ode, y, x)

print("determining system:")

for _ in inf:

display(Math(latexer(_)))

In this mode a derivative like d^2y/dx^2 is shown as y_x(superscript x)

Janet Basis

>>> import sage.all
>>> from delierium.JanetBasis import Janet_Basis
>>> from sage.calculus.var import var, function
>>> from sage.calculus.functional import diff
>>> vars = var ("x y")
>>> z = function("z")(*vars)
>>> w = function("w")(*vars)
>>> f1 = diff(w, y) + x*diff(z,y)/(2*y*(x**2+y)) - w/y
>>> f2 = diff(z, x, y) + y*diff(w,y)/x + 2*y*diff(z, x)/x
>>> f3 = diff(w, x, y) - 2*x*diff(z, x, 2)/y - x*diff(w,x)/y**2
>>> f4 = diff(w, x, y) + diff(z, x, y) + diff(w, y)/(2*y) - diff(w,x)/y + x* diff(z, y)/y - w/(2*y**2)
>>> f5 = diff(w,y,y) + diff(z,x,y) - diff(w, y)/y + w/(y**2)
>>> system_2_24 = [f1,f2,f3,f4,f5]
>>> jb=Janet_Basis(system_2_24, (w,z), vars)
>>> jb.show()
>>> diff(z(x, y), y)
>>> diff(z(x, y), x) + (1/2/y) * w(x, y)
>>> diff(w(x, y), y) + (-1/y) * w(x, y)
>>> diff(w(x, y), x)

About

Differential Equations' LIE symmetries Research InstrUMent

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published