Post Reply 
How to evaluate A Taylor series at a specific value
08-24-2018, 01:06 AM (This post was last modified: 08-27-2018 03:19 PM by Albert Chan.)
Post: #27
RE: How to evaluate A Taylor series at a specific value
(08-24-2018 12:08 AM)Han Wrote:  Most people would expect the second expression to return 3*x^2 and not a*x^2.
Now suppose the parameter 'a' were removed and apply the same thought process to 'x' within an expression using the | operator.
Do you see where this could be ambiguous? (pun optional)

Thanks Han.

From the user side, yes ... this is ambiguous.
But, from CAS, there is no ambiguity, once order of evaluation is defined.

It is like 1 + 2 * 3, if multiply before add, it is 7; without the precedence, it is 9

Since parisse (post #21) said that x:=1, followed by sin(x) |x=2, will return sin(1),
this suggest CAS is doing the expression first, before substitution.

So, the trick is to think like CAS, and the ambiguity is gone.

Just an example, my Casio evaluate 1/ABC as 1/(ABC), instead of expected 1/A*B*C
So, ..., I just think like the calculator (especially important if it is RPN) Smile

Edit:
my conclusion was wrong (as parisse later pointed out, the result is sin(2), not sin(1))
Going straight to hp50g reference manual, "|" is the "where" command
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: How to evaluate A Taylor series at a specific value - Albert Chan - 08-24-2018 01:06 AM



User(s) browsing this thread: