Linear approximation for two variables

From Applied Science

To approximate a function of two variables with a tangent plane is the natural extension of approximating a function of one variable with a tangent line. In the same way that zooming in a function of one variable makes it render closer to a straight line, with a tangent plane we see that the level curves become closer to straight parallel lines if we zoom in enough.

(not to scale)

A multivariable function has to be continuous and differentiable for us to use the tangent plane approximation. In case it's continuous but not differentiable a plane exists, but it's not the same as the tangent plane because if the function is not differentiable there can't be a tangent plane. For example: [math]\displaystyle{ f(x,y) = \sqrt{x^2 + y^2} }[/math]. A plane at [math]\displaystyle{ (0,0) }[/math] is not going to be horizontal. It's going to be angled in one direction or another.

The tangent plane

In analytical geometry a plane is defined with [math]\displaystyle{ Z = O + t_1\overrightarrow{v_1} + t_2\overrightarrow{v_2} }[/math]. In the vector form each point of it is given by a point of origin, two parameters and two linearly independent vectors. In the general form we have an equation that should have been seen in school at some point [math]\displaystyle{ Ax + By + Cz + d = 0 }[/math].

Assuming the function to be differentiable at a point, we have:

[math]\displaystyle{ f(x_0,y_0) }[/math] the point of origin.

[math]\displaystyle{ (x - x_0) }[/math] and [math]\displaystyle{ (y - y_0) }[/math] two pairs of points, belonging to the function's domain, that give the direction in [math]\displaystyle{ x }[/math] and in [math]\displaystyle{ y }[/math].

[math]\displaystyle{ \frac{\partial f}{\partial x}(x_0,y_0) }[/math] and [math]\displaystyle{ \frac{\partial f}{\partial y}(x_0,y_0) }[/math] the variation in each direction, which corresponds to [math]\displaystyle{ t_1 }[/math] and [math]\displaystyle{ t_2 }[/math] in the vector form.

Therefore, the equation of the tangent plane is:

[math]\displaystyle{ z - f(x_0,y_0) = \frac{\partial f}{\partial x}(x_0,y_0)(x - x_0) + \frac{\partial f}{\partial y}(x_0,y_0)(y - y_0) }[/math]

With this equation we find all points of a tangent plane. We disregard the [math]\displaystyle{ d }[/math] because this plane is not any plane, but one tied to a function of two variables.

The normal line

In analytical geometry we can prove that [math]\displaystyle{ ax + by + cx = 0 }[/math], the vector [math]\displaystyle{ (a,b,c) }[/math] is perpendicular to the plane. We can do the same for the tangent plane and obtain the same vector from the tangent plane's equation. If we look at the previous equation, we obtain:

[math]\displaystyle{ z = \frac{\partial f}{\partial x}(x_0,y_0)(x - x_0) + \frac{\partial f}{\partial y}(x_0,y_0)(y - y_0) - f(x_0,y_0) }[/math]

Normal vector: [math]\displaystyle{ \left(\frac{\partial f}{\partial x}(x_0,y_0), \frac{\partial f}{\partial y}(x_0,y_0), -1\right) }[/math]

The vector form of the normal line is then: [math]\displaystyle{ \overrightarrow{r} = (x_0,y_0,f(x_0,y_0)) + t\left(\frac{\partial f}{\partial x}(x_0,y_0), \frac{\partial f}{\partial y}(x_0,y_0), -1\right) }[/math]

In analytical geometry we learn that the dot (or scalar) product of two perpendicular vectors is zero. Therefore:

[math]\displaystyle{ [(x,y,z) - (x_0, y_0,f(x_0,y_0))] \cdot \left(\frac{\partial f}{\partial x}(x_0,y_0), \frac{\partial f}{\partial y}(x_0,y_0), -1 \right) = 0 }[/math]

One may have thought about the gradient, because the gradient is perpendicular to a level curve. That gives birth to the question: can the gradient be parallel to the normal line? For this to happen the tangent plane has to be tangent to a level surface, not to the function's surface itself. Can a plane be tangent to a level curve and the function at the same time? This is impossible because with level curves being parallel to the XY plane, the tangent plane would have to be vertical. However, the graph of a function of two variables can't have stacked level curves.