axiom-math
[Top][All Lists]

## [Axiom-math] Re:

 From: Martin Rubey Subject: [Axiom-math] Re: Date: Mon, 6 Dec 2004 11:32:23 +0100

```Dear Constantine Frangos,

Only guessing...

I think that it is correct to use "operator" for q_i and p_i. If you want to
create them with a loop, you can say

qs:=[operator subscript('q, [i::OutputForm]) for i in 1..3]
ps:=[operator subscript('p, [i::OutputForm]) for i in 1..3]

which you can access using qs.i and ps.i now. Unfortunately, there seems to be
a bug that messes up the interpretation of (qs.1)(2*t). A workaround is to say

eval((qs.1)(s),s=(2*t))

To teach Axiom that x' = y, you can use

x:=operator('x,1)
y:=operator('y,1)
derivative(x,(t+->y(t))::(EXPR INT->EXPR INT))\$BasicOperatorFunctions1(EXPR INT)

The second argument to operator telling Axiom the arity of the operator, is
optional.

Unfortunately, I can't get the obvious

[derivative(qs.i,(t+->(ps.i)(t))::(EXPR INT->EXPR INT))\$BOP1(EXPR INT)
for i in 1..3]

to work.

Most unfortunately, I can't think right away of a way to tell Axiom to
differentiate with respect to an operator. However, it seems to me that there
is also some maths involved. Surely, you also want to be able to differentiate
p1(2t) with respect to p1?

Martin

```