Gradient Vector

Linear approximations

In single variable calculus we had: \[\Delta f\approx f^{\prime}\cdot \Delta x.\] The previous expression can be made precise but we won’t do that. This is a motivational paragraph, so we’ll talk about how calculators and computers handle the calculation of \(\sin x\), \(e^{x^3}\) and similar functions.

The electronic devices are quite good at adding, subtracting, and multiplying numbers. The electricity can be tricked into doing basic operations using logic gates. However, it is not easy to make a logic gate that calculates \(e^{x\cos x}\). In general, for non-linear functions \(f\) calculators use approximation techniques.

The memories of calculators are manufactured already with the list of values f(0), f(0.00001), f(0.00002), and a few other values of f. The derivatives of f at these points are also stored in the memory. When a user asks for evaluation of \(f(x)\), the calculator posses the value some \(x_0\) that is close to \(x\). This means that the difference \(\Delta x=x-x_0\) is small, and the approximation \(f(x)-f(x_0)=\Delta f\approx f^{\prime}(x_0)\cdot \Delta x\) is quite accurate. The calculator returns \(f(x_0)+\Delta f\) and the user is left impressed and recommends the calculator to friends and family.

Assume that we now have a function \(g\) of two variables and that we know the value of \(g\) at \((x_0,y_0)\) as well as \(g_x(x_0,y_0)\) and \(g_y(x_0,y_0)\). Let us assume that \((x,y)\) is close to \((x_0,y_0)\). Denote \(\Delta g=g(x,y)-g(x_0,y_0)\), \(\Delta x=x-x_0\), and \(\Delta y=y-y_0\). Then we have: \[\Delta g= \Big(g(x,y)-g(x_0,y)\Big)+\Big(g(x_0,y)-g(x_0,y_0)\Big).\] Let us examine the difference: \(g(x,y)-g(x_0,y)\). The value of \(y\) does not change. This is really good news, because we may consider this difference as a function of \(x\) and apply our knowledge from single variable calculus. Since \(y\) is fixed, the appropriate derivative that we will use is the derivative with respect to \(x\). We obtain: \(g(x,y)-g(x_0,y)=g_x(x_0,y)\Delta x\). Similarly, we have \(g(x_0,y)-g(x_0,y_0)=g_y(x_0,y_0)\Delta y\). We also notice that \(g_x(x_0,y)\approx g_x(x_0,y_0)\).

\[ \Delta g\approx g_x\Delta x+ g_y\Delta y=\langle g_x(x_0,y_0),g_y(x_0,y_0)\rangle \cdot \langle \Delta x, \Delta y\rangle.\] The last expression is written in the form of dot product of vectors \(\langle g_x,g_y\rangle\) and \(\langle \Delta x, \Delta y\rangle\). In this form it is analogous to the formula from the beginning of this section.

Example Find a function \(f\) such that \(\nabla f=\langle x^2+y,x+y^3\rangle\).

Example Let \(f(x,y)=(x^4+y^2)\ln(x^2+y^4)\). Find an approximate value of \(f(0.98,0.3)\).

Practice problems

Problem 1. Let \(f(x,y)=x^3y^2\). Find \(\nabla f(2,3)\).

Problem 2. Let \(f(x,y)=\frac{x+y}{x^2-y}\). Find \(\nabla f(2,1)\).

Problem 3. Let \(f(x,y)=\sin(x+y^2)+e^{x^2+7y}\). Using linear approximation of \(f\) at (0,0), find an approximate value for \(f(-0.1,0.2)\).

Problem 4. Find all functions \(f\) such that \(\nabla f=\langle x+y^2, 2xy+y^2\rangle\).

Problem 5. Which of the following vector-valued functions can be a gradient of a scalar-valued function?
  • (A) \(\overrightarrow a(x,y)=\langle xy, xy\rangle\)
  • (B) \(\overrightarrow b(x,y)=\langle x^2y, x^3\rangle\)
  • (C) \(\overrightarrow c(x,y)=\langle 3x^2y^2, 2x^3y\rangle\)
  • (D) \(\overrightarrow d(x,y)=\langle 2x,3x\rangle\)
  • (E) \(\overrightarrow e(x,y)=\langle\sin y, \cos x\rangle\)