pw.mac



"Richard Hennessy" <rich.hennessy at verizon.net> writes:
> I have an addition I would like to make to pw.mac.  I would like to be
> able to write a function that can test another function on an interval
> [a,b] and return true if that function is continuous on [a,b] and
> false otherwise.  Something like continuousp(f(x),a,b).  Any ideas on
> how to do that?

Do you mean "function" or do you mean "expression"? Given a function: ie
a black box that you pass an argument and get a value out, it is not
possible to tell whether it is continuous.

Given an expression like "x+1" or "x/(x+1)" or "if is(x<0) then 1 else
0", this is obviously possible for some forms. Your function should
probably be able to return 'unknown too, then you can just implement
support for types of expressions you need.

Quick thoughts: For a rational expression, you could try to find the
roots of the denominator. Of course, that's not always going to be
possible (if the denominator is of high degree). For other things, maybe
you can appeal to limit(). If you can find a finite set of points where
things *might* go wrong, you could just find the limit from the left and
right and compare them.

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/20120601/eaa32fe9/attachment.pgp>;