DESol
a data structure to represent the solution of a differential equation
Calling Sequence
Parameters
Description
Examples
DESol(expr)
DESol(expr, y)
expr
-
differential equation in y
y
variable
DESol is a data structure to represent the solution of a differential equation. It is to dsolve as RootOf is to solve.
The DESol data structure makes manipulation of differential equations much easier. Its existence allows many hooks to the rest of Maple, diff, int, evalf, series, simplify, just to name the most prominent.
DESol can be used as an operator (using D), or as an expression (using diff(...,x)). The examples below illustrate some of the operations that can be performed with DESol.
A simple differential equation.
de1≔DESol⁡D⁡y−y,y
Verify by differentiating.
D⁡de1−de1
0
The equivalent equation, as a function:
de2≔DESol⁡diff⁡y⁡x,x−y⁡x,y⁡x
de2≔DESol⁡ⅆⅆxy⁡x−y⁡x,y⁡x
de1⁡x−de2
diff⁡de2,x−de2
The unapply command can convert from function to operator.
unapply⁡de2,x−de1
A more complex equation, using initial conditions.
alias⁡de3=DESol⁡D⁡D⁡y−a⁢x⁢D⁡y+y,y:D⁡x≔1:D⁡a≔0:
D⁡D⁡D⁡de3
a⁢D⁡de3+a⁢x⁢a⁢x⁢D⁡de3−de3−D⁡de3
collect⁡D⁡D⁡D⁡D⁡de3,D⁡de3,factor
a⁢x⁢a2⁢x2+3⁢a−2⁢D⁡de3−de3⁢a2⁢x2+2⁢a−1
int⁡de3⁡x,x
DESol⁡y⁡x−x⁢a⁢ⅆⅆxy⁡xa+1+ⅆ2ⅆx2y⁡xa+1,y⁡x
int⁡1ln⁡de3⁡x,x
DESol⁡2⁢ⅆ2ⅆx2y⁡x2⁢ⅇ1ⅆⅆxy⁡xⅆⅆxy⁡x3−ⅆ3ⅆx3y⁡x⁢ⅇ1ⅆⅆxy⁡xⅆⅆxy⁡x2+ⅆ2ⅆx2y⁡x2⁢ⅇ1ⅆⅆxy⁡xⅆⅆxy⁡x4+a⁢x⁢ⅆ2ⅆx2y⁡x⁢ⅇ1ⅆⅆxy⁡xⅆⅆxy⁡x2+ⅇ1ⅆⅆxy⁡x,y⁡x
An example with non-linear DE's:
alias⁡de5=DESol⁡D⁡D⁡yD⁡y=y:
D⁡D⁡de5D⁡de5−de5
D⁡D⁡D⁡de5
D⁡de52+de52⁢D⁡de5
The large oscillation pendulum equation, with initial conditions:
D⁡x≔D⁡x:
de6≔DESol⁡diff⁡x⁡t,t,t=gl⁢sin⁡x⁡t,x⁡t,x⁡0=0,D⁡x⁡0=v0
de6≔DESol⁡ⅆ2ⅆt2x⁡t−g⁢sin⁡x⁡tl,x⁡t,x⁡0=0,D⁡x⁡0=v0
de7≔int⁡de6,t
de7≔DESol⁡ⅆ3ⅆt3x⁡t−g⁢sin⁡ⅆⅆtx⁡tl,x⁡t
Verify the derivative.
diff⁡de7,t,t,t−gl⁢sin⁡diff⁡de7,t
A complex integration.
de8≔int⁡1DESol⁡diff⁡y⁡x,x−y⁡x,y⁡x+1,x
de8≔−ln⁡DESol⁡ⅆⅆxy⁡x−y⁡x,y⁡x+1+ln⁡DESol⁡ⅆⅆxy⁡x−y⁡x,y⁡x
normal⁡diff⁡de8,x−1DESol⁡diff⁡y⁡x,x−y⁡x,y⁡x+1
When there are no derivatives, the equation can be written with RootOf or solved:
DESol⁡y⁡x2−y⁡x+1,y⁡x
RootOf⁡_Z2−_Z+1
DESol⁡y⁡x−x,y⁡x
x
An example where the equation can be simplified.
de9≔DESol⁡diff⁡y⁡x,x,x⁢diff⁡y⁡x,x−1,y⁡x
de9≔DESol⁡ⅆ2ⅆx2y⁡x⁢ⅆⅆxy⁡x−1,y⁡x
diff⁡de9,x
DESol⁡ⅆⅆxy⁡x⁢y⁡x−1,y⁡x
de10≔unapply⁡de9,x
de10≔DESol⁡D2⁡y⁢D⁡y−1,y
D⁡de10
DESol⁡y⁢D⁡y−1,y
See Also
D
diff
dsolve
int
solve
Download Help Document