DEtools
rtaylor
obtain the Taylor series for an ODE or PDE system
Calling Sequence
Parameters
Description
Examples
rtaylor(solved, vars, options)
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
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 depvar⁡indepvars=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 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 point=[ivar1=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 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 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.
with⁡DEtools:
A simple ODE
rtaylor⁡diff⁡f⁡x,x,x=−f⁡x,order=4
f⁡x=f⁡x0+D⁡f⁡x0⁢x−x0−f⁡x0⁢x−x022−D⁡f⁡x0⁢x−x036+f⁡x0⁢x−x0424
A PDE system with a single dependent variable
rtaylor⁡diff⁡f⁡x,y,y,y=diff⁡f⁡x,y,x⁢f⁡x,y,diff⁡f⁡x,y,x,x=2⁢f⁡x,y,order=3
f⁡x,y=f⁡x0,y0+D1⁡f⁡x0,y0⁢x−x0+D2⁡f⁡x0,y0⁢y−y0+f⁡x0,y0⁢x−x02+D1,2⁡f⁡x0,y0⁢x−x0⁢y−y0+D1⁡f⁡x0,y0⁢f⁡x0,y0⁢y−y022+D1⁡f⁡x0,y0⁢x−x033+D2⁡f⁡x0,y0⁢x−x02⁢y−y0+D1⁡f⁡x0,y02+2⁢f⁡x0,y02⁢x−x0⁢y−y022+D1,2⁡f⁡x0,y0⁢f⁡x0,y0+D1⁡f⁡x0,y0⁢D2⁡f⁡x0,y0⁢y−y036
A PDE system with two dependent variables
rtaylor⁡diff⁡f⁡x,y,x,x=diff⁡g⁡x,y,y,diff⁡f⁡x,y,y,y=diff⁡g⁡x,y,x,diff⁡g⁡x,y,x=diff⁡g⁡x,y,y
f⁡x,y=f⁡x0,y0+D1⁡f⁡x0,y0⁢x−x0+D2⁡f⁡x0,y0⁢y−y0+D2⁡g⁡x0,y0⁢x−x022+D1,2⁡f⁡x0,y0⁢x−x0⁢y−y0+D1⁡g⁡x0,y0⁢y−y022,g⁡x,y=g⁡x0,y0+D2⁡g⁡x0,y0⁢x−x0+D2⁡g⁡x0,y0⁢y−y0+D2,2⁡g⁡x0,y0⁢x−x022+D2,2⁡g⁡x0,y0⁢x−x0⁢y−y0+D2,2⁡g⁡x0,y0⁢y−y022
An example using initial data
sys≔diff⁡f⁡x,y,x,x=0,diff⁡f⁡x,y,x,y=0
sys≔∂2∂x2f⁡x,y=0,∂2∂x∂yf⁡x,y=0
id≔initialdata⁡sys
id≔table⁡Finite=D1⁡f⁡x0,y0=_C1,Infinite=f⁡x0,y=_F1⁡y
rtaylor⁡sys,id,order=3
f⁡x,y=_F1⁡y0+_C1⁢x−x0+D⁡_F1⁡y0⁢y−y0+D2⁡_F1⁡y0⁢y−y022+D3⁡_F1⁡y0⁢y−y036
An example using specified initial data and an expansion point
ids≔eval⁡eval⁡id,_C1=1,_F1⁡y=sin⁡y
ids≔table⁡Finite=D1⁡f⁡x0,y0=1,Infinite=f⁡x0,y=sin⁡y
rtaylor⁡sys,ids,order=3,point=x=1,y=π
f⁡x,y=x−1−y+π+y−π36
See Also
caseplot
DifferentialAlgebra[PowerSeriesSolution]
Rif
rifsimp
rifsimp[nonlinear]
Download Help Document