### Multivariable Linear Approximation Formulas (Example 1)

Find the linear approximation to \(f(x,y) = 1 - xy\cos (\pi y)\) at the point (1,1), and use it to approximate f(1.02,0.97).

The linear approximation equation for multiple variables is:

\[L(x,y) = f(a,b) + \frac{{\partial f(a,b)}}{{\partial x}}(x - a) + \frac{{\partial f(a,b)}}{{\partial y}}(y - b)\]

Where (a,b) is a known point and (x,y) is the point you're trying to approximate. In this example, (a,b) is (1,1) and (x,y) is (1.02,0.97). Note that (a,b) is the point substituted in the partial derivatives and (x-a), (y-b) are multiplied.

If you're wondering the mentality of why you'd even do this, this was a way to approximate functions before calculators were made, like Newton's iterations.

First find the partial derivatives and find the values at (1,1).

\[\frac{{\partial f}}{{\partial x}} = - y\cos (\pi y)\]

\[\frac{{\partial f(1,1)}}{{\partial x}} = - 1\cos (\pi )\]

\[\frac{{\partial f(1,1)}}{{\partial x}} = 1\]

\[\frac{{\partial f}}{{\partial y}} = \pi xy\sin (\pi y) - x\cos (\pi y)\]

\[\frac{{\partial f(1,1)}}{{\partial y}} = \pi (0) - 1( - 1)\]

\[\frac{{\partial f(1,1)}}{{\partial y}} = 1\]

We found the partial derivatives at (1,1), we still need to find f(1,1):

\[f(1,1) = 1 - (1)(1)\cos (\pi )\]

\[f(1,1) = 1 - (1)( - 1)\]

\[f(1,1) = 2\]

Substituting these into the linear approximation equation L:

\[L(x,y) = 2 + 1(x - 1) + 1(y - 1)\]

\[L(x,y) = x + y\]

And we want to approximate it at f(1.02,0.97):

\[L(1.02,0.97) = 1.02 + 0.97\]

\[L(1.02,0.97) = 1.99\]

And that's our linear approximation! For curiosity, was it close to the actual value? The actual value is:

\[f(1.02,0.97) = 1 - (1.02)(0.97)\cos (0.97\pi )\]

\[f(1.02,0.97) \buildrel\textstyle.\over= {\rm{1}}{\rm{.098501}}\]

It looks like the linear approximation is not so good...