Simple example of linear approximation with multivariable calc - is this right?

403 Views Asked by At

I'm still trying to grasp fully the concept of directional derivatives and how they can be used to approximate functions, and so I have an example of a problem I made up that I tried to evaluate. Let's say I have the function,

$$f(x,y) = x^2+y^2$$

I want to evaluate the directional derivative at the point P = $(2,2,8)$ with the vector $\vec{v} = (1,2)$.

So I first found the gradient $\nabla f = (2x,2y)$, and plugging in the original points I got the gradient at point P to be $(4,4)$. I then found $\nabla f \cdot P$ and got $4 * 1 + 4 * 2 = 12$. So the directional derivative would be $12$. My understanding is that this is the best approximation around the point, and says that moving by $h*\vec{v}$ will cause a change of $12 * h$. So when $h=1$, you would be moving to the point (2,3) and the approximation would be $f \approx 8 + 12 = 20$, but the actual value of the function is $f = 25$. That's a very large error, but when $h$ gets smaller and smaller, this error will decrease monotonically.

I want to clarify if my logic, calculation, and reasoning is correct before I move on from this topic. I'd be worried if I went into the next topic with a fundamental misunderstanding.

1

There are 1 best solutions below

6
On BEST ANSWER

First, as someone said in the comments, the formula $\nabla f \cdot \vec{v}$ for directional derivative only holds when $\vec{v}$ is a unit vector. What you are doing is almost correct, and it is similar in flavor to the directional derivative, but you are not computing the directional derivative. Careful with the terminology here.

You can use your approach to estimate the value of $f$ at some point 'near' $P = (2, 2)$. You are using a vector $\vec{v} = (1, 2)$ and taking $h=1$. That means you are trying to approximate $f$ at the point $P + \vec{v} = (3, 4)$. Using the directional derivative method, you estimated $f(3, 4) \approx 20$, but we calculate $f(3, 4) = 25$. Frankly, this isn't too bad of an approximation. Note that the point $(3, 4)$ is $\sqrt{5} \approx 2.2$ units aways from the original point $(2,2)$. This is kind of far to be expecting super close approximations. So being off by $5$ isn't so bad. If you try the same thing but take $h = 0.1$ or even $h = 0.001$, you will see that the error shrinks dramatically.