0
$\begingroup$

Lets pretend i have some function $f(x) = 2*x_1 + 3*x_2$, and says find first order approximation around some point [a b].

I know the formula $f_a (x) = f(x') + f(x)'*(x-x')$, but do not know how to plug in 2 dimensional point in place of x'

By the way x' is a x hat, i do not know how to write here x hat :) And $f_a ()$ is affine


  • 0
    @VaheMusinyan: If $x=(x_1,x_2)$, you get the linear approximation $2x_1+3x_2$. Or, equivalently, $2(x_1-a)+3(x_2-b)+ 2a+3b$.2012-10-08

3 Answers 3

2

This does not answer the main question, since that takes no work at all. So we deal with the $f(x_1,x_2)=e^{x_1+x_2}+x_1^2+x_2^3$ of a comment by the OP, in a neighbourhood of $(0,1)$. We have $\frac{\partial f}{\partial x_1}=e^{x_1+x_2}+2x_1.$ At $(0,1)$ this is $e$. Similarly, $\frac{\partial f}{\partial x_2}=e^{x_1+x_2}+3x_2^2.$ At $(0,1)$ this is $e+3$. So the linear approximation is $(x_1-0)(e)+(x_2-1)(e+3)+ (e+1).$ The last term $e+1$ is just $f(0,1)$.

We can simplify the above expression a little.

  • 0
    It depends on what your answer is. The only answer that I see below in a comment is $e^{x_1+x_2}+ 3x_2-2$, which is not right. The answer, simplified, is $ex_1+(e+3)x_2-2$.2012-10-08
1

In this case $f'(x) = \begin{bmatrix} 2 & 3 \end{bmatrix} $.

The first order approximation (which is the function, since it is linear) is given by:

$f_a(x) = f(x') + f'(x')(x-x') = 2x_1'+3x_2'+ \begin{bmatrix} 2 & 3 \end{bmatrix}\begin{bmatrix} x_1-x_1' \\ x_2-x_2' \end{bmatrix} = 2x_2+3x_2$

  • 0
    can you give me an answer for the case e^$(x_1+x_2)+x_1^2+x_2^3$ around [0 1]?2012-10-08
0

You will have to use a generalized formula. You can look this up here http://en.wikipedia.org/wiki/Taylor_series#Taylor_series_in_several_variables .

The idea is that you ask your function: "How do you change from this point (a,b) if I change this one variable while holding the other fixed?" for both variables and simply add the two contributions where the rates of change, which are nothing but the partial derivatives, are multiplied by the values of change, e.g. $x_1 -a$ etc. This correction turns out to be the directional derivative of the function at $(a,b)$ in direction of your change vector: $f_1 (\vec{x}) = f(\vec{x}_0) + (\vec{x}-\vec{x}_0) \cdot \vec{\nabla} f \vert_{\vec{x}_0}$. Try this out for your function - it is a special one, it is already quite linear!

  • 0
    ah, this is another example. Well I think you are right with your solution!2012-10-08