polysols - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


DEtools

  

polysols

  

find polynomial solutions of a linear ODE

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

polysols(ODE, v, opts)

polysols(coeff_list, g, x, output=solution)

Parameters

ODE

-

ordinary differential equation - linear or not - or a set or list of them

v

-

optional - the unknown function of the ODE, or a set or list of them in the case of an ODE system

coeff_list

-

list of coefficients of a Linear ODE, or list of lists in the case of a Linear ODE system

g

-

right-hand side of a Linear ODE or a list of them in the case of a Linear ODE system

x

-

independent variable of a Linear ODE or system of them

output = solution

-

optional, for Linear ODEs, the output is returned as a solution expression, as dsolve does

opts

-

optional, for Nonlinear ODEs and systems of them, could be any of the optional arguments accepted by casesplit

Description

• 

The polysols command returns polynomial solutions of an ODE or a system of them with rational function coefficients.

• 

The first calling sequence has an ODE or a system of them as the first argument, and, optionally, a variable, set or list of them indicating who are the unknown functions as the second argument - say v. If v is not given, all differentiated functions found in ODE are taken as the unknown functions of the problem. In the case of Nonlinear ODE systems, v can also be a solving ranking as described in casesplit and any of the optional arguments accepted by the casesplit command are valid for polysols.

• 

The second calling sequence is valid only for Linear ODEs and is described as follows.

  

Case of a single Linear ODE

  

- The first argument is the list of coefficients cnx

c0,c1,...,cn

  

entering the ODE, say, in y(x),

c0y+c1y'+...+cnyn=gx

  

- The second argument is the right-hand side of such an equation, g(x), so-called non-homogeneous term;

  

- The third argument is the independent variable of the ODE, say x.

• 

The output is a list of independent polynomial solutions representing a solution basis. If the ODE admits as many polynomial solutions as the differential order, the basis returned is complete. In the nonhomogeneous case, the returned value is a two-element list, with the first element a basis for the homogeneous case and the second element a particular polynomial solution (if it exists). When the optional argument output=solution is given, the output is an explicit closed form solution as the ones returned by dsolve.

  

Case of a system of Linear ODEs

  

- The first argument is a list of list(s) where each inner list corresponds to one equation in the system; in turn this list contains list(s) of the coefficients corresponding to each function and its derivatives in the linear ODE system, as explained in the previous paragraph for a single Linear ODE. For example, suppose a system with unknowns fix, this shows the correspondence between the list and function representations in typical cases (see also the examples at the end)

0,1,−1=ⅆⅆxf1xf2x=0

,0,1,−1,−1=ⅆⅆxf2xf3xf4x=0

,x2,2,,,0,1=x2f2x+2f3x+ⅆⅆxf6x=0

  

- The second argument is a list containing the right-hand sides of each equation of the system

  

- The third argument is the independent variable of the Linear ODE system

• 

The output consists of a list of solution basis corresponding to each function. When no polynomial solutions exist for one function, the corresponding list is empty. In the nonhomogeneous case, the output consists of a two-element list, with the first element a list of lists of solution basis for the homogeneous case and the second element a particular polynomial solution (if it exists). When the optional argument output=solution is given, the output is an explicit closed form solution as the ones returned by dsolve, enclosed into a list.

• 

The polysols command is implemented as a module and provides direct access to each of its subroutines. These subroutines are of use as programmer entry points by shortcutting the identification of the type of problem and testing of arguments for correctness, e.g., when you know a priori what the type of problem is, and are sure that test for correctness of arguments is not necessary. For each type of problem you can use the corresponding subroutine as follows.

  

- Problem: an ODE system, Linear or not, represented by standard equations. Subroutine: `DEtools/polysols`:-ODESystem

  

- Problem: a Linear ODE system represented by a list of lists of lists. Subroutine: `DEtools/polysols`:-ODESystemList

  

- Problem: a single ODE, Linear or not, represented by an equation or algebraic expression: `DEtools/polysols`:-ODE

  

- Problem: a single Linear ODE  represented by a list of coefficients. Subroutine: `DEtools/polysols`:-ODEList

  

- Problem: particular solution for a single Linear ODE represented by a list of coefficients. Subroutine: `DEtools/polysols`:-ODEListParticularSolution

  

