A page to coordinate the implementation of a unified model for basic calculus that is "insanely easy" (for non-mathematicians) to use.

Design Constraints

This is a (very incomplete) list of goals that are very important for us to reach, in order for SAGE to be adopted as a mainstream computer algebra system (i.e., a system that is ideal for experts and non-experts alike).

Currently in SAGE

How SAGE currently does calculus

Coming soon.

Bugs in the current implementation

These are thanks to Joel Mohler:

Exhibit 1

sage: x.parent()
 Univariate Polynomial Ring in x over Rational Field
sage: P,y=ZZ['y'].objgen()
sage: f=cos(x)*sin(y)
sage: f(1)
(cos(1)*sin(1))

This should have resulted in a syntax error.

Exhibit 2

What in the world is "sin(x)(1)"?

sage: P,(x,y)=ZZ['x,y'].objgens()
sage: f=sin(x)
sage: f(1)
 sin(x)(1)
sage: float(f(1))
# disaster strikes (recursive traceback)

From William: Yes, this is wrong. But it's just a NotImplementedError, i.e., the __call__ method of sin doesn't do anything with multivariate polynomials, so it just forms the formal evaluation sin(x), which it doesn't know what to do with.

Exhibit 3

This should result in a type error:

sage: P,x=IntegerModRing(17)['x'].objgen()
sage: f=sin(x)
sage: f(18)
 sin(1)

Exhibit 4

Constants should have coercion to a function of 1 variable.

sage: show(plot(1))
---------------------------------------------------------------------------
<type 'exceptions.ValueError'>            Traceback (most recent call last)

Exhibit 5

If we use a polynomial ring generator as generic function variables, exponentiation must work like so:

sage: P,x=ZZ['x'].objgen()
sage: x^x
---------------------------------------------------------------------------
<type 'exceptions.TypeError'>             Traceback (most recent call last)

Exhibit 6

This worked in 1.4, but does not in 1.5.alpha6. I suspect it's only a simple regression due to the new arithmetic properties.

sage: pi*x
---------------------------------------------------------------------------
<type 'exceptions.NotImplementedError'>   Traceback (most recent call last)

Design Ideas

Some ideas to consider and debate.

BasicCalculus (last edited 2008-11-14 13:42:08 by localhost)