3123
Comment:
|
3075
|
Deletions are marked like this. | Additions are marked like this. |
Line 13: | Line 13: |
== Solution for polynoms == | == A bad solution for polynoms == |
Line 16: | Line 16: |
The version with unknown returns algebraic elements when asking for roots: |
|
Line 17: | Line 19: |
sage: a,b,c = var('a,b,c') sage: X, Y = unknown('X') (X,Y) sage: P = a*X^2 + b*X + c |
sage: unknown('X') X sage: P = X^2 - X - 1 sage: roots(P) [(-0.618033988749895?, 1), (1.618033988749895?, 1)] |
Line 23: | Line 26: |
== An interactive trigonometric circle == == Solution for polynoms == The high school interface provides two basics functions for creating variables : the var (a symbolic variables for functions) and unknowns (exclusively for polynoms). |
The version with var returns symbolic expression when asking for roots: |
Line 30: | Line 28: |
sage: a,b,c = var('a,b,c') sage: X, Y = unknown('X') (X,Y) sage: P = a*X^2 + b*X + c |
sage: var('x') sage: P = x^2 - x - 1 sage: roots(P) [(-1/2*sqrt(5) + 1/2, 1), (1/2*sqrt(5) + 1/2, 1)] |
Line 35: | Line 33: |
What goes wrong in the SAGE notebook interface for secondary school usage
Some of (nice) sage features are not well adapted at an elementary level. In particular:
- the oriented object syntax should sometimes be avoided: the interface must be intuitive from the mathematic *standard* syntax point of vue; on the other side we must keep all python features of list, tuple, dict as they are (ask teachers).
- the algebra under polynoms must be hided a little bit. QQbar, Number fields and symbolic rings must stay in backend;
- the namespace is huge (a general problem of SAGE)
- the help on elementary functions is not well adapted
Supplementary:
- do a french translation of commmands (?)
- write some help files and a really basic tutorial mixing Sage and python.
A bad solution for polynoms
The high school interface provides two basics functions for creating variables : the var (a symbolic variables for functions) and unknowns (exclusively for polynoms).
The version with unknown returns algebraic elements when asking for roots:
sage: unknown('X') X sage: P = X^2 - X - 1 sage: roots(P) [(-0.618033988749895?, 1), (1.618033988749895?, 1)]
The version with var returns symbolic expression when asking for roots:
sage: var('x') sage: P = x^2 - x - 1 sage: roots(P) [(-1/2*sqrt(5) + 1/2, 1), (1/2*sqrt(5) + 1/2, 1)]
Patches
Following the development model of Sage, we will use mercurial patches here.
- a patch for the documentation will come soon
Program of high school in France
In bracket are the corresponding levels.
- second degree polynom [1e S]
- sequences in particular recursive ones [1e S]
- sequences and approximations : pi, e, sqrt(2), ... [1e S]
- continuity and derivation [Tale S]
- functions study and graphics [Ta1e S]
- integration[Tale S]
- elementary graph theory [Tale ES]
Object or not
The python list usage must be kept as it is. But we have the choice to use or not (explicitely) some methods.
Starting from a list:
python: l = [1,2,3]
We can use the standard append:
python: l.append(4)
or the += concatenation:
python: l += [4]
TODO
There is still a lot of problems:
- clearing the namespace causes some crashes (there are some general memory initialization). I make research to do it properly. For now, I use a "do it, if it works it's good" method.
- sqrt(n) (log(n), exp(n), ...) returns a symbolic expression which does not evaluate correctly as boolean expression.
- help topics in the rest documentation
latex rendering in plot is not easy to have : sage: text("$" + latex(my_object) + "$", (0,0)). Is there a better way ?
latex "bug" for rational fractions : http://groups.google.com/group/sage-devel/browse_thread/thread/9d58693356e11947 and the corresponding (minor) trac ticket http://trac.sagemath.org/sage_trac/ticket/7363