Post Reply 
How to evaluate A Taylor series at a specific value
08-27-2018, 04:15 PM
Post: #36
RE: How to evaluate A Taylor series at a specific value
(08-27-2018 02:33 PM)Wes Loewer Wrote:  I see the difficulty in determining whether the |x=0.5 should be evaluated before or after.

Since taylor(sin(x))|x=0.5 is evaluated before, but ∂(sin(x),x)|x = 0.5 is evaluated after, I assume there is some way in the source code to indicate which functions are "before" and which are "after." Or is ∂() a special case?

It seems evaluation order is context based.
This is my guess ...

Differentiation had the dx, notifying the ∂(...) what to differentiate against.
Variable x thus off limit for where substitution, until expression differentiated.
In other words, where substitution is delayed. (same for integration)

Regular expressions, there is no need to delay where replacement.
We can think of where as running code with argument x, like parisse described earlier:

f(x)|x=a => (lambda x: f(x))(x=a) => f(a)

taylor(sin(x))|x=0.5, however, is inconsistent with above logic.
It should be treated like ∂(...), since it had an off limit x, to "taylor" against.

Perhaps implied x does not count ?
What is the result of taylor(sin(x), x=0, 5)|x=0.5 ?
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-27-2018 04:15 PM



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