Two dimensional taylor expansion of arbitrary function

897 Views Asked by At

Consider the function dependent on the variables $N_t$ and $N_{t-1}$. Call the function $f$ so $f = f(N_t, N_{t-1})$. Now suppose we could write $N_t = N^*+n_t$ where $N^*$ is constant, and $n_t$ varying. Hence $f = f(N^* + n_t, N^*+n_{t-1})$. I want the taylor expansion of this now which of the following is correct?

$$f(n_t+N^*, n_{t-1}+N^*) = f(N^*, N^*) + n_tf_{n_t}(N^*, N^*) + n_{t-1}f_{n_{n-1}}(N^*, N^*) + \mathcal{O}(2).$$

or

$$f(n_t+N^*, n_{t-1}+N^*) = f(N^*, N^*) + n_tf_{N_t}(N^*, N^*) + n_{t-1}f_{N_{n-1}}(N^*, N^*) + \mathcal{O}(2).$$

1

There are 1 best solutions below

3
On BEST ANSWER

For $f=f(x,y)$ we have $$f(a+h_a,b+h_b)=f(a,b) + f_x(a,b)h_a + f_y(a,b)h_b + O(h_a^2+h_b^2)$$ In your case $h_a=n_t$ and $h_b=n_{t-1}$ and $a=b=N^*$, therefore

$$f(n_t+N^*, n_{t-1}+N^*) = f(N^*, N^*) + (n_t f_x(N^*, N^*) + n_{t-1}f_{y}(N^*, N^*) + \mathcal{O}(n_t^2+n_{t-1}^2). $$ $f_x(N^*, N^*)$ is the partial derivative with respect to the first variable evaluated at $(x,y)=(N^*, N^*)$. Similarly about $f_y$.

Since the above a little bit confusing you try to write it in a more confusing way:)

$$f(a+h_a,b+h_b)=f(a,b) + (\nabla f)(a,b)\cdot (h_a,h_b) + O(\|(h_a,h_b)\|^2)$$

Here the $\cdot$ is a dot product between two vectors, vector (function) gradient $\nabla f$ (evaluated at $(a,b)$) and vector $\vec{\delta_h}=(h_x,h_y)$, in this example you have $h_x=h_a$ and $h_y=h_b$.