DEtools - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Differential Equations : DEtools : Solving Methods : DEtools/polysols

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 Non-Linear 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 Non-Linear 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 c[n]x

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 f[i]x, this shows the correspondence between the list and function representations in typical cases (see also the examples at the end)

0,1,1=ⅆⅆxf[1]xf[2]x=0

,0,1,1,1=ⅆⅆxf[2]xf[3]xf[4]x=0

,x2,2,,,0,1=x2f[2]x+2f[3]x+ⅆⅆxf[6]x=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 Non-Linear 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

odeHⅆ2ⅆt2zt3ⅆⅆtztt+3ztt2=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,NHtermopDEtools[convertAlg]odeNH,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

sysⅆⅆxy1xy2x,ⅆⅆxy2xy3xy4x,ⅆⅆxy3xy5x,ⅆⅆxy4x2y1x2xy2xy5x,ⅆⅆxy5xx2y1x2xy3xy6x,ⅆⅆxy6xx2y2x+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