How Can I Use plot2d code for presence of singularities?
Subject: How Can I Use plot2d code for presence of singularities?
From: Raymond Toy
Date: Mon, 24 Dec 2012 17:04:15 -0800
>>>>> "Richard" == Richard Fateman <fateman at eecs.berkeley.edu> writes:
Richard> How about evaluating the expression in interval arithmetic and seeing
Richard> if it is bounded or not.
Richard> If it is unbounded, bisect the range. Etc.
That would probably work. I don't have any interval package for
maxima, but you can get an idea with cmucl and sbcl:
to_lisp();
(defun foo (x)
(declare (type (double-float 0.0d0 1d0)) x)
(values (/ x (expt (- 1/2 x) 3)) (expt (- 1/2 x) 3)))
(compile 'foo)
(describe 'foo) ->
Function arguments:
(x)
Its defined argument types are:
((DOUBLE-FLOAT 0.0d0 1.0d0))
Its result type is:
(VALUES DOUBLE-FLOAT (DOUBLE-FLOAT -0.125d0 0.125d0))
So, indeed, the first expression is unbounded (plain double-float
means unbounded), and we can see that (1/2-x)^3 contains 0 because the
interval is -1/8 to 1/8.
Ray