WilburC

20 Reputation

One Badge

8 years, 303 days

MaplePrimes Activity


These are replies submitted by WilburC

Thanks again.  Indeed, the double quote method works fine in Maple 17, but not Maple 7.  I prefer the interface in the latter so that was what I was using, but I have both.

I understand what the quotes do, but I did not get the syntax of

evalf(Int(h@g, 1..2))

I read in the help file

If the integrand is specified as a Maple operator f, then the second argument must be a range a..b and not an equation, that is, a variable of integration must not be specified

but I did not understand what the logic behind this is.  Am I right in assuming that

h@g

or

x-> h(g(x))

works because this prevents the 'premature' evaluation of the function?

Thanks very much for the help.

The method using double quotes still did not work for me (see below).  However, the second and third methods (with Carl_Love's correction) did work.  The logic behind this syntax is not clear to me.  Is there a guide to this anywhere ?  The on-line Maple help is not very helpful in this regard, or at least I could not find the relevant section.

> restart;
> g:=a->fsolve(a*y^2-sin(y),y=2);

> evalf(Int(''g(x)'',x=1..2));
Error, (in evalf/int) invalid argument for indets

> h:=x->x*sin(x);
> evalf(Int(''h(g(x))'',x=1..2));
Error, (in evalf/int) invalid argument for indets

> evalf(Int(x-> h(g(x)), 1..2));

                             .3917464163

> evalf(Int(h@g, 1..2));

                             .3917464163

The post which recommended using unapply was

http://www.mapleprimes.com/questions/38611-Numerical-Integration-Of-An-Fsolve

 

 

Page 1 of 1