I was experimenting with some interpolation techniques; in the CAS view of the Functions app I've entered:

{-3,1,2,5} -> xs

{-61,-5,-1,83} -> ys

product(x-xs) -> q(x)

So far so good. Now what I want to do is evaluate the derivative of q(x) at all the elements of xs. Here's where I get stuck: "diff" only computes symbolic derivatives, and SLOPE doesn't seem to work:

SLOPE(q(x),7)

SLOPE(q(X),7)

return 0 and "Error: Undefined Result" respectively.

q(x) returns (3+x)*(-1+x)*(-2+x)*(-5+x) as it should

q(X) returns 0 - it seems to think that the value of X is 0 - and this persists even after "purge(X)".

In Home view,

q(x) returns Error: Syntax Error

q(X) returns -30

So no joy there.

I have discovered that, for example

eval(diff(q(x)),x=3)

will, for example, compute the derivative at a point. But it won't let me pick out a list element:

eval(diff(q(x)),x=xs(1))

produces a long expression full of "xs(1)": clearly for some reason this is not treated as a numeric value.

The best I can do is

seq(eval(diff(q(x)),x=k),k=xs) -> ds

which works, but is confusing. (MAKELIST doesn't seem to work here: in fact MAKELIST hardly even seems to work).

Are there any "natural" ways to perform these sort of computations?

[Note, on both the TI-nspire and the Casio ClassPad I would just use "diff(q(x)|(x=xs)".]

*Edited: 18 Nov 2013, 10:39 p.m. *