Question: Is it possible?? n th section

I was wondering is it possible to make a procedure in maple that works out the Bisection, tri section using a single procedure?

So for example for the bisection method c : =( a + b ) /2
fAnd  trisection method c : = ( 2 * a + b) / 3 and d : = (2 * b + a )/3 etc

For n th section L [ i ] :=( i*b + a ( n - i ) ) / n:
` i ` represents the position in a List.

e.g (Not sure if it would work in a proc)
Trisection
n:=3:
i:=1:
L:= [ c , d ]:

L[ 1 ]:= ( b + 2 * a ) / 3:
L [ 2 ]:=( 2 * b + b) / 3:

If it is possible then it would save a lot of time. You could use one procedure to calculate any section ( n th section).

 

Please Wait...