Alasdair wrote:
>
> Here's my first question. I am experimenting with formal derivatives. So:
>
> f := operator 'f
> > y := operator 'y
> > f1 := D(f(x,y(x)),x)
> > f1 := subst(f1,D(y(x),x)=f(x,y(x)))
> >
>
> This looks fine so far. However, eventually I want to do some algebraic
> manipualtion on these (and higher) derivatives, for which it will be
> convenient to replace derivatives in these expressions with a simple
> symbol. For example:
>
> f2:=D(f1,x)
> > f2:=subst(f2,D(y(x),x)=f(x,y(x)))
<snip>
> What I
> want to do is something like
>
> subst(f2,D(D(f(x,y(x)),x),x)=Fxx)
> >
>
> so that in my final expression the symbol "Fxx" will take the place of
> D(D(f(x,y(x)),x::Symbol),x::Symbol) in the above output expression. This
> is going to require some coercion... but I'm not sure how. Any ideas?
In interactive use the following is probably easyest:
(7) -> kernels(f2)
(7)
[f (x,y(x)), f (x,y(x)), f (x,y(x)), f (x,y(x)), f (x,y(x)),
,1,1 ,2,2 ,2,1 ,1,2 ,1
,
y (x), f (x,y(x)), f(x,y(x))]
,2
Type: List(Kernel(Expression(Integer)))
(8) -> k1 := kernels(f2).1
(8) f (x,y(x))
,1,1
Type: Kernel(Expression(Integer))
(9) -> eval(f2, k1, Fxx)
(9)
, ,
f(x,y(x))y (x)f (x,y(x)) + f(x,y(x))f (x,y(x)) + y (x)f (x,y(x))
,2,2 ,2,1 ,1,2
+
2 ,
f (x,y(x))f (x,y(x)) + f (x,y(x)) y (x) + Fxx
,2 ,1 ,2
Type: Expression(Integer)
That is you pick apropriate kernel from list of all kernels in f2 and
substitute for it. In program similar thing is unreliable, since small
change to expression may change ordering of kernels. In such case
you can compute needed kernel and substitute like:
(13) -> fk1 := eval(D(f(x, z), x, 2), z = y(x))
(13) f (x,y(x))
,1,1
Type: Expression(Integer)
(14) -> eval(f2, fk1 = Fxx)
(14)
, ,
f(x,y(x))y (x)f (x,y(x)) + f(x,y(x))f (x,y(x)) + y (x)f (x,y(x))
,2,2 ,2,1 ,1,2
+
2 ,
f (x,y(x))f (x,y(x)) + f (x,y(x)) y (x) + Fxx
,2 ,1 ,2
Type: Expression(Integer)
> Second question: the Axiom pages say that Hyperdoc is being replaced with a
> help browser under Firefox. I like the idea of this very much: Hyperdoc
> always seemed a bit clumsy to me. Is this available in FriCAS, and if so,
> how?
ATM no. There is code by Arthur C. Ralfs in this direction, but
it does not work with current FriCAS.
--
Waldek Hebisch
[email protected]
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/groups/opt_out.