rtaylor - Maple Help

DEtools

 rtaylor
 obtain the Taylor series for an ODE or PDE system

 Calling Sequence rtaylor(solved, vars, options)

Parameters

 solved - system in solved form vars - (optional) solving variables of the system options - (optional) sequence of options to specify the ranking for the solved form, initial data, and the order of the Taylor series

Description

 • The rtaylor command is part of the Rif subset of commands in the DEtools package.
 • The rtaylor command uses an output rifsimp form to obtain local Taylor series expansions for all dependent variables in the ODE or PDE system simultaneously. The Taylor series output is a list containing equations of the form $\mathrm{depvar}\left(\mathrm{indepvars}\right)=\mathrm{Taylor series}$.

Ranking Options

 • The ranking related options that are accepted by rtaylor include the specification of the vars as a ranking, and the ranking and indep options described in rifsimp[ranking], rifsimp[options], and rifsimp[adv_options].
 Note: Specification of vars different from those used to obtain the result from rifsimp can give incomplete results.
 Note: Specification of vars as a set of dependent variables, or as a single dependent variable, makes the use of ranking options unpredictable (i.e. if using the vars as part of the ranking, it must be ordered, so must be a list).

Initial Data Options

 • The table resulting from a call to initialdata can be given as an option to rtaylor, in which case the Taylor series is given in terms of the functions present in the initial data.
 In addition, the arbitrary functions and constants on the right-hand sides of the specified initial data can be given specific values, and the expansion can be computed for these values.

Taylor Series Order Options

 • The $\mathrm{order}=n$ option specifies the order that the Taylor series should be computed to, and must be a non-negative integer. The default value is $2$.
 • The $\mathrm{point}=[\mathrm{ivar1}=\mathrm{val1},...]$ option specifies an expansion point for the series. When this option is used, every independent variable must be given a value.

Other Considerations

 • In general, any Constraint or $\mathrm{DiffConstraint}$ relations (see rifsimp[nonlinear]) in the rif form cannot be used in an automatic way, so they are ignored. These relations must be accounted for manually after the Taylor series calculation. Special care must be taken when $\mathrm{DiffConstraint}$ relations are present, because all derivatives of these relations must be manually accounted for. This is not the case for Constraint relations, as they are purely algebraic.
 • The requirement that the input solved form be in rif form can be relaxed mildly, but rtaylor still requires that the equations are in a valid solved form that matches the input ranking (given in the options), and have no integrability conditions remaining. Only when these conditions hold is the resulting Taylor series an accurate representation of the local solution.

Examples

 > $\mathrm{with}\left(\mathrm{DEtools}\right):$

A simple ODE

 > $\mathrm{rtaylor}\left(\left[\mathrm{diff}\left(f\left(x\right),x,x\right)=-f\left(x\right)\right],\mathrm{order}=4\right)$
 $\left[{f}{}\left({x}\right){=}{f}{}\left({{x}}_{{0}}\right){+}{\mathrm{D}}{}\left({f}\right){}\left({{x}}_{{0}}\right){}\left({x}{-}{{x}}_{{0}}\right){-}\frac{{f}{}\left({{x}}_{{0}}\right){}{\left({x}{-}{{x}}_{{0}}\right)}^{{2}}}{{2}}{-}\frac{{\mathrm{D}}{}\left({f}\right){}\left({{x}}_{{0}}\right){}{\left({x}{-}{{x}}_{{0}}\right)}^{{3}}}{{6}}{+}\frac{{f}{}\left({{x}}_{{0}}\right){}{\left({x}{-}{{x}}_{{0}}\right)}^{{4}}}{{24}}\right]$ (1)

