# [Maxima] simple derivative function question

Robert Dodier robert.dodier at gmail.com
Wed Jan 17 14:40:51 CST 2007

```On 1/17/07, sen1 at math.msu.edu <sen1 at math.msu.edu> wrote:

> 1. What does maxima actually do with the next definition?
>
>    (A)   f(x):= diff(f(x),x)

The body of a function defined by := is neither evaluated nor
simplified. Each time the function is called, the body is
evaluated and simplified.

This particular function definition is going to cause a stack overflow
when it is called (from recursively calling f).

> 2. What is the meaning of the following words in the manual on "diff"
>
>       The noun form of `diff' is required in some contexts, such as
>       stating a differential equation.
>
>     What is a "noun form" in maxima?

A noun is a function which isn't called even if it could be.
E.g. foo(x) := x^2; foo(10) => 100, but 'foo(10) => 'foo(10).
This is useful because functions manipulating expressions can
look for specific function names (e.g. foo) and take special action
when they appear. In the case of differential equations, you don't
want Maxima to actually try to compute diff(y, x), you just want
dy/dx to float around as an unevaluated symbol.
So you write 'diff(y, x).

Hope this helps
Robert
```