HP PRIME: derivative at a point



#4

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.


#5

dq(x)/dx=xs or (dq(x)/dx)|x=xs both work I beleive.

X exists because it is a non-removable home real variable.

Also, there is not any such thing as a <application> HOME or <applicaiton> CAS view. There is 1 CAS view, and 1 home view. The application is "active" while you are in those views, but it is not attached to it in any way.


#6

map(xs,q') or apply(q',xs)

Edited: 19 Nov 2013, 6:58 a.m.


Possibly Related Threads...
Thread Author Replies Views Last Post
  HP28C/S ROM entry point lists update Christoph Giesselink 0 139 01-31-2013, 02:21 PM
Last Post: Christoph Giesselink
  HP-41 ROM Polling Point at FF5 Dan Grelinger 2 180 01-11-2013, 06:00 PM
Last Post: Monte Dalrymple
  33s Decimal Point Matt Agajanian 4 235 11-06-2012, 09:20 PM
Last Post: Matt Agajanian
  WP34S derivative and solver reset Alessandro Castellani (Italy) 6 302 03-29-2012, 02:15 PM
Last Post: Dominic Richens
  wp34S IEEE Floating-Point Conversions Jake Schwartz 12 423 06-08-2011, 10:46 AM
Last Post: Jake Schwartz
  Polynomial Derivative and Integral for the HP 35S Eddie W. Shore 0 107 05-24-2011, 10:29 PM
Last Post: Eddie W. Shore
  HP 41CX Decimal Point restore Joseph Banki 5 211 04-25-2011, 12:38 PM
Last Post: C.Ret
  Decimal point before an operation Jim Yohe 5 259 01-30-2011, 06:32 AM
Last Post: Chris Randle (UK)
  decimal point budlor 3 164 11-07-2010, 11:42 PM
Last Post: Jim Yohe
  Interesting HP-32E with comma for decimal point Michael de Estrada 2 142 06-17-2010, 12:07 AM
Last Post: Vieira, Luiz C. (Brazil)

Forum Jump: