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

Online Help

All Products    Maple    MapleSim


MathematicalFunctions[Sequences]

  

Add

  

add the elements of a sequence or add to the elements of a symbolic sequence

  

Differentiate

  

differentiate the elements of a symbolic sequence

  

Map

  

map an operation to the elements of a symbolic sequence

  

Multiply

  

multiply the elements of a sequence or multiply to the elements of a symbolic sequence

  

Nops

  

count the elements of a symbolic sequence

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Add(S)

Differentiate(S, t)

Map(P, S)

Multiply(S)

Nops(S)

Parameters

S

-

sequence

t

-

variable name

P

-

procedure or function

Description

• 

The Add, Differentiate, Map, Multiply, and Nops commands perform operations on the three kinds of symbolic sequences implemented in the Maple system, namely:

  

1.  A sequence of numbers - say from n to m - frequently displayed as

n,...,m

  

2.  A sequence of one object, say a, repeated say p times, frequently displayed as

a,...,a

  

3.  A more general sequence, as in 1., but of different objects and not necessarily numbers, frequently displayed as

an,...,am

  

or likewise a sequence of functions fn,...,fm. In all these cases, none of n, m, or p are known: they are just symbols, or algebraic expressions, representing integer values. These symbolic sequences are represented in Maple using the $ operator. To cases 1., 2. and 3. correspond, respectively, the input $(n .. m), a $ p and a[i] $ (i = n .. m).

• 

Add and Multiply can either add or multiply the elements of a symbolic sequence (that is, receive only one operand), as well as add or multiply many elements, where possibly more than one is a symbolic sequence.

• 

Nops generalizes nops in that if the single argument is a symbolic sequence, it returns the number of elements it contains expressed in terms of the symbols representing integers that define the sequence.

• 

Differentiate and Map respectively generalize diff and map in that they work the same way as the lowercase commands, but when the first argumen,t in the case of Differentiate, or the second argument in the case of Map, is a symbolic sequence, the operation is applied in such a way that the result represents the operation applied to all the elements of the sequence.

Examples

withMathematicalFunctions:-Sequences

Add,Differentiate,Map,Multiply,Nops

(1)

To display symbolic sequences as in textbooks use extended typesetting:

interfacetypesetting=extended:

Consider now the three forms of symbolic sequences mentioned in the Description:

S__1`$`n..m

S__1n,...,m

(2)

S__2`$`a,p

S__2a,...,ap times

(3)

S__3`$`ai,i=n..m

S__3an,...,am

(4)

The number of operands of these sequences

NopsS__1

mn+1

(5)

NopsS__2

p

(6)

NopsS__3

mn+1

(7)

Add the elements of these sequences

AddS__1

mn+1n+m2

(8)

AddS__2

ap

(9)

AddS__3

i=nmai

(10)

Multiply the elements of these sequences

MultiplyS__1

m!n1!

(11)

MultiplyS__2

ap

(12)

MultiplyS__3

i=nmai

(13)

Differentiate works as diff. For the sequence of numbers S1, the derivative with respect to anything is 0 and there are mn+1 of them

DifferentiateS__1,k

0,...,0m-n+1 times

(14)

For the sequences of algebraic expressions S2 and S3,

DifferentiateS__2,a

1,...,1p times

(15)

DifferentiateS__3,ak

1k=n0otherwise,...,1k=m0otherwise

(16)

Map an operation, say f, over the elements of S1

Mapf,S__1

fn,...,fm

(17)

Map actually works as map, i.e. you can map with extra arguments

MapInt,S__1,x

nⅆx,...,mⅆx

(18)

Map is also useful to add to the elements of a sequence, or multiply each of them

Map`+`,S__3,r

an+r,...,am+r

(19)

Map`*`,S__2,r

ar,...,arp times

(20)

Compatibility

• 

The MathematicalFunctions[Sequences][Add], MathematicalFunctions[Sequences][Differentiate], MathematicalFunctions[Sequences][Map], MathematicalFunctions[Sequences][Multiply] and MathematicalFunctions[Sequences][Nops] commands were introduced in Maple 2016.

• 

For more information on Maple 2016 changes, see Updates in Maple 2016.

See Also

add

diff

map

MathematicalFunctions

mul

nops

Sequences