LODEstruct - Maple Programming Help

Home : Support : Online Help : Mathematics : Differential Equations : Slode : Slode/LODEstruct

LODEstruct

data structure to represent an ODE

Description

 • LODEstruct is a data structure to represent an ordinary differential equation. It is created by Slode[DEdetermine].
 • The entries of an LODEstruct are a set of equations, representing the differential equation, and a set of function names, representing the dependent variables.
 • The data structure has an attribute table with the following entries:
 – L - the differential operator in diff notation
 – rhs - the right hand side of the equation
 – fun - the name of the dependent variable, for example $y$
 – var - the name of the independent variable, for example $x$
 – linear - $\mathrm{true}$ if L is a linear differential operator and $\mathrm{false}$ otherwise
 – ord - the order of L
 – coeffs - an Array of coefficients of L
 – polycfs - $\mathrm{true}$ if all coefficients are polynomial and $\mathrm{false}$ otherwise
 – d_max   - the maximum degree of polynomial coefficients
 • If the right hand side is a formal power series in the form $B\left(x\right)+\left({\sum }_{n=N}^{\mathrm{\infty }}H\left(n\right){P}_{n}\left(x\right)\right)$ where $B\left(x\right)$ is a polynomial in $x$, $P[n]\left(x\right)$ is either ${\left(x-a\right)}^{n}$ or $\frac{1}{{x}^{n}}$, $a$ is the expansion point, and $H\left(n\right)$ is an expression in $n$, then it is represented as a RHSstruct data structure. The entries of an RHSstruct are the right hand side and the independent variable $x$. In addition, the data structure has an attribute table with following entries:
 – mvar - the name of the independent variable, $x$
 – index - the name of the summation index, $n$
 – point - the expansion point $a$, possibly $\mathrm{\infty }$
 – M - a nonnegative integer such that series coefficients are equal $H\left(n\right)$ for all $n>M$; it satisfies $M=\mathrm{max}\left(N-1,\mathrm{degree}\left(B\left(x\right),x\right)\right)$
 – initial - an Array of $M$ initial series coefficients
 – H - the expression $H\left(n\right)$
 – P_n - either ${\left(x-a\right)}^{n}$ or ${\left(\frac{1}{x}\right)}^{n}$

Examples

 > $\mathrm{with}\left(\mathrm{Slode}\right):$
 > $\mathrm{ode}≔\left(\frac{ⅆ}{ⅆx}y\left(x\right)\right)\left(x-1\right)-y\left(x\right)=0$
 ${\mathrm{ode}}{≔}\left(\frac{{ⅆ}}{{ⅆ}{x}}{}{y}{}\left({x}\right)\right){}\left({x}{-}{1}\right){-}{y}{}\left({x}\right){=}{0}$ (1)
 > $\mathrm{DEdetermine}\left(\mathrm{ode},y\left(x\right)\right)$
 ${\mathrm{LODEstruct}}{}\left(\left\{\left(\frac{{ⅆ}}{{ⅆ}{x}}{}{y}{}\left({x}\right)\right){}\left({x}{-}{1}\right){-}{y}{}\left({x}\right){=}{0}\right\}{,}\left\{{y}{}\left({x}\right)\right\}\right)$ (2)
 > $\mathrm{attributes}\left(\right)$
 ${\mathrm{table}}\left(\left[{\mathrm{coeffs}}{=}{\mathrm{Array}}{}\left({0}{..}{1}{,}\left\{{0}{=}{-}{1}{,}{1}{=}{x}{-}{1}\right\}\right){,}{\mathrm{var}}{=}{x}{,}{\mathrm{rhs}}{=}{0}{,}{\mathrm{d_max}}{=}{1}{,}{\mathrm{ord}}{=}{1}{,}{\mathrm{linear}}{=}{\mathrm{true}}{,}{L}{=}\left(\frac{{ⅆ}}{{ⅆ}{x}}{}{y}{}\left({x}\right)\right){}\left({x}{-}{1}\right){-}{y}{}\left({x}\right){,}{\mathrm{fun}}{=}{y}{,}{\mathrm{polycfs}}{=}{\mathrm{true}}\right]\right)$ (3)
 > $\mathrm{ode1}≔\left(\frac{ⅆ}{ⅆx}y\left(x\right)\right)\left(x-1\right)-y\left(x\right)={x}^{3}+2\left({\sum }_{n=4}^{\mathrm{∞}}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}\frac{{x}^{n}}{n-3}\right)$
 ${\mathrm{ode1}}{≔}\left(\frac{{ⅆ}}{{ⅆ}{x}}{}{y}{}\left({x}\right)\right){}\left({x}{-}{1}\right){-}{y}{}\left({x}\right){=}{{x}}^{{3}}{+}{2}{}\left({\sum }_{{n}{=}{4}}^{{\mathrm{∞}}}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}\frac{{{x}}^{{n}}}{{n}{-}{3}}\right)$ (4)
 > $\mathrm{DEdetermine}\left(\mathrm{ode1},y\left(x\right)\right)$
 ${\mathrm{LODEstruct}}{}\left(\left\{\left(\frac{{ⅆ}}{{ⅆ}{x}}{}{y}{}\left({x}\right)\right){}\left({x}{-}{1}\right){-}{y}{}\left({x}\right){=}{{x}}^{{3}}{+}{2}{}\left({\sum }_{{n}{=}{4}}^{{\mathrm{∞}}}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}\frac{{{x}}^{{n}}}{{n}{-}{3}}\right)\right\}{,}\left\{{y}{}\left({x}\right)\right\}\right)$ (5)
 > $\mathrm{attributes}\left(\right)$
 ${\mathrm{table}}\left(\left[{\mathrm{coeffs}}{=}{\mathrm{Array}}{}\left({0}{..}{1}{,}\left\{{0}{=}{-}{1}{,}{1}{=}{x}{-}{1}\right\}\right){,}{\mathrm{var}}{=}{x}{,}{\mathrm{rhs}}{=}{\mathrm{RHSstruct}}{}\left({{x}}^{{3}}{+}{2}{}\left({\sum }_{{n}{=}{4}}^{{\mathrm{∞}}}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}\frac{{{x}}^{{n}}}{{n}{-}{3}}\right){,}{x}\right){,}{\mathrm{d_max}}{=}{1}{,}{\mathrm{ord}}{=}{1}{,}{\mathrm{linear}}{=}{\mathrm{true}}{,}{L}{=}\left(\frac{{ⅆ}}{{ⅆ}{x}}{}{y}{}\left({x}\right)\right){}\left({x}{-}{1}\right){-}{y}{}\left({x}\right){,}{\mathrm{fun}}{=}{y}{,}{\mathrm{polycfs}}{=}{\mathrm{true}}\right]\right)$ (6)
 > $\mathrm{attributes}\left({'\mathrm{rhs}'}_{}\right)$
 ${\mathrm{table}}\left(\left[{M}{=}{3}{,}{\mathrm{initial}}{=}{\mathrm{Array}}{}\left({0}{..}{3}{,}\left\{{3}{=}{1}\right\}{,}{\mathrm{storage}}{=}{\mathrm{sparse}}\right){,}{\mathrm{index}}{=}{n}{,}{H}{=}\frac{{2}}{{n}{-}{3}}{,}{\mathrm{P_n}}{=}{{x}}^{{n}}{,}{\mathrm{point}}{=}{0}{,}{\mathrm{mvar}}{=}{x}\right]\right)$ (7)