A PDE system with a single dependent variable

 > $\mathrm{rtaylor}\left(\left[\mathrm{diff}\left(f\left(x,y\right),y,y\right)=\mathrm{diff}\left(f\left(x,y\right),x\right)f\left(x,y\right),\mathrm{diff}\left(f\left(x,y\right),x,x\right)=2f\left(x,y\right)\right],\mathrm{order}=3\right)$
 $\left[{f}{}\left({x}{,}{y}\right){=}{f}{}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right){+}{{\mathrm{D}}}_{{1}}{}\left({f}\right){}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right){}\left({x}{-}{{x}}_{{0}}\right){+}{{\mathrm{D}}}_{{2}}{}\left({f}\right){}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right){}\left({y}{-}{{y}}_{{0}}\right){+}{f}{}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right){}{\left({x}{-}{{x}}_{{0}}\right)}^{{2}}{+}{{\mathrm{D}}}_{{1}{,}{2}}{}\left({f}\right){}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right){}\left({x}{-}{{x}}_{{0}}\right){}\left({y}{-}{{y}}_{{0}}\right){+}\frac{{{\mathrm{D}}}_{{1}}{}\left({f}\right){}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right){}{f}{}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right){}{\left({y}{-}{{y}}_{{0}}\right)}^{{2}}}{{2}}{+}\frac{{{\mathrm{D}}}_{{1}}{}\left({f}\right){}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right){}{\left({x}{-}{{x}}_{{0}}\right)}^{{3}}}{{3}}{+}{{\mathrm{D}}}_{{2}}{}\left({f}\right){}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right){}{\left({x}{-}{{x}}_{{0}}\right)}^{{2}}{}\left({y}{-}{{y}}_{{0}}\right){+}\frac{\left({{{\mathrm{D}}}_{{1}}{}\left({f}\right){}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right)}^{{2}}{+}{2}{}{{f}{}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right)}^{{2}}\right){}\left({x}{-}{{x}}_{{0}}\right){}{\left({y}{-}{{y}}_{{0}}\right)}^{{2}}}{{2}}{+}\frac{\left({{\mathrm{D}}}_{{1}{,}{2}}{}\left({f}\right){}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right){}{f}{}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right){+}{{\mathrm{D}}}_{{2}}{}\left({f}\right){}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right){}{{\mathrm{D}}}_{{1}}{}\left({f}\right){}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right)\right){}{\left({y}{-}{{y}}_{{0}}\right)}^{{3}}}{{6}}\right]$ (2)

A PDE system with two dependent variables

 > $\mathrm{rtaylor}\left(\left[\mathrm{diff}\left(f\left(x,y\right),x,x\right)=\mathrm{diff}\left(g\left(x,y\right),y\right),\mathrm{diff}\left(f\left(x,y\right),y,y\right)=\mathrm{diff}\left(g\left(x,y\right),x\right),\mathrm{diff}\left(g\left(x,y\right),x\right)=\mathrm{diff}\left(g\left(x,y\right),y\right)\right]\right)$
 $\left[{f}{}\left({x}{,}{y}\right){=}{f}{}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right){+}{{\mathrm{D}}}_{{1}}{}\left({f}\right){}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right){}\left({x}{-}{{x}}_{{0}}\right){+}{{\mathrm{D}}}_{{2}}{}\left({f}\right){}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right){}\left({y}{-}{{y}}_{{0}}\right){+}\frac{{{\mathrm{D}}}_{{2}}{}\left({g}\right){}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right){}{\left({x}{-}{{x}}_{{0}}\right)}^{{2}}}{{2}}{+}{{\mathrm{D}}}_{{1}{,}{2}}{}\left({f}\right){}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right){}\left({x}{-}{{x}}_{{0}}\right){}\left({y}{-}{{y}}_{{0}}\right){+}\frac{{{\mathrm{D}}}_{{1}}{}\left({g}\right){}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right){}{\left({y}{-}{{y}}_{{0}}\right)}^{{2}}}{{2}}{,}{g}{}\left({x}{,}{y}\right){=}{g}{}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right){+}{{\mathrm{D}}}_{{2}}{}\left({g}\right){}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right){}\left({x}{-}{{x}}_{{0}}\right){+}{{\mathrm{D}}}_{{2}}{}\left({g}\right){}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right){}\left({y}{-}{{y}}_{{0}}\right){+}\frac{{{\mathrm{D}}}_{{2}{,}{2}}{}\left({g}\right){}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right){}{\left({x}{-}{{x}}_{{0}}\right)}^{{2}}}{{2}}{+}{{\mathrm{D}}}_{{2}{,}{2}}{}\left({g}\right){}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right){}\left({x}{-}{{x}}_{{0}}\right){}\left({y}{-}{{y}}_{{0}}\right){+}\frac{{{\mathrm{D}}}_{{2}{,}{2}}{}\left({g}\right){}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right){}{\left({y}{-}{{y}}_{{0}}\right)}^{{2}}}{{2}}\right]$ (3)

