convert
convert an expression to a different form
Calling Sequence
Parameters
Description
Examples
convert(expr, form, arg3, ...)
expr
-
any expression
form
name
arg3, ...
(optional) other arguments
The convert function is used to convert an expression from one form to another. Some of the conversions are data-type conversions, for example convert([x, y], set) Others are form or function conversions, for example convert(x^3-3*x^2+7*x+9, horner, x) yields 9+(7+(-3+x)*x)*x and convert(a*x!, GAMMA) yields a*GAMMA(x+1).
For function conversions, a set of optional arguments to perform the conversion in different manners are described in convert/to_special_function.
The types of known conversions are (the second argument form must be one of these):
`*`
`+`
`0F1`
`1F1`
`2F1`
Abel
Abel_RNF
abs
Airy
algebraic
and
arabic
arctrig
arctrigh
arithop
Array
array
base
Bessel
Bessel_related
binary
binomial
boolean_function
boolean_operator
ByteArray
bytes
Chebyshev
color
compose
confrac
conversion_table
csccot
Cylinder
D
decimal
DeepLearning
degrees
DESol
diff
dimensions
disjcyc
Ei
Ei_related
elementary
Elliptic_related
elsymfun
english
equality
equationlist
erf
erf_related
erfc
exp
expln
expsincos
factorial
FirstKind
float
FormalPowerSeries
fraction
fullparfrac
function_rules
GAMMA_related
global
Hankel
Heaviside
Heun
hex
horner
hypergeom
ifelse
Image
int
Int
iupac
Kelvin
Kummer
Legendre
linearODE
list
listlist(deprecated)
listofequations
ln
local
log
mathorner
Matrix
matrix
MatrixPolynomialObject
MeijerG
metric(deprecated)
MobiusR
MobiusX
MobiusY
mod2
ModifiedMeijerG
mutable
NormalForm
numericproc
octal
or
ordinal
package
parfrac
permlist
phaseamp
PhysicsVectors
piecewise
PLOT3Doptions
PLOToptions
polar
POLYGONS
polynom
power
pwlist
python
radians
radical
rational
ratpoly
RealRange
record
relation
Riccati
roman
SecondKind
sectan
set
setofequations
signum
sincos
sqrfree
StandardFunctions
string
sum
Sum
surd
symbol
system
table
tan
temperature
to_special_function
trig
trigh
truefalse
unit_free
unit_name
units
Vector
vector
Whittaker
windchill
xor
y_x
Further information is available under help pages convert/form where form is one of the forms from the above list.
A user can make custom conversions known to the convert function by defining a Maple procedure in the following way. If the procedure `convert/f` is defined, then the function call convert(a, f, x, y, ...) will invoke `convert/f`(a, x, y, ...); Note that the procedure may be indexed, for example convert([1,2,3], Vector[row]);
Convert can be used to convert numbers between bases. See the help pages convert/decimal, convert/base, convert/binary, convert/octal, and convert/hex for more information and examples.
convert⁡9,binary
1001
Convert between degrees and radians. See the help pages convert/degrees and convert/radians for more information.
convert⁡π,degrees
180⁢degrees
Convert to rational expressions or floating-point numbers. See the help pages convert/float and convert/rational for more information.
convert⁡1.23456,rational
38583125
convert⁡18,float,3
0.125
Convert between units. See the help page convert/units for more information. Also, see the Units package.
convert⁡22,units,inches,m
13972500
Convert between Roman numerals and integers. See the help pages convert/arabic and convert/roman for more information.
convert⁡XI,arabic
11
Convert all the operands of a list, set, or expression to addition or multiplication. See the help page convert/`+` for more information.
convert⁡1,2,3,4,`+`
10
f≔seq⁡xii,i=1..4
f≔x1,x22,x33,x44
convert⁡f,`*`
x1⁢x22⁢x33⁢x44
Convert a given list, set, or expression to 'and', 'or', or 'xor' form. See the help page convert/and for more information.
convert⁡x,y,`and`
xandy
Convert a rational expression to partial fraction form. See the help page convert/parfrac for more information.
f≔x3+xx2−1
convert⁡f,parfrac,x
x+1x+1+1x−1
Convert a series to a polynomial by dropping the order term. See the help page convert/polynom for more information.
s≔series⁡f,x,4
s≔−x−2⁢x3+O⁡x5
convert⁡s,polynom
−2⁢x3−x
Convert a complex expression to polar coordinates. See the help page convert/polar for more information.
convert⁡12+I2,polar
polar⁡22,π4
Convert an expression to trigonometric or exponential form, if possible. See the help pages convert/exp and convert/trig for more information.
g≔sinh⁡x+sin⁡x
convert⁡g,exp
ⅇx2−ⅇ−x2−I⁢ⅇI⁢x−ⅇ−I⁢x2
Check the list above for all known types of conversions for more possibilities. Conversions to more advanced mathematical functions are shown below.
h≔BesselJ⁡a,z
j≔convert⁡h,hypergeom
j≔za⁢hypergeom⁡,a+1,−z24Γ⁡a+1⁢2a
convert⁡j,Bessel
BesselJ⁡a,z
See Also
convert/PhysicsVectors
convert/VectorCalculus
ExtendingMaple
operators/binary
type
Download Help Document