- Problem: switch the output from a list consisting of a solution basis to the standard solution form used by dsolve. Subroutine: `DEtools/polysols`:-FormatOutput

  

Libraries in use

• 

In order to find solutions:

  

- In the Linear ODE system case, or the case of a single ODE enclosed into a list, polysols uses the LinearFunctionalSystems[PolynomialSolution] command;

  

- In the single Linear ODE case, polysols uses its own optimized code;

  

- In the case of a Nonlinear ODE or a system of them, polysols uses the libraries for computing traveling wave solutions for autonomous PDE systems.

Examples

withDEtools,polysols:

Linear ODEs

  

Homogeneous case

odeHdiffzt,`$`t,23tdiffzt,t+3t2zt=0

odeHⅆ2ⅆt2zt3ⅆⅆtztt+3ztt2=0

(1)

polysolsodeH

t,t3

(2)
  

The same result can be obtained using the programmer's entry point, `DEtools/polysols`:-ODE(ode, z(t)), which shortcuts the identification of the type of problem and avoids spending time testing the arguments for correctness.

  

Same problem but using the optional argument output = solution

polysolsodeH,output=solution

zt=_C2t3+_C1t

(3)
  

Adding a non-homogeneous term

odeNHlhsodeH=3t2t+12

odeNHⅆ2ⅆt2zt3ⅆⅆtztt+3ztt2=3t2t+12

(4)

polysolsodeNH

t,t3,15t6+34t5+t4

(5)
  

The same Linear ODE but given as a list of coefficients (see DEtools[convertAlg]), with the right-hand-side (non-homogeneous term) passed as second argument to polysols

odeH_list,NHtermopDEtoolsconvertAlgodeNH,zt

odeH_list,NHterm3t2,3t,1,3t4+6t3+3t2

(6)

polysolsodeH_list,NHterm,t

t,t3,15t6+34t5+t4

(7)
  

When giving a Linear ODE system, the number of equations and unknowns must be the same. The default format for the output is a list of polynomial solution basis for each function

sysdiffy1x,xy2x,diffy2x,xy3xy4x,diffy3x,xy5x,diffy4x,x2y1x2xy2xy5x,diffy5x,xx2y1x2xy3xy6x,diffy6x,xx2y2x+2y3x

sysⅆⅆxy1xy2x,ⅆⅆxy2xy3xy4x,ⅆⅆxy3xy5x,ⅆⅆxy4x2y1x2xy2xy5x,ⅆⅆxy5xx2y1x2xy3xy6x,ⅆⅆxy6xx2y2x+2y3x

(8)

varsy1x,y2x,y3x,y4x,y5x,y6x

varsy1x,y2x,y3x,y4x,y5x,y6x

(9)

polysolssys,vars

0,1,x,0,0,1,1,x,x2,−1,x,x2,0,−1,2x,2x,x2,x32

(10)
  

The same result can be obtained using the corresponding programmer's entry point, `DEtools/polysols`:-ODESystem(sys, vars).

  

The equivalent closed form solution using the output = solution option

polysolssys,vars,output=solution

y1x=_C3x+_C2,y2x=_C3,y3x=_C3x2_C2x+_C1,y4x=_C3x2+_C2x_C1,y5x=2_C3x_C2,y6x=_C3x3+_C2x22_C1x2_C3

(11)
  

The same Linear ODE system given as a list of lists of lists

sys0,1,1,,0,1,1,1,,,0,1,,1,2,2x,,0,1,1,x2,,2x,,0,1,1,,x2,2,,,0,1

sys0,1,−1,,0,1,−1,−1,,,0,1,,−1,−2,2x,,0,1,−1,x2,,2x,,0,1,−1,,x2,2,,,0,1

(12)

polysolssys,0,0,0,0,0,0,x

0,1,x,0,0,1,1,x,x2,−1,x,x2,0,−1,2x,2x,x2,x32

(13)
  

Using polysols to reduce the order of an ODE: combining the functionality of various DEtools commands

  

Consider the list of four infinitesimals for symmetry generators of the form ξ=0,η=fx (see symgen)

S0,x,0,x12,0,x3,0,1x

S0,x,0,x12,0,x3,0,1x

(14)
  

For linear ODEs, the function fx entering symmetries of the form 0,fx is always a solution of the ODE. So we can construct the most general Linear ODE of fourth order having the four solutions (symmetries) above, three of which are polynomial in x, via (see DEtools[equinv])

