login  home  contents  what's new  discussion  bug reports help  links  subscribe  changes  refresh  edit

Evaluation may lead to spurious division by zero. This problem is not limited to FriCAS, in fact it is general mathematical fact which limits what computers (and people) can do. Simplest example is . When we plug in nonzero number for we get . However, plugging in leads to division by . So, the expression defines function different from , namely is not in the domain of function defined by . For rational functions we can easily limit the problem by canceling common divisors. FriCAS expression domain is doing this auitomatically:

fricas
sin(x)/sin(x) (1)
Type: Expression(Integer)

Even for rational function we may still get into trouble in more complicated situations. Consider . Evaluation this at , in one step, that is as 'eval(x/(x + y), [x = 0, y = 0]?)' leads to division by zero. OTOH evaluating in two steps gives value, but this value depends on order of evaluation, first setting to we get , while first setting to gives :

fricas
eval(x/(x + y), [y = 0]) (2)
Type: Fraction(Polynomial(Integer))
fricas
eval(x/(x + y), [x = 0]) (3)
Type: Fraction(Polynomial(Integer))

Problem becomes more complicated when we consider algebraic expression. Take differential form . This form have no singularities on curve with equation . More precisely, to give well-defined meaning to square root we consider this curve. Then is square root of and our form is . In coordinates we have singularity when (and another singularity at infinity). However, in different coordinates we can get nonsingular expression at any given point. But we can not get coordinates good for all point: for any fixed coordinate system there will be singular points, even though for any point we can choose coordinate system with no singularity at this point.

 Subject:   Be Bold !! ( 15 subscribers )