Frechet derivative of a differential operator in maxima?



> From: Daniel Lakeland
> 
> Is there a package that computes the Frechet derivative of a
> differential operator? I think it would be relatively easy to define
> such a thing, but I admit I'm just beginning to get my head around the
> definition. It seems as though defining such a maxima function
> requires that a series of "depends" clauses be used to force diff to
> emit noun forms for certain derivatives.
> 
> eg:
> 
> depends(U,x);
> depends(delta,x);
> operator: diff(U,x,2) - diff(U,x) + U^2 ;
> 
> foo: (subst(U+eps*delta,U,operator)-operator)/eps;
> ev(foo,diff);
> ratexpand(%,eps);
> limit(%,eps,0);
> 
> 			  2
> 			 d delta   ddelta
> (%o17) 			 ------- - ------ + 2 delta U
> 			     2	     dx
> 			   dx
> 
> 
> How would one go about implementing this in general in maxima while
> remaining both idempotent, and "referentially transparent" (that is
> your program wouldn't alter the global environment or behave
> differently the second time through etc) It seems that the depends
> clauses make it difficult.

I think the pdiff package will do what you want.  Some playing around below.  
See the docs in share/contrib/pdiff

(%i1) load('pdiff);
(%o1)    /usr/local/share/maxima/5.11.0/share/contrib/pdiff/pdiff.lisp
(%i2) op(U,x):=diff(U,x,2)-diff(U,x)+U^2;
                                                            2
(%o2)             op(U, x) := diff(U, x, 2) - diff(U, x) + U
(%i3) limit((op(U(x)+eps*d(x),x)-op(U(x),x))/eps,eps,0);
(%o3)                   2 d(x) U(x) + d   (x) - d   (x)
                                       (2)       (1)
(%i4) convert_to_diff(%);
                                   2
                      d           d
(%o4)               - -- (d(x)) + --- (d(x)) + 2 d(x) U(x)
                      dx            2
                                  dx


NOTICE
This e-mail and any attachments are private and confidential and may contain privileged information. If you are not an authorised recipient, the copying or distribution of this e-mail and any attachments is prohibited and you must not read, print or act in reliance on this e-mail or attachments.
This notice should not be removed.