lin_DEDEtoolsequinvS,yx,4

lin_DEⅆ4ⅆx4yx=x2+3ⅆ3ⅆx3yxx3x+3ⅆ2ⅆx2yxx26ⅆⅆxyxx3x+6yxx2x21+_F1x

(15)
  

For the purpose of using polysols in this example, we remove here the arbitrary non-homogeneous and non-rational term _F1x

odesubs_F1x=0,lin_DE

odeⅆ4ⅆx4yx=x2+3ⅆ3ⅆx3yxx3x+3ⅆ2ⅆx2yxx26ⅆⅆxyxx3x+6yxx2x21

(16)
  

Compute the polynomial solutions

sol_basispolysolsode,yx

sol_basisx,x3,x2+1

(17)
  

Since this ODE is of fourth order and there are only three polynomial solutions, the above is not sufficient to construct the most general solution for ode. However, each ODE solution leads to a reduction of order (see DEtools[reduce_order]), so using the polynomial solutions above we can reduce the order by three

RDEtoolsreduce_orderode,basis=sol_basis

Ryx=_a2_a_a23_b_aⅆ_a+_C32_a4ⅆ_a+_C2ⅆ_a+_C1where_a_a21_a23ⅆⅆ_a_b_a+4_a4+6_a26_b_a=0,_a=x,_b_a=xⅆ3ⅆx3yxx33ⅆ2ⅆx2yxx23ⅆ3ⅆx3yxx+6ⅆⅆxyxx+3ⅆ2ⅆx2yx6yxx232,x=_a,yx=_a2_a_a23_b_aⅆ_a+_C32_a4ⅆ_a+_C2ⅆ_a+_C1

(18)
  

In above we see an ODESolStructure where the solving of the original fourth order ODE problem is reduced to the solving of one first order linear ODE in _b_a

op2,2,1,1,R

_a_a21_a23ⅆⅆ_a_b_a+4_a4+6_a26_b_a=0

(19)
  

You can also request to reduce_order to automatically attempt integrating that remaining ODE using the option output = solution

SDEtoolsreduce_orderode,basis=sol_basis,output=solution

Syx=x2xx23x21_C4x232x2ⅆx+_C32x4ⅆx+_C2ⅆx+_C1

(20)

valueS

yx=x_C2x2+_C3x+_C3x+_C424x2+_C1

(21)
  

In the solution above we see the four solutions used to construct the problem, three of which are polynomial and were used to reduce the problem from a fourth order ODE to a first order one.

Nonlinear ODEs

  

A nonlinear fourth order equation, a constant and two linear solutions for it

ODE13q2a21+t22sut+16pqa21+t22sdiffut,t2+13q2a21+t2tsut2+13pqa21+t2tsut118a2t13612arqt213sq12+12q2a2t26q2a232p2s+r2qtt+1s2diffut,t136a31+t23r612sq32+12q2ats2s3diffut,`$`t,3+16q2a21+t22sut2+16pqa21+t22sut1721+t22a212r612sq32at+2sr2q3s2p212q2a2s2+72s2q2a2t2s3diffut,`$`t,2136q2a41+t24sdiffut,`$`t,4

ODEq2a2t212ut3s+pqa2t2126sⅆⅆtut2+q2a2t21tut23s+pqa2t21tut3sa2t136arqt213sq+12q2a2t26q2a232p2s+r2qtt+118s2ⅆⅆtuta3t213r6sq32+12q2ats2ⅆ3ⅆt3ut36s3+q2a2t212ut26s+pqa2t212ut6st212a212r6sq32at+2sr2q3s2p212q2a2s2+72s2q2a2t272s3ⅆ2ⅆt2utq2a4t214ⅆ4ⅆt4ut36s

(22)

ODE_solDEtoolspolysolsODE

ODE_solut=_C3,ut=tasqr6+3ps6sq,ut=ta+sqr63ps6sq

(23)
  

Solutions can be tested as usual with odetest

mapodetest,ODE_sol,ODE

0,0,0

(24)
  

Using the optional argument singsol=false, the singular cases (in this example: the constant solution) are not computed

DEtoolspolysolsODE,singsol=false

ut=tasqr6+3ps6sq,ut=ta+sqr63ps6sq

(25)
  

