 polysols - Maple Help

DEtools

 polysols
 find polynomial solutions of a linear ODE 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}\left(x\right)$

$\left[{c}_{0},{c}_{1},\mathrm{...},{c}_{n}\right]$

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

${c}_{0}y+{c}_{1}\mathrm{y\text{'}}+\mathrm{...}+{c}_{n}{y}^{\left(n\right)}=g\left(x\right)$

 - 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}\left(x\right)$, this shows the correspondence between the list and function representations in typical cases (see also the examples at the end)

$\left[\left[0,1\right],\left[-1\right]\right]=\left(\frac{ⅆ}{ⅆx}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}_{1}\left(x\right)-{f}_{2}\left(x\right)=0\right)$

$\left[\left[\right],\left[0,1\right],\left[-1\right],\left[-1\right]\right]=\left(\frac{ⅆ}{ⅆx}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}_{2}\left(x\right)-{f}_{3}\left(x\right)-{f}_{4}\left(x\right)=0\right)$

$\left[\left[\right],\left[-{x}^{2}\right],\left[2\right],\left[\right],\left[\right],\left[0,1\right]\right]=\left(-{x}^{2}{f}_{2}\left(x\right)+2{f}_{3}\left(x\right)+\frac{ⅆ}{ⅆx}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}_{6}\left(x\right)=0\right)$

 - 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

 > $\mathrm{with}\left(\mathrm{DEtools},\mathrm{polysols}\right):$ Linear ODEs

 Homogeneous case
 > $\mathrm{odeH}≔\mathrm{diff}\left(z\left(t\right),\mathrm{}\left(t,2\right)\right)-\frac{3}{t}\mathrm{diff}\left(z\left(t\right),t\right)+\frac{3}{{t}^{2}}z\left(t\right)=0$
 ${\mathrm{odeH}}{≔}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{t}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{z}{}\left({t}\right){-}\frac{{3}{}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{z}{}\left({t}\right)\right)}{{t}}{+}\frac{{3}{}{z}{}\left({t}\right)}{{{t}}^{{2}}}{=}{0}$ (1)
 > $\mathrm{polysols}\left(\mathrm{odeH}\right)$
 $\left[{t}{,}{{t}}^{{3}}\right]$ (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
 > $\mathrm{polysols}\left(\mathrm{odeH},\mathrm{output}=\mathrm{solution}\right)$
 $\left[{z}{}\left({t}\right){=}{\mathrm{_C2}}{}{{t}}^{{3}}{+}{\mathrm{_C1}}{}{t}\right]$ (3)
 > $\mathrm{odeNH}≔\mathrm{lhs}\left(\mathrm{odeH}\right)=3{t}^{2}{\left(t+1\right)}^{2}$
 ${\mathrm{odeNH}}{≔}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{t}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{z}{}\left({t}\right){-}\frac{{3}{}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{z}{}\left({t}\right)\right)}{{t}}{+}\frac{{3}{}{z}{}\left({t}\right)}{{{t}}^{{2}}}{=}{3}{}{{t}}^{{2}}{}{\left({t}{+}{1}\right)}^{{2}}$ (4)
 > $\mathrm{polysols}\left(\mathrm{odeNH}\right)$
 $\left[\left[{t}{,}{{t}}^{{3}}\right]{,}\frac{{1}}{{5}}{}{{t}}^{{6}}{+}\frac{{3}}{{4}}{}{{t}}^{{5}}{+}{{t}}^{{4}}\right]$ (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
 > $\mathrm{odeH_list},\mathrm{NHterm}≔\mathrm{op}\left(\mathrm{DEtools}\left[\mathrm{convertAlg}\right]\left(\mathrm{odeNH},z\left(t\right)\right)\right)$
 ${\mathrm{odeH_list}}{,}{\mathrm{NHterm}}{≔}\left[\frac{{3}}{{{t}}^{{2}}}{,}{-}\frac{{3}}{{t}}{,}{1}\right]{,}{3}{}{{t}}^{{4}}{+}{6}{}{{t}}^{{3}}{+}{3}{}{{t}}^{{2}}$ (6)
 > $\mathrm{polysols}\left(\mathrm{odeH_list},\mathrm{NHterm},t\right)$
 $\left[\left[{t}{,}{{t}}^{{3}}\right]{,}\frac{{1}}{{5}}{}{{t}}^{{6}}{+}\frac{{3}}{{4}}{}{{t}}^{{5}}{+}{{t}}^{{4}}\right]$ (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
 > $\mathrm{sys}≔\left[\mathrm{diff}\left(\mathrm{y1}\left(x\right),x\right)-\mathrm{y2}\left(x\right),\mathrm{diff}\left(\mathrm{y2}\left(x\right),x\right)-\mathrm{y3}\left(x\right)-\mathrm{y4}\left(x\right),\mathrm{diff}\left(\mathrm{y3}\left(x\right),x\right)-\mathrm{y5}\left(x\right),\mathrm{diff}\left(\mathrm{y4}\left(x\right),x\right)-2\mathrm{y1}\left(x\right)-2x\mathrm{y2}\left(x\right)-\mathrm{y5}\left(x\right),\mathrm{diff}\left(\mathrm{y5}\left(x\right),x\right)-{x}^{2}\mathrm{y1}\left(x\right)-2x\mathrm{y3}\left(x\right)-\mathrm{y6}\left(x\right),\mathrm{diff}\left(\mathrm{y6}\left(x\right),x\right)-{x}^{2}\mathrm{y2}\left(x\right)+2\mathrm{y3}\left(x\right)\right]$
 ${\mathrm{sys}}{≔}\left[\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{y1}}{}\left({x}\right){-}{\mathrm{y2}}{}\left({x}\right){,}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{y2}}{}\left({x}\right){-}{\mathrm{y3}}{}\left({x}\right){-}{\mathrm{y4}}{}\left({x}\right){,}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{y3}}{}\left({x}\right){-}{\mathrm{y5}}{}\left({x}\right){,}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{y4}}{}\left({x}\right){-}{2}{}{\mathrm{y1}}{}\left({x}\right){-}{2}{}{x}{}{\mathrm{y2}}{}\left({x}\right){-}{\mathrm{y5}}{}\left({x}\right){,}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{y5}}{}\left({x}\right){-}{{x}}^{{2}}{}{\mathrm{y1}}{}\left({x}\right){-}{2}{}{x}{}{\mathrm{y3}}{}\left({x}\right){-}{\mathrm{y6}}{}\left({x}\right){,}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{y6}}{}\left({x}\right){-}{{x}}^{{2}}{}{\mathrm{y2}}{}\left({x}\right){+}{2}{}{\mathrm{y3}}{}\left({x}\right)\right]$ (8)
 > $\mathrm{vars}≔\left[\mathrm{y1}\left(x\right),\mathrm{y2}\left(x\right),\mathrm{y3}\left(x\right),\mathrm{y4}\left(x\right),\mathrm{y5}\left(x\right),\mathrm{y6}\left(x\right)\right]$
 ${\mathrm{vars}}{≔}\left[{\mathrm{y1}}{}\left({x}\right){,}{\mathrm{y2}}{}\left({x}\right){,}{\mathrm{y3}}{}\left({x}\right){,}{\mathrm{y4}}{}\left({x}\right){,}{\mathrm{y5}}{}\left({x}\right){,}{\mathrm{y6}}{}\left({x}\right)\right]$ (9)
 > $\mathrm{polysols}\left(\mathrm{sys},\mathrm{vars}\right)$
 $\left[\left[{0}{,}{1}{,}{x}\right]{,}\left[{0}{,}{0}{,}{1}\right]{,}\left[{1}{,}{-}{x}{,}{-}{{x}}^{{2}}\right]{,}\left[{-1}{,}{x}{,}{{x}}^{{2}}\right]{,}\left[{0}{,}{-1}{,}{-}{2}{}{x}\right]{,}\left[{-}{2}{}{x}{,}{{x}}^{{2}}{,}{{x}}^{{3}}{-}{2}\right]\right]$ (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
 > $\mathrm{polysols}\left(\mathrm{sys},\mathrm{vars},\mathrm{output}=\mathrm{solution}\right)$
 $\left[\left\{{\mathrm{y1}}{}\left({x}\right){=}{\mathrm{_C3}}{}{x}{+}{\mathrm{_C2}}{,}{\mathrm{y2}}{}\left({x}\right){=}{\mathrm{_C3}}{,}{\mathrm{y3}}{}\left({x}\right){=}{-}{\mathrm{_C3}}{}{{x}}^{{2}}{-}{\mathrm{_C2}}{}{x}{+}{\mathrm{_C1}}{,}{\mathrm{y4}}{}\left({x}\right){=}{\mathrm{_C3}}{}{{x}}^{{2}}{+}{\mathrm{_C2}}{}{x}{-}{\mathrm{_C1}}{,}{\mathrm{y5}}{}\left({x}\right){=}{-}{2}{}{\mathrm{_C3}}{}{x}{-}{\mathrm{_C2}}{,}{\mathrm{y6}}{}\left({x}\right){=}{\mathrm{_C3}}{}{{x}}^{{3}}{+}{\mathrm{_C2}}{}{{x}}^{{2}}{-}{2}{}{\mathrm{_C1}}{}{x}{-}{2}{}{\mathrm{_C3}}\right\}\right]$ (11)
 The same Linear ODE system given as a list of lists of lists
 > $\mathrm{sys}≔\left[\left[\left[0,1\right],\left[-1\right]\right],\left[\left[\right],\left[0,1\right],\left[-1\right],\left[-1\right]\right],\left[\left[\right],\left[\right],\left[0,1\right],\left[\right],\left[-1\right]\right],\left[\left[-2\right],\left[-2x\right],\left[\right],\left[0,1\right],\left[-1\right]\right],\left[\left[-{x}^{2}\right],\left[\right],\left[-2x\right],\left[\right],\left[0,1\right],\left[-1\right]\right],\left[\left[\right],\left[-{x}^{2}\right],\left[2\right],\left[\right],\left[\right],\left[0,1\right]\right]\right]$
 ${\mathrm{sys}}{≔}\left[\left[\left[{0}{,}{1}\right]{,}\left[{-1}\right]\right]{,}\left[\left[\right]{,}\left[{0}{,}{1}\right]{,}\left[{-1}\right]{,}\left[{-1}\right]\right]{,}\left[\left[\right]{,}\left[\right]{,}\left[{0}{,}{1}\right]{,}\left[\right]{,}\left[{-1}\right]\right]{,}\left[\left[{-2}\right]{,}\left[{-}{2}{}{x}\right]{,}\left[\right]{,}\left[{0}{,}{1}\right]{,}\left[{-1}\right]\right]{,}\left[\left[{-}{{x}}^{{2}}\right]{,}\left[\right]{,}\left[{-}{2}{}{x}\right]{,}\left[\right]{,}\left[{0}{,}{1}\right]{,}\left[{-1}\right]\right]{,}\left[\left[\right]{,}\left[{-}{{x}}^{{2}}\right]{,}\left[{2}\right]{,}\left[\right]{,}\left[\right]{,}\left[{0}{,}{1}\right]\right]\right]$ (12)
 > $\mathrm{polysols}\left(\mathrm{sys},\left[0,0,0,0,0,0\right],x\right)$
 $\left[\left[{0}{,}{1}{,}{x}\right]{,}\left[{0}{,}{0}{,}{1}\right]{,}\left[{1}{,}{-}{x}{,}{-}{{x}}^{{2}}\right]{,}\left[{-1}{,}{x}{,}{{x}}^{{2}}\right]{,}\left[{0}{,}{-1}{,}{-}{2}{}{x}\right]{,}\left[{-}{2}{}{x}{,}{{x}}^{{2}}{,}{{x}}^{{3}}{-}{2}\right]\right]$ (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 $\left[\mathrm{\xi }=0,\mathrm{\eta }=f\left(x\right)\right]$ (see symgen)
 > $S≔\left[\left[0,x\right],\left[0,{\left(x-1\right)}^{2}\right],\left[0,{x}^{3}\right],\left[0,\frac{1}{x}\right]\right]$
 ${S}{≔}\left[\left[{0}{,}{x}\right]{,}\left[{0}{,}{\left({x}{-}{1}\right)}^{{2}}\right]{,}\left[{0}{,}{{x}}^{{3}}\right]{,}\left[{0}{,}\frac{{1}}{{x}}\right]\right]$ (14)
 For linear ODEs, the function $f\left(x\right)$ entering symmetries of the form $\left[0,f\left(x\right)\right]$ 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])
 > $\mathrm{lin_DE}≔\mathrm{DEtools}\left[\mathrm{equinv}\right]$