2
votes

I am willing to compute a Frechet/Gateaux derivative of a function which is not entirely explicit and my question is : What would be the most efficient way to do it ? Which language would you recommend me to use ?

Precisely, my problem is that I have a function, say F, which is the square of the euclidean norm of the sum of products of pairs of multidimensional functions (i.e. from R^n to R^k).

AFAIK, If I use Maple or Maxima, they will ask me to explicit the functions involved in the formula whereas I would like to keep them abstract. Then, I necessarly need to compute a Frechet/Gateaux derivative so as to keep the expressions simple. Indeed, when I proceed the standard way, I start to develop the square of the euclidean norm as a sum of squares and there is a lot of indexes. My goal being to make a Taylor developpement with integral remainder to the third order, the expression becomes, according to me, humanly infeasible (the formula is more than one A4 page long).

So I would prefer to use a Frechet/Gateaux derivative, which would allow me, among other, to keep scalar products instead of sums.

As the functions invloved have some similarities with their derivatives (due to the presence of exponentials) there is just a small amount of rules to know. So I thought that I might make such a one-purposed computer algebra system by myself.

And I started to learn LISP, as I read that it would be efficient for my problem, but I am a little bit lost now, since this language is very different and I am still used to think in terms of C/Python/Perl...

Here is another question : would you have some links to courses or articles about how an algebra system for symbolic computations is made (preferably in LISP) ? Any suggestions are welcome.

Thank you very much for your answers.

1
Great ! It seems to answer most of my questions ! I found the full text here Structure and Interpretation of Computer Programs. Although it's dealing with Scheme and not Lisp, the principles seems to be well described. - nickjackolson
Peter Norvig's 'Paradigms of Artificial Intelligence Programming' http://www.norvig.com/paip.html also have chapters on symbolic computation. That book is using Common Lisp. - Terje D.
I managed to get this book ! It looks great ! Thank you for these fantastic references ! - nickjackolson
Are you by chance using "abstract" and "explicit" in place of the usual "symbolic" versus "numeric"? - Kaz
Programming in Lisp is similar to C and assembly language. You can think of all values (variables, array elements, cons cell "car" and "cdr" slots ...) as being machine words. These machine words usually either hold a value directly (like a small integer) or hold a pointer to a dynamically allocated object. The machine word uses a few bits to indicate type (and a dynamic object uses a few more bits to indicate it in more detail). These values are passed around by value, like in C. Unlike C, memory is GC'd and local ("lexical") variables survive the termination of their blocks. - Kaz

1 Answers

0
votes

My advice is to use Maxima. Maxima is inspired by Lisp, and implemented in Lisp, so using Maxima will save you a tremendous amount of time and trouble. If Lisp is suitable for your problem, Maxima is even more so.

Maxima will allow you to use undefined terms in an expression; it is not necessary to define all terms.

Post a message to the Maxima mailing list ([email protected]) to ask for specific advice. Please explain in detail about what you are trying to accomplish.