Post Reply 
How to evaluate A Taylor series at a specific value
08-24-2018, 12:08 AM (This post was last modified: 08-24-2018 12:08 AM by Han.)
Post: #26
RE: How to evaluate A Taylor series at a specific value
(08-23-2018 02:30 PM)Albert Chan Wrote:  
(08-22-2018 07:52 PM)parisse Wrote:  | is evaluated more like a program, where x would be like an argument.
taylor(sin(x))|x=0.5 will evaluate sin(x) to sin(0.5) before taylor is called.

It's hard to evaluate |. You don't want to get sin(1) for sin(x)|x=2 if x:=1; has been run

If "|" is like running a program with argument x:

taylor(sin(x))|x=0.5 ==> (lambda x: taylor(sin(x))) (0.5) ==> taylor(sin(0.5)) ==> sin(0.5)

sin(x)|x=2 ==> (lambda x: sin(x))(2) ==> sin(2)

Why does "|" hard to evaluate ?
Why previous run of x := 1 affect it ?

Maybe "|" is simply "evaluate at" ?
However, that imply taylor had a bug (post #23)

Consider the expression a*x^2. Suppose 'x' is left undefined and we execute:

a:=3;
a*x^2;

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)

Graph 3D | QPI | SolveSys
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 - Han - 08-24-2018 12:08 AM



User(s) browsing this thread: 1 Guest(s)