#1239 diff does not return a function

closed
nobody
Lisp Core (472)
5
2007-09-15
2007-07-20
andreas
No

typing:

(%i1) f(x):=sin(x);
(%o1) f(x) := sin(x)
(%i2) g(x):=diff(f(x),x);
(%o2) g(x) := diff(f(x), x)
(%i3) g(x);
(%o3) cos(x)

everything works so far as expected. but then:

(%i4) g(0);
Non-variable 2nd argument to diff:
0
#0: g(x=0)
-- an error. To debug this try debugmode(true);
(%i5)

is there a way to get the value of a differentiated function?

-------------------------------------------------------------

Maxima version: 5.12.0
Maxima build date: 15:58 6/6/2007
host type: i686-redhat-linux-gnu
lisp-implementation-type: GNU Common Lisp (GCL)
lisp-implementation-version: GCL 2.6.7

-------------------------------------------------------------

Discussion

  • Dan Gildea
    Dan Gildea
    2007-09-15

    • status: open --> closed