I want to explore multivariable function approximations using truncated Taylor series.
Mathematically, for a function f(x,y) and using operator notation for the partial derivatives, where e.g. Dx2 f(x,y) denotes the second partial derivative of f wrt x evaluated at (x,y), we can write the N'th order truncated Taylor series for f around (x0,y0) as
I want to make a Maple-function for this expression, and try
P := (x,y,x0,y0,N) -> sum(1/factorial(n)*sum(binomial(n,k)*
D[1$(n-k), 2$k](f)(x0,y0)*(x-x0)^(n-k)*(y-y0)^k, k=0..n), n=0..N):
where f(x,y) is a previosly defined Maple-function.
My P function fails, and the reason why it fails is related to the "D" operator in the "sum".
Please take a look at the following code-snippet:
Output (9) is as expected, but output (8) is not !!
I would expect output (8) to be equal to the sum of output (9), i.e. to be equal to (-1/2).
Please illuminate why I don't get the sum of the sequence (9) as my output (8).