Something I've been wondering about...

There are a number of Maple routines which, when passed expressions containing a mix of symbolic and floating-point values, will call convert/rational. This gets different explanations depending on whom gets asked. Some are against it, as ill-advised altogether (use a floating-point algorithm, they might say). Some say it's the best one might do, in the circumstances, because the presence of symbolic unknowns might preclude a purely floating-point numeric scheme, and the implemented exact schemes might be problematic for floating-point data.

It's the latter of those that I'm interested in. If one has decided to convert to exact values, then a performance penalty gets admitted. Ok. But why not take some moments longer and use identify() ?

Suppose that one wants an exact answer, but has only floating-point data. Maybe there is some reason to think that, for a given example with a particular background, some qualitative aspect of a solution would be recognizable in the exact result but not in the behaviour of the numeric result.

Here's a simple example (which likely doesn't show the quality above). More involved examples might be found, which illustrate the points better. Suppose that one has only got right at hand a floating-point expression such as 't'.

> t := evalf(1/2*sqrt(2) - diff(y(x),x)*7*sqrt(2)/4 + x*cos(Pi/6));
                                          /d      \
          t := 0.7071067810 - 2.474873734 |-- y(x)| + 0.8660254040 x
                                          \dx     /

Now, which solution looks more useful of these,

> dsolve({t},{y(x)});
                          216506351   2   707106781
                  {y(x) = ---------- x  + ---------- x + _C1}
                          1237436867      2474873734
 
> dsolve({identify(t)},{y(x)});
                                    2  1/2
                      {y(x) = 1/14 x  6    + 2/7 x + _C1}

It seems to me that, were one looking for qualitative insight or "better" subsequent mathematical or algebraic behaviour then the second of those two solutions would be prefereable. Now, sure, for that simple example, one can recover the second solution above from the first. Ie,

> identify(evalf(dsolve({t},{y(x)})));
                                 1/2  1/2  2
                   {y(x) = 1/14 2    3    x  + 2/7 x + _C1}

But that may not be possible in general. There must be examples where `identify` succeeds on the arguments but not on the rational solution. (..and for the converse also, would it be significant?)

If one buys into the argument that converting such examples to exact values is OK, then why is the middle road of exact rationals the way it is done? I could understand a rejection of the arguments (an error message, or warning). And I could understand trying harder with `identify`. But why is the relatively fast conversion to rationals any good? Is it just compromise, and if so why is that good, and why should the issues be discussed more in the help-system?

Comments and opinions welcome,
acer


Please Wait...