DEtools
remove_RootOf
rewrite a given expression removing RootOf.
Calling Sequence
Parameters
Description
Examples
remove_RootOf(expr, R)
expr
-
any Maple algebraic expression or equation
R
(optional) identifies which specific RootOf is to be removed
The remove_RootOf command receives an algebraic expression containing a RootOf and removes it by rewriting the expression. In general, this command is used to directly and naturally convey the mathematical meaning of algebraic expressions that contain RootOfs.
Note that remove_RootOf is different from allvalues; remove_RootOf attempts to remove the RootOf -- typically resulting in implicit algebraic expressions -- while allvalues attempts to return all the values implied by the RootOf.
remove_RootOf is of particular value for understanding or further manipulating ODE solutions, and especially when allvalues fails in evaluating the RootOf.
When the given expression has no RootOf inside it, remove_RootOf returns it as given; when the expression has many RootOfs, only one RootOf (the one with greatest length) is removed. It is also possible to direct remove_RootOf to remove a specific RootOf, say R, by passing R to remove_RootOf as its second argument.
When the removal of a RootOf itself requires the introduction of another RootOf, the removal is not performed and the expression received is returned as given. Also remove_RootOf only removes RootOfs of one argument (so RootOfs with indices or labels will remain in the output).
This function is part of the DEtools package, and so it can be used in the form remove_RootOf(..) only after executing the command with(DEtools). However, it can always be accessed through the long form of the command by using DEtools[remove_RootOf](..).
with⁡DEtools:
diff⁡y⁡x,x=−12⁢a⁢x2−2⁢F⁡y⁡x+18⁢a⁢x4⁢x
ⅆⅆxy⁡x=−a⁢x2−2⁢F⁡y⁡x+a⁢x48⁢x2
dsolve⁡
y⁡x=−a⁢x48+RootOf⁡−x2+2⁢∫` `_Z1F⁡_aⅆ_a+2⁢c__1
remove_RootOf⁡
−x2+2⁢∫` `y⁡x+a⁢x481F⁡_aⅆ_a+2⁢c__1=0
Here is an example that shows the difference between remove_RootOf and allvalues.
expr≔yx+RootOf⁡_Z+exp⁡_Z=C
expr≔yx+RootOf⁡_Z+ⅇ_Z=C
is rewritten by remove_RootOf as:
DEtoolsremove_RootOf⁡expr
−yx+C+ⅇ−yx+C=0
allvalues⁡expr
yx−LambertW⁡_Z2~,1=C
An example with nested RootOfs
ode≔diff⁡y⁡x,x=x⁢y⁡x+1⁢x2⁢y⁡x2+x2⁢y⁡x+2⁢x⁢y⁡x+1+x+x2x5
ode≔ⅆⅆxy⁡x=x⁢y⁡x+1⁢x2⁢y⁡x2+x2⁢y⁡x+2⁢x⁢y⁡x+1+x+x2x5
dsolve⁡ode
y⁡x=17⁢RootOf⁡162⁢∫` `_Z1289⁢_a3+54⁢_a−54ⅆ_a⁢x+3⁢c__1⁢x+2⁢x−3⁢x−99⁢x
If we now evaluate the integral, the resulting solution is
sol≔value⁡
sol≔y⁡x=17⁢RootOf⁡54⁢∑_R=RootOf⁡289⁢_Z3+54⁢_Z−54⁡ln⁡_Z−_R289⁢_R2+18⁢x+3⁢c__1⁢x+2⁢x−3⁢x−99⁢x
One RootOf can be removed in the expression above (and the solution can be further evaluated using allvalues).
remove_RootOf⁡sol
54⁢∑_R=RootOf⁡289⁢_Z3+54⁢_Z−54⁡ln⁡3⁢3⁢x⁢y⁡x+x+317⁢x−_R289⁢_R2+18⁢x+3⁢c__1⁢x+2=0
Here, the sum over the Roots of the third degree polynomial is equal to zero.
odetest⁡,ode
0
A second order ODE example in which three solutions with RootOf are returned by dsolve
diff⁡y⁡x,`$`⁡x,2−h⁡y⁡xsqrt⁡xx32=0
ⅆ2ⅆx2y⁡x−h⁡y⁡xxx32=0
y⁡x=RootOf⁡_Z⁢x32+4⁢h⁡_Zx⁢x2,y⁡x=RootOf⁡−ln⁡x+2⁢∫` `_Z1c__1+8⁢∫h⁡_gⅆ_g+_g2ⅆ_g+2⁢c__2⁢x,y⁡x=RootOf⁡−ln⁡x−2⁢∫` `_Z1c__1+8⁢∫h⁡_gⅆ_g+_g2ⅆ_g+2⁢c__2⁢x
map⁡remove_RootOf,
y⁡x⁢x32+4⁢h⁡y⁡xx⁢x2=0,−ln⁡x+2⁢∫` `y⁡xx1c__1+8⁢∫h⁡_gⅆ_g+_g2ⅆ_g+2⁢c__2=0,−ln⁡x−2⁢∫` `y⁡xx1c__1+8⁢∫h⁡_gⅆ_g+_g2ⅆ_g+2⁢c__2=0
Although remove_RootOf is mainly useful for manipulating nonlinear ODE solutions, it can also be of help with solutions to linear ODEs, for instance when allvalues fails in evaluating the RootOfs.
See Also
allvalues
dsolve
PDEtools
RootOf
sum
Download Help Document