Ask Your Question
1

How to solve a formal PDE

asked 2022-12-07 22:56:11 +0100

Marco Castronovo gravatar image

Introduction

A multivariate formal series $f\in\mathbb{Q}[[x_1,\ldots ,x_n]]$ can be written as $$f(x_1,\ldots ,x_n) = \sum_{i_1,\ldots ,i_n\geq 0}c(i_1,\ldots ,i_n)x_1^{i_1}\cdots x_n^{i_n} \quad .$$ When $1\leq k\leq n$ denote $f_k$ the partial derivative of $f$ with respect to the variable $x_k$, and when $1\leq k_1,\ldots k_t\leq n$ denote $f_{k_1\cdots k_t}$ the order $t$ partial derivative with respect to the variables $x_{k_1},\ldots ,x_{k_t}$. Since two formal power series are equal if all the coefficients of their monomials are equal, a partial differential equation for $f$ (formal PDE) is equivalent to a system of polynomial equations for the coefficients $c(i_1,\ldots ,i_n)$.

Example of mixed exponential type

Consider $n=2$ variables, and the formal power series $$f(x_1,x_2)=\sum_{d\geq 1}N(d)e^{dx_1}\frac{x_2^{3d-1}}{(3d-1)!} \quad .$$ This is an example of formal series of "mixed exponential type", because its presentation involves exponentials of some of the variables. By expanding the exponential and renaming indices, it can be written as above with $c(i_1,i_2)=(\frac{i_2+1}{3})^{i_1}N(\frac{i_2+1}{3})/(i_1!i_2!)$ if $i_2 \equiv 2 \; (\textrm{mod 3})$ and $c(i_1,i_2)=0$ otherwise. The PDE $$f_{222} = f_{112}^2 -f_{111}f_{122}$$ is equivalent to the polynomial equations for $d\geq 2$ $$N(d)=\sum_{d_1+d_2=d}N(d_1)N(d_2)\left( d_1^2d_2^2 \binom{3d-4}{3d_1-2} -d_1^3d_2\binom{3d-4}{3d_1-1}\right)$$ and this sequence is uniquely determined by the value of $N(1)$. As discovered by Kontsevich, if $N(1)=1$ then $N(d)$ is the number of rational curves of degree $d$ through $3d-1$ generic points in the complex projective plane.

Question

Can one use SageMath to solve formal PDEs? By solving I mean the following: given the formal PDE and a degree bound $b \in \mathbb{N}$, compute all numbers $c(i_1,\ldots ,i_n)\in\mathbb{Q}$ with $i_1+\ldots +i_n\leq b$ for the solution (assuming that it exists and is unique). In practice, it would be nice if the proposed method allowed to work with formal series of "mixed exponential type" too. A good test would be to see if in the example above the method computes, given $b\in\mathbb{N}$, all numbers $N(d)$ with $d \leq b$ as listed in OEIS A013587 (cannot post link due to low karma).

edit retag flag offensive close merge delete

Comments

Do you mean a function like pdsolve/series in Maple?

Max Alekseyev gravatar imageMax Alekseyev ( 2022-12-14 01:53:07 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2022-12-14 02:57:45 +0100

Max Alekseyev gravatar image

updated 2022-12-14 15:45:40 +0100

This functionality can be implemented via solving a system of polynomial equations:

L = 6        # number of terms to compute
R = PolynomialRing(QQ,L,'N')
N = R.gens()
K.<x1,x2> = PowerSeriesRing(R,default_prec=3*L)
f = sum(N[d]*((d+1)*x1).exp()*x2^(3*(d+1)-1)/factorial(3*(d+1)-1) for d in range(L))
p = f.polynomial()    # differentiation seems to be broken for power series
x = p.parent().gens()
eq = p.derivative( x[1], 3 ) - p.derivative( x[0], x[0], x[1] )^2 + p.derivative( x[0], x[0], x[0] )*p.derivative( x[0], x[1], x[1] )
eq = K(eq).add_bigoh(3*L-3)
J = R.ideal( list(eq.dict().values())+[N[0]-1] )
print( J.variety() )

Intermediate conversion to polynomial is needed here due to the bug https://trac.sagemath.org/ticket/34846

edit flag offensive delete link more

Comments

The last instruction gives the following error, and Sage quits automatically after it:


(no backtrace available)

Unhandled SIGILL: An illegal instruction occurred. This probably occurred because a compiled module has a bug in it and is not properly wrapped with sig_on(), sig_off().

Python will now terminate.

/Applications/SageMath/src/bin/sage-python: line 2: 2551 Illegal instruction: 4 sage -python "$@"

Marco Castronovo gravatar imageMarco Castronovo ( 2023-09-26 21:28:30 +0100 )edit

What's your Sage version? It may be worth it to update it to the latest one.

Max Alekseyev gravatar imageMax Alekseyev ( 2023-09-26 21:49:26 +0100 )edit

It works with Sage 10.1. Thanks!

Marco Castronovo gravatar imageMarco Castronovo ( 2023-10-05 15:28:02 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2022-12-07 22:54:24 +0100

Seen: 476 times

Last updated: Dec 14 '22