## 183 Reputation

16 years, 133 days

## Calling an external routine that needs a...

Is there a way to specify a user-supplied routine when using the define_external command?

Here is a simple Fortran program to show what I want.

## Evaluation of local variables in procedu...

I find the rules for the evaluation of local variables in procedures confusing and dangerous. Here is the example on page 204 of the introductory programming guide for Maple 11. f:=proc() local x,y,z; x:=y^2; y:=z; z:=3; x; # eval(x); # this gives f() = 9 end proc; f(); f() gives the answer y^2. To get the answer 9 you have to use eval(x). The guide says this is done for efficiency. I would strongly disagree and say that the default behavior should be considered a bug not a feature because the returned result is not obvious. Is there any way to force Maple to fully evaluate local variables by default without having to put in eval statements all the time?

## Symbolic integration over a region...

I want to set up a symbolic integration procedure over an region. I will have expressions such as z = c1 + c2*x + c3*y + c4*x*y .. but the number of terms in z can vary and should be determined automatically by the procedure. c1, c2 .. are arbitrary factors. For example, a possible z could be z = a + b/c*x + d/e*x*y^3 + f*y^5. The integral of z should be returned from the procedure as zint = c1*INT(0,0) + c2*INT(1,0) + c3*INT(0,1) + c4*INT(1,1) .. where INT(i,j) represents the integral over the region of x^i*y^j. These integrals will be calculated numerically by another procedure. Does anyone know how to do this?
 Page 1 of 1
﻿