Hello everybody,
The function numerical_integral is meant to compute an integral in one
dimension.
It takes as mandatory arguments:
- A function (dependin on any number of variables)
- The bounds of the integration domain
As you can see, the integration variable is not given explicitly. As
the function must be numerical, all other symbolic variables involved
in f must be given a numerical value: this is done with the 'params'
parameter:
numerical_integral(a+b+c+d+e+f+g+h, 0,1,[3,4,5,6,7,8,9])
This will replace the values of variables "b,c,d,e,f,g,h" with the
values [3,4,5,6,7,8,9] before any actual integration, but it never
appears explicitly WHICH of the variables will receive each value.
This 'params' argument is confusing and can lead to mistakes (see
comments from #17507), but how should it be changed ?
1) We remove it, making it mandatory for f to depend on one variable
only (not very cool for newcomers?)
2) We request params to be a dictionary ({b:3,c:9,...}) instead of a list
3) We use **args for that numerical_integral(x*y,0,1,y=pi)
What would be best according to you ? I also ask this question because
I know nothing of how symbolics work in Sage, and I do not know if
similar functions have similar standards.
Nathann
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.