I'm trying to create a set of orthogonal polynomials using the
Gram-Schmidt process, but I hit a problem:
dot(f,g) == integrate(f*g*x^2,x=-1..1)
proj(f,g) == dot(f,g)*f/dot(f,f)
p0 := 1
p1 := x - proj(p0,x)
p2 := x^2 - proj(p0,x^2) - proj(p1,x^2)
p0 and p1 evaluate correctly, but p2 hits this error:
; (DEFUN |*2;dot;5;frame1394| ...) is being compiled.
;; The variable |*2;dot;5;frame1394;MV| is undefined.
;; The compiler will assume this variable is a global.
Internal Error
The function coerce with signature OrderedCompletion Integer ->
Expression OrderedCompletion Integer is missing from domain
Expression(OrderedCompletion (Integer))
I've also tried to define p(n) as a recursive function like so:
p(0) == 1
p(n | n > 0) == x^n - sum(proj(p(k),x^n),k=0..n-1)
But get a stack overflow: (eg, evaluating p(1))
OpenAxiom will attempt to step through and interpret the code.
Cannot compile map: proj
We will attempt to interpret the code.
Cannot compile map: p
We will attempt to interpret the code.
>> System error:
Bind stack overflow.
I would appreciate any pointers where I am going wrong. I'm an Axiom
newbie. These calculations were done using open-axiom 1.2.1
Thanks
Arnold
_______________________________________________
Axiom-mail mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/axiom-mail