1 | initial version |
Your params=[5]
seems to indicate that you want the second parameter of f
to be 5, but this is highly ambiguous, and depending of the original definition of f
: what if f
was defined with a default ? What if y
was a keyword parameter ?
An unambiguous way to get the same result is :
sage: numerical_integral(lambda u:f(u,5), 0, pi) (-1.6781430581529053, 2.2206773047754592e-14)
The anonymous function has exactly one parameter, and so does numerical_integral
of this function.
HTH,
2 | No.2 Revision |
Your params=[5]
seems to indicate that you want the second parameter of f
to be 5, but this is highly ambiguous, and depending of the original definition of f
: what if f
was defined with a default ? What if y
was a keyword parameter ?
An unambiguous way to get the same result is :
sage: numerical_integral(lambda u:f(u,5), 0, pi)
(-1.6781430581529053, The anonymous function has exactly one parameter, and so does numerical_integral
of this function.
HTH,