An example using initial data

 > $\mathrm{sys}≔\left\{\mathrm{diff}\left(f\left(x,y\right),x,x\right)=0,\mathrm{diff}\left(f\left(x,y\right),x,y\right)=0\right\}$
 ${\mathrm{sys}}{≔}\left\{\frac{{{\partial }}^{{2}}}{{\partial }{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({x}{,}{y}\right){=}{0}{,}\frac{{{\partial }}^{{2}}}{{\partial }{x}{\partial }{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({x}{,}{y}\right){=}{0}\right\}$ (4)
 > $\mathrm{id}≔\mathrm{initialdata}\left(\mathrm{sys}\right)$
 ${\mathrm{id}}{≔}{table}{}\left(\left[{\mathrm{Infinite}}{=}\left[{f}{}\left({{x}}_{{0}}{,}{y}\right){=}{\mathrm{_F1}}{}\left({y}\right)\right]{,}{\mathrm{Finite}}{=}\left[{{\mathrm{D}}}_{{1}}{}\left({f}\right){}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right){=}{\mathrm{_C1}}\right]\right]\right)$ (5)
 > $\mathrm{rtaylor}\left(\mathrm{sys},\mathrm{id},\mathrm{order}=3\right)$
 $\left[{f}{}\left({x}{,}{y}\right){=}{\mathrm{_F1}}{}\left({{y}}_{{0}}\right){+}{\mathrm{_C1}}{}\left({x}{-}{{x}}_{{0}}\right){+}{\mathrm{D}}{}\left({\mathrm{_F1}}\right){}\left({{y}}_{{0}}\right){}\left({y}{-}{{y}}_{{0}}\right){+}\frac{{{\mathrm{D}}}^{\left({2}\right)}{}\left({\mathrm{_F1}}\right){}\left({{y}}_{{0}}\right){}{\left({y}{-}{{y}}_{{0}}\right)}^{{2}}}{{2}}{+}\frac{{{\mathrm{D}}}^{\left({3}\right)}{}\left({\mathrm{_F1}}\right){}\left({{y}}_{{0}}\right){}{\left({y}{-}{{y}}_{{0}}\right)}^{{3}}}{{6}}\right]$ (6)

An example using specified initial data and an expansion point

 > $\mathrm{ids}≔\mathrm{eval}\left(\mathrm{eval}\left(\mathrm{id}\right),\left\{\mathrm{_C1}=1,\mathrm{_F1}\left(y\right)=\mathrm{sin}\left(y\right)\right\}\right)$
 ${\mathrm{ids}}{≔}{table}{}\left(\left[{\mathrm{Infinite}}{=}\left[{f}{}\left({{x}}_{{0}}{,}{y}\right){=}{\mathrm{sin}}{}\left({y}\right)\right]{,}{\mathrm{Finite}}{=}\left[{{\mathrm{D}}}_{{1}}{}\left({f}\right){}\left({{x}}_{{0}}{,}{{y}}_{{0}}\right){=}{1}\right]\right]\right)$ (7)
 > $\mathrm{rtaylor}\left(\mathrm{sys},\mathrm{ids},\mathrm{order}=3,\mathrm{point}=\left[x=1,y=\mathrm{\pi }\right]\right)$
 $\left[{f}{}\left({x}{,}{y}\right){=}{x}{-}{1}{-}{y}{+}{\mathrm{\pi }}{+}\frac{{\left({y}{-}{\mathrm{\pi }}\right)}^{{3}}}{{6}}\right]$ (8)