- For each of the following functions and associated points, P, compute the equation of the Taylor quadratic approximation to the function at P. Graph the original surface and its Taylor approximation on the same set of axes, and identify each surface. (a) z = sin(xy), P = (1, PI/2) (b) z = exp(–x^2 – y^2), P = (0.3, 0.4)
How would I plot this in Mathematica
The first line defines a function that returns the quadratic Taylor approximation to
zaroundx0,y0.Seriesisn't a perfect way to do this, sinceNormal[Series[z, {x, x0, 2}, {y, y0, 2}]]will end up having terms proportional to ${\Delta x}^{2}{\Delta y}$, ${\Delta x}{\Delta y}^{2}$, and ${\Delta x}^{2}{\Delta y}^{2}$.
(
Normaljust removes the big-O notation, turning the series into the corresponding approximation.)The second and third lines do the actual plotting. Assuming you are using the default colors, the 'true' function will be orange, while the approximation will be blue.