 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

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