Olive <not0read0765 at yopmail.com> writes:
>>
>> (%i1) f(t):=''(integrate(1/(sin(x)^2+log(x)),x,1,t));
>
> By reading the documentation, I can define:
>
> f_numer(t):=quad_qag(1/(sin(x)^2+log(x)),x,1,t,1)[1];
>
> and f_numer give a numeric approximation of f. But is it possible to
> connect f(t) and f_numer(t)? Both represent intrinsically the same
> function (f(t) is the symbolic representation of f_numer(t)).
>
> Olive
I don't know what the answer *should* be, but what's going on is that
maxima doesn't know of a relationship between "integrate" and
"quad_qag". So
g(x) := 1/(sin(x)^2+log(x));
f(t) := integrate (g(x), x, 1, t);
f_numer(t) := quad_qag(g(x),x,1,t,1)[1];
is reasonable enough (not tested!), but maxima doesn't have a way to say
f(t), gimme_a_number;
Notice that there are several numerical integration routines and that
(as far as I know) clever numerical analyst types haven't found a way to
automatically determine which one is most appropriate, so it's not clear
how one would implement the "gimme_a_number" flag. Also, numerical
routines also return a guess at their error, which you're throwing away
in your code above. How should that be treated by the "gimme_a_number"
flag?
Rupert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: not available
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20120207/cf295775/attachment.pgp>