AddFunction - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


MultiSeries

  

AddFunction

  

add new function definition to MultiSeries

  

RemoveFunction

  

remove function definition from MultiSeries

  

GetFunction

  

get function definition from MultiSeries

  

FunctionSupported

  

check if a function definition is supported in MultiSeries

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

AddFunction(g, f)

RemoveFunction(g)

GetFunction(g)

FunctionSupported(g)

Parameters

g

-

function name

f

-

procedure

Description

• 

The AddFunction(g, f) command, a library extension mechanism, adds a definition related to the function g to MultiSeries, where f is a user-defined procedure which handles multiseries containing the function g.

  

For example, let f be a user-defined function for g.  To add this information to the multiseries function, use AddFunction(g, eval(f,1)).

• 

For example, after issuing AddFunction(g, f), the function call multiseriesfx,x,3 will invoke gs,scale,varlist,3 to compute the multiseries. The arguments are the multiseries expansion of the argument of f, the scale in which the expansion is performed, the variable with respect to which the expansion is computed, and the order (see multiseries). Note that the function g must return a SERIES data structure or 0, not just a polynomial (see type[SERIES]).

• 

The RemoveFunction(g) command removes a definition related to the function g from the multiseries function.

  

For example, to remove the information from the multiseries function, use RemoveFunction(g).

• 

The GetFunction(g) command returns a procedure related to the function g, provided that such a procedure exists. Otherwise, it returns NULL.

• 

The FunctionSupported(g) command returns true if a definition of the function g is known to the multiseries function. It returns false otherwise.

Examples

withMultiSeries:

MultiSeries does not know about function mysin:

seriesmysinx,x

mysin0+Dmysin0x+12D2mysin0x2+16D3mysin0x3+124D4mysin0x4+1120D5mysin0x5+Ox6

(1)

Let the function mysin act as sin (using AddFunction and GetFunction):

AddFunctionmysin,evalGetFunctionsin

Try MultiSeries[series] on mysin

seriesmysinx,x

mysin0+Dmysin0x+12D2mysin0x2+16D3mysin0x3+124D4mysin0x4+1120D5mysin0x5+Ox6

(2)

Now remove the knowledge of sin from MultiSeries (using function RemoveFunction)

FunctionSupportedsin

true

(3)

RemoveFunctionsin

FunctionSupportedsin

false

(4)

Get back to original state:

AddFunctionsin,evalGetFunctionmysin

RemoveFunctionmysin

FunctionSupportedsin

true

(5)

FunctionSupportedmysin

false

(6)

seriessinx,x

x16x3+1120x5+Ox7

(7)

seriesmysinx,x

mysin0+Dmysin0x+12D2mysin0x2+16D3mysin0x3+124D4mysin0x4+1120D5mysin0x5+Ox6

(8)

See Also

extension

MultiSeries