Very basic question



Dear Madhusudan,

Very quick reply:

It seems Maxima cannot differentiate with respect to a constant
d and this is reasonable. Therefore, in  my opinion, at first the
derivative should be computed and, next, the variable there 
should be substituted by the constant d. 

Example, for a special function g = u*sin(a*u+b) (the variable is 
assumed to be u, the parameters a and b):

(C1) display2d : false$

(C2) h(x) := subst(u=x, diff(u*sin(a*u+b),u))$

(C3) h(d/2);
(D3) SIN(a*d/2+b)+a*d*COS(a*d/2+b)/2
(C4) h(1/2);
(D4) SIN(b+a/2)+a*COS(b+a/2)/2

More generally, for a general function g with a variable u plus, 
possibly, parameters such as a and b (or y, z, etc.), assuming
that u appears in g (as its variable) and it is a variable of course:

(C5) f(x,g,u) := subst(u=x, diff(g,u))$

(C6) f(d/2, tanh(a*x^2+b*sin(x)), x);
(D6) (b*COS(d/2)+a*d)*SECH(b*SIN(d/2)+a*d^2/4)^2
(C7) f(1/2, tanh(a*x^2+b*sin(x)), x);
(D7) (COS(1/2)*b+a)*SECH(SIN(1/2)*b+a/4)^2

Best regards from Patras,

Nikos

> "Madhusudan Singh" <chhabra@eecs.umich.edu> wrote:


> Quick question.
> 
> How do I calculate the derivative at a point ?
> 
> f(x):=diff(g(x),x);
> f(d/2) does not work when d is constant.