HP Prime CAS curiosity



#2

If i define in CAS the function f(x)=a*x^4+b*x^3+c*x^2+d*x+e then f(0)=EXP(1).

How can i understand this?


#3

I would define any function with:

f(x):= Something[x]
g(x):= a*x

#4

e=EXP(1)

#5

e is the exp function/constant. replace e with some other letter and it will work as expected. I believe it is exactly the same on the 50g if you use the lower e

TW


#6

It depends on whether you have exact mode checked in the CAS settings or Flag 2 unchecked on the 50g. Then, it will become a symbolic e.

But, yes, better to avoid using reserved constant names like e and i.

Edited: 9 Dec 2013, 6:13 p.m.


#7

Quote:
It depends on whether you have exact mode checked in the CAS settings or Flag 2 unchecked on the 50g. Then, it will become a symbolic e.

But, yes, better to avoid using reserved constant names like e and i.


Flag 2 on the HP50G only affects whether e is converted to its decimal approximation. However, e is still the natural number e and is not allowed as a variable even on the HP50G.


#8

Yes, but by setting flag 2 on the HP 50g I can use e purely symbolically if I want to. For example, on the HP 50g, I can create a symbolic matrix [['a','b'],['c','e']], and it will display as a 2x2 matrix with symbolic elements a,b,c,e. I can then enter it on the stack and type <alpha> D E T Enter (determinant) and the result shown will be a*e-c*b.

Furthermore, once I have created this matrix with e as a symbol, it will remain so in the matrix even if I clear flag 2, such the determinant will still evaluate to a*e-c*b, even though e entered directly into the stack will now display numerically as 2.7183...


Edited: 10 Dec 2013, 1:29 p.m.

#9

hmm ... suggestion: Let e be a letter (or variable) and if i want the EXP-function, i could type in "EXP". But different people means different opinions about that. You can never satisfy anybody

So my suggestion: Let the user decide, how the HP Prime interpret the "e". Make a flag in the settings ...

Be brave, Tim, be user-friendly!


#10

I disagree on this one. Certain letters are universally accepted as constants, and lower case "e" is one of them. Why not let people use the Greek letter pi as an undefined symbolic variable ? The fact is that most people use "e" in formulas to mean the exponential function, just as they use Greek pi to mean 3.14159.... It's no accident that the HP 50g 48S etc all work the same way.

#11

Quote:
hmm ... suggestion: Let e be a letter (or variable) and if i want the EXP-function, i could type in "EXP". But different people means different opinions about that. You can never satisfy anybody

So my suggestion: Let the user decide, how the HP Prime interpret the "e". Make a flag in the settings ...

Be brave, Tim, be user-friendly!

I completely disagree. For the same reason we avoid using "pi" and "i" as variables, users should avoid "e" as a variable as well. Having "e" be a variable does NOT make it user-friendly. Most calculators and computer algebra systems complain when a user tries to use a built-in name as a variable name. The same applies to "e" and "pi" and "i" and other constants pre-defined in the calculator. The fact that there exists an EXP() function does not change the fact that the letter "e" is generally considered a constant.

If the character "e" should be allowed as a variable, then where does this stop? Why not allow "+" be used as a variable? It's just as valid as a symbol. Do you see where this is going?


#12

How i said: Different people means different opinions. Therefore my suggestion was: a flag. Why you disagree with a flag in the settings?


#13

Quote:
How i said: Different people means different opinions. Therefore my suggestion was: a flag. Why you disagree with a flag in the settings?

Even with a flag setting, it would be a bad idea. Every time someone runs a program that you wrote that involves 'e', they would have to make sure their settings are correct. Now, maybe you were nice and you actually preserve the user's settings before code execution, and you properly restore it after your code is done. Except if the user ever aborts your program mid-way, their settings may not necessarily be restored.

Another issue with 'e' as a variable is what happens when users use 'e' in their symbolic computations. If a value is stored into 'e', then ln(e) no longer behaves as one would expect because this expression is now ambiguous. The same goes for any named constant in mathematics (e.g. pi).

Then your convenience becomes a problem for others (and I would be willing to bet more people would prefer 'e' as a constant only).

If we were somehow artificially limited to only a few variables, I could see why it would be necessary to make a universal mathematical constant behave as a variable. However, this is clearly not the case.


Possibly Related Threads…
Thread Author Replies Views Last Post
  HP Prime: CAS taylor Alberto Candel 5 4,095 12-13-2013, 09:45 PM
Last Post: Alberto Candel
  HP Prime Matrices curiosity bluesun08 0 1,529 12-09-2013, 06:44 PM
Last Post: bluesun08
  [HP-Prime CAS] "Warning, ^ (Command) Is ambiguous on non square matrices"?? CompSystems 1 2,219 12-07-2013, 07:15 PM
Last Post: CompSystems
  HP Prime: complex numbers in CAS. Alberto Candel 1 1,925 12-06-2013, 02:36 PM
Last Post: parisse
  HP Prime: Proper Use of Home View and CAS View James Williams 9 4,327 12-05-2013, 02:44 PM
Last Post: James Williams
  [HP Prime] plotfunc() bug in CAS Chris Pem10 2 2,447 12-04-2013, 02:46 PM
Last Post: Chris Pem10
  HP Prime: Home/CAS? Alasdair McAndrew 11 3,953 11-26-2013, 02:48 PM
Last Post: Alberto Candel
  HP Prime numerical precision in CAS and HOME Javier Goizueta 5 2,475 11-16-2013, 03:51 AM
Last Post: Paul Dale
  Need CAS help Michael de Estrada 6 2,690 11-13-2013, 01:29 AM
Last Post: cyrille de Brébisson
  HP Prime - CAS functions in Spreadsheet App CR Haeger 6 2,528 11-11-2013, 12:37 AM
Last Post: Michael de Estrada

Forum Jump: