Adam Ledger

Mr. Adam Ledger

360 Reputation

11 Badges

9 years, 127 days
unemployed
hobo
Perth, Australia

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are questions asked by Adam Ledger

As can be seen in the example i have shown below, i have iterated the "collect" function a number of times as required for the number of distinct terms. Can someone please show me how i would specify that i would like to iterate a particular function 'N' times in the same manner i have done only 3 times in the example, ie suppose instead of the 3 variables i wish to collect for here (a[0],a[1],a[2]) i now must do so for another definition of F that has 'N' variables (a[0],a[1],a[2],....a[N]) 


 

F := ((1/2)*a[2]-a[1]+(1/2)*a[0])*n^2+(-(1/2)*a[2]+2*a[1]-(3/2)*a[0])*n+a[0]

((1/2)*a[2]-a[1]+(1/2)*a[0])*n^2+(-(1/2)*a[2]+2*a[1]-(3/2)*a[0])*n+a[0]

(1)

[factor(op(1, collect(collect(collect(F, a[0]), a[1]), a[2]))/a[2]), factor(op(2, collect(collect(collect(F, a[0]), a[1]), a[2]))/a[1]), factor(op(3, collect(collect(collect(F, a[0]), a[1]), a[2]))/a[0])]

[(1/2)*n*(n-1), -n*(n-2), (1/2)*(n-1)*(n-2)]

(2)

``


 

Download Asking_Again_About_iterations.mw

What i am trying to achieve is to evaluate the sequence as, shown, but from within a try-catch statement that handles and keeps a tally on the number and arguements for which the sequence encounters a division by zero error. ie, instead of haulting evaluation when each error is encountered, i want my code to record the index values at which the error occured, then continue on to the next term.
 

restart

with(Statistics):

``

F := (-2*n[1]*n[3]-4*n[2]*n[1]*n[3]+4*n[2]*n[3]+4*n[3]*n[4]*n[1]+n[1])/(-n[1]-2*n[2]*n[1]+2*n[2]+2*n[4]*n[1]):

S := proc (N, M, G, L) options operator, arrow; [seq(seq(seq(seq(F, n[1] = N .. N), n[2] = M .. M), n[3] = G .. G), n[4] = L .. L)] end proc

proc (N, M, G, L) options operator, arrow; [seq(seq(seq(seq(F, n[1] = N .. N), n[2] = M .. M), n[3] = G .. G), n[4] = L .. L)] end proc

(1)

A := {}; -1; U := 0; -1; K := 0; -1; E := 0

0

(2)

J := 0:

H := 1

1

(3)

K[1] := J+H:

try S(K[1], K[2], K[3], K[4]) catch "numeric exception: division by zero": E := E+1; `union`({[K[1], K[2], K[3], K[4]]}, A) end try

[-1]

(4)

J := 0:

H := 1

1

(5)

K[1] := J:

try S(K[1], K[2], K[3], K[4]) catch "numeric exception: division by zero": E := E+1; `union`({[K[1], K[2], K[3], K[4]]}, A) end try

[0]

(6)

J := 0:

H := 1

1

(7)

K[1] := J:

try S(K[1], K[2], K[3], K[4]) catch "numeric exception: division by zero": E := E+1; `union`({[K[1], K[2], K[3], K[4]]}, A) end try

1

 

{[0, 0, 1, 0]}

(8)

J := 0:

H := 1

1

(9)

K[1] := J:

try S(K[1], K[2], K[3], K[4]) catch "numeric exception: division by zero": E := E+1; `union`({[K[1], K[2], K[3], K[4]]}, A) end try

2

 

{[0, 0, 0, 1]}

(10)

``


 

Download PLEASE_HELP_MAPLE.mw

please see attachment and explain why the output of the 2nd line is not 0
 

`mod`(2*n+1, 2)

1

(1)

`mod`(2*n+1, 3)

2*n+1

(2)

`mod`(2*n, 2)

0

(3)

``


 

Download mod_maple_help.mw

I have a few "regular practices" on the interface that i want to implement into conjecturing automata, and i would really really be super appreciative if i can interface it with simon's/maplsoft's inverse symbollic calculator, the only problem really is  the HTTP aspect is going  to ( im assuming) need certain information only known to the people who brought the symbolliic calc online. So thats my  question / request for help

_z i believe is the placeholder when Solve is intending to indicate a restriction to any integer value  only, for one of my recent projects im getting the placholder "_L" in my solutions, and would like to know where the reference table is for the full list of these global in built variable types if possible, have not been able to find it in the help interface and did sincerely look

First 23 24 25 26 27 28 29 Last Page 25 of 34