A nonlinear seventh order equation depending on three parameters a,b,c and polynomial solutions for it taking these parameters as solving variables:

ODEat2+aut1215913185a3ct24335a3c+315a3ct6525a3ct4+259080a5t4259080a5t2+34544a5+2159bt+1t1diffut,t54318a3t+14t14105t2c+17272a235ctdiffut,`$`t,4117272a3t+15t15315t2c+17272a235cdiffut,`$`t,5152159a363t4c70t2c+34544a2t2+879c17272a2tt+12t12diffut,`$`t,254318a3315t4c+103632a2t2210t2c+879c17272a2t+13t13diffut,`$`t,32117272ca31+t26tdiffut,`$`t,6134544ca31+t27diffut,`$`t,7

ODEat2+aut315a3ct6+259080a5t4525a3ct4259080a5t2+13185a3ct2+34544a54335a3c+2159bt+1t12159ⅆⅆtut5a3t+14t14105t2c+17272a235ctⅆ4ⅆt4ut4318a3t+15t15315t2c+17272a235cⅆ5ⅆt5ut1727215a363t4c+34544a2t270t2c17272a2+879ctt+12t12ⅆ2ⅆt2ut21595a3315t4c+103632a2t2210t2c17272a2+879ct+13t13ⅆ3ⅆt3ut431821ca3t216tⅆ6ⅆt6ut17272ca3t217ⅆ7ⅆt7ut34544

(26)

DEtoolspolysolsODE,parameters=a,b,c

a=a,b=b,c=c,ut=_C3,a=a,b=109525a5_C3a,c=2159a225,ut=83165a4t6332645a4t4+8316a4t2+_C3,a=0,b=0,c=c,ut=_C9t6+_C8t5+_C7t4+_C6t3+_C5t2+_C4t+_C3

(27)
  

A nonlinear ODE system

ode112+12t2aut+2+6t48t2a34bt2+4bdiffut,t+12+12t2adiffwt,t+2424t2avtdiffvt,t+6a31+t22tdiffut,`$`t,2+a31+t23diffut,`$`t,3=0

ode112t212aut+6t48t2+2a34bt2+4bⅆⅆtut+12t212aⅆⅆtwt+24t2+24avtⅆⅆtvt+6a3t212tⅆ2ⅆt2ut+a3t213ⅆ3ⅆt3ut=0

(28)

ode266t2aut+26t4+8t2a32bt2+2bdiffwt,t6a31+t22tdiffwt,`$`t,2a31+t23diffwt,`$`t,3=0

ode26t2+6aut+6t4+8t22a32bt2+2bⅆⅆtwt6a3t212tⅆ2ⅆt2wta3t213ⅆ3ⅆt3wt=0

(29)

ode366t2aut+26t4+8t2a32bt2+2bdiffvt,ta31+t23diffvt,`$`t,36a31+t22tdiffvt,`$`t,2=0

ode36t2+6aut+6t4+8t22a32bt2+2bⅆⅆtvta3t213ⅆ3ⅆt3vt6a3t212tⅆ2ⅆt2vt=0

(30)

sysode1,ode2,ode3:

  

Set the infolevel to 1 to see basic information on the computation of a non-singular polynomial solutions for it

infolevelpolysols1

infolevelpolysols1

(31)

DEtoolspolysolssys,parameters=a,b,singsol=false

* Power series solution [1]: {u(t) = t^2*A[1,2]+t*A[1,1]+A[1,0], v(t) = t*A[2,1]+A[2,0], w(t) = t^4*A[3,4]+t^3*A[3,3]+t^2*A[3,2]+t*A[3,1]+A[3,0]}, splitting into cases with respect to the parameters {a, b}
* Power series solution [2]: {u(t) = t^2*A[1,2]+t*A[1,1]+A[1,0], v(t) = t^2*A[2,2]+t*A[2,1]+A[2,0], w(t) = t*A[3,1]+A[3,0]}, splitting into cases with respect to the parameters {a, b}

a=a,b=a43_C322a,ut=a2t2+a4_C322a2,vt=_C3t+_C52_C3,wt=_C5t+_C4

(32)
  

To see the whole set of solutions including the singular ones try the input above without singsol=false.

See Also

DEtools

DEtools/reduce_order

DEtools[dcoeffs]

DEtools[equinv]

dsolve

LinearFunctionalSystems[PolynomialSolution]