Holger,
For the moment do this:
(%i1) f: -2*x^3 + 3*x^2 + 12*x -13;
(%o1) -2*x^3+3*x^2+12*x-13
(%i2) f1: diff(f, x);
(%o2) -6*x^2+6*x+12
(%i3) dfdx: ev(f1, x = 1.0);
(%o3) 12.0
It will work for most situations.
If you want an answer as a numerical value use the additional argument "float" e.g.
(%i4) dfdx_numerical: ev(f1, x = 1, float);
(%o4) 12
When working with more complicated symbolic derivatives a nice thing to use is the "depends" (refer to help manual for examples).
Regards,
Vishal
>>> Holger Schulz <qdl at gmx.net> 6/18/2009 6:23 PM >>>
I want to make the derivate of a function a function itself. Naively i
tried
f(x):=-2*x^3+3*x^2+12*x-13;
and
f1(x):=diff(f(x),x);
which did not work:
(%i16) f1(1);
diff: second argument must be a variable; found 1
#0: f1(x=1)
-- an error. To debug this try debugmode(true);
What can I do?
Thanks
hs
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima