## 145 Reputation

16 years, 93 days

## MaplePrimes Activity

### These are questions asked by

Maple 17

Hi!

I am very interested in using the "phc.module", which is a module to work with "polynomial homotopy continuation" method. Please, see this paper

I have downloaded the following files: [copied without permission, deleted by moderator]

Then, I open (as an "ordinary" maple worksheet) the file "phc_savelib.maple" and execute it, but it seems that I can not use their functions and procedures because it returns errors.

For instance, follwing the attached PDF,  in the phc_savelib.maple file, define the polynomial system:

T := makeSystem([x, y], [], [x^2+y^2-1, x^3+y^3-1])

and try to solve the above system

sols := solve(T)

but returns the error

Error, (in fopen) file or directory does not exist

## Is well defined this "recursive" functio...

Maple 17

Hi!

Let F(z) (with z complex) a given function. I want to compute F^n(z0), i.e. the composition of F with itself n-times, where z0 is a given point (complex).

Is correct the following procedure to compute F^k(z0)?

App := proc (k, z0) local z1, z2, j; z1 := z0; z2 := NULL; for j to k do z2 := F(z1); z1 := z2 end do; return z2 end proc

## Plot3d: How do I can draw a polynomial a...

Maple 17

Hi!

I want to plot the approximation of a surface by polynomials. The surface is given by (x,y,f(x,y)) where f(x,y) is given by the following expression

proc (x) options operator, arrow; (sum(i*cos((i+1)*(-2+4*x[1])+i), i = 1 .. 5))*(sum(i*cos((i+1)*(-2+4*x[2])+i), i = 1 .. 5)) end proc

with both variables varying in the interval [0,1]. Then, by using the Bernstein polynomials of two variables (see, for instance, this paper for details  https://www.sciencedirect.com/science/article/pii/0021904589900956), the graph of the resulting (plot3d) surface (x,y,p(x,y))  it is not even like to the original surfaces.

Please, see this PDF of what I have done:  plots.pdf

Some idea or suggestion?

Thanks!

## Get the "union" of a list of "intervals"...

Maple 17

Hello,

Assume we have the following "intervals" (I am not sure what is its formal name in Maple)

C :=[0,1/11],[1/11,1/9],[1/9, 1/7],[1/3,1/2],[1/2,1]

How can we get the "union" of these intervals? That is to say, obtain  [0,1/7],[1/3,1]

## Choose a number according to a probabili...

Maple 17

Hello!

Assume we have the first N positive integres, 1,..,N, and we assing to these numbers a (discrete) probability distribution p1,...,pN. Of course, p1+...+pN=1.

Then, How can we select a number in {1,..,N} according to the given probability distribution? That is, the number 1 can be chosen with probability p1, 2 with a probability p2, etc.