1. Find the gradient $∇f$ for each of the following functions:
    (a) $f(x, y)=\mathrm e^{x^{2}-y^{2}} \sin 2 x y$
    (b) $f(x, y, z)=\left(x^{2}+y^{2}+z^{2}\right)^{-1 / 2}$
    (a) $∇f=(2\mathrm{e}^{x^2 -y^2 } {\left(y\cos \left(2xy\right)+x\sin \left(2xy\right)\right)},2\mathrm{e}^{x^2 -y^2 } {\left(x\cos \left(2xy\right)-y\sin \left(2xy\right)\right)})$
    (b) $∇f=(-x\left(x^{2}+y^{2}+z^{2}\right)^{-3/ 2},-y\left(x^{2}+y^{2}+z^{2}\right)^{-3/ 2},-z\left(x^{2}+y^{2}+z^{2}\right)^{-3/ 2})$
  2. For each of the following functions sketch some contours $f(x, y) =$ constant (include enough contours to explore all four quadrants of $(x, y)$) and indicate $∇f$ by arrows at some points on these curves. Use one set of axes for each case.
    (a) $f(x, y)=x y$;
    (b) $f(x, y)=\frac{1}{4} x^{2}+y^{2}$;
    (c) $f(x, y)=\frac{x}{y}$.
    (a) $∇f=(y,x)$;
    (b) $∇f=\left(\frac{1}{2}x,2y\right)$;
    (c) $∇f=\left(\frac1y,-\frac x{y^2}\right)$.
  3. Show that there is no function $f(x, y, z)$ such that $∇f(x, y, z) = (y, z, x)$.
    $\frac{\partial f}{\partial x}=y$, so $f=xy+g(y,z)$. But $x=\frac{\partial f}{\partial z}=\frac{\partial g(y,z)}{\partial z}$, no suitable $g$ exists.
  4. Let $f(x, y) = x^2y^3$ and determine $∇f$. Given the vector $\mathbf a = (1, 1)$ and the unit vector $\mathbf v = (a, b)$ with $a^2 + b^2 = 1$, evaluate $\lim _{t \rightarrow 0} \frac{f(\mathbf{a}+t \mathbf{v})-f(\mathbf{a})}{t}$.
    What is the maximum value of this limit that can be obtained by varying $a$ in the vector $\mathbf v$?
    $\lim _{t \rightarrow 0} \frac{f(\mathbf{a}+t \mathbf{v})-f(\mathbf{a})}{t}=\lim _{t \rightarrow 0} \frac{(1+ta)^2(1+tb)^3-1}{t}=2a+3b\le\sqrt{(2^2+3^2)(a^2+b^2)}=\sqrt{13}$.
  5. A bug is walking on the $xy$-plane which is has a toxic environment. The level of toxicity is given by the function $f(x, y) = 2x^2y − 3x^3$. The bug starts at the point (1,2). In what direction away from (1,2) should it initially move in order to lower its exposure to the toxin as rapidly as possible?
    $-∇f|_{x=1,y=2}=-(4xy-9x^2,2x^2)|_{x=1,y=2}=(1,-2)$. It should move towards the direction of 5 o'clock.
  6. Find a unit vector perpendicular to the surface $x^2y+y^2z+z^2x + 1 = 0$ at the point (1,2,−1). Hence, or otherwise, write the equations of the tangent plane and the normal line at this point.
    $\nabla(x^2y+y^2z+z^2x)|_{(1, 2, −1)}=(2xy+z^2,2yz+x^2,2zx+y^2)|_{(1, 2, −1)}=(5,-3,2)$. So the equation of the normal line is $\mathbf r=(1,2,-1)+t(5,-3,2)$. The equation of the tangent plane is $5x-3y+2z=-3$.
  7. Let $f$ and $g$ be sufficiently differentiable functions of $x, y, z$.
    (a) Prove the following:
    i. $∇(fg) = f∇g + g∇f$;
    ii. $∇(f^n) = nf^{n−1}∇f$;
    iii. $\nabla\left(\frac{f}{g}\right)=\frac{g \nabla f-f \nabla g}{g^{2}}$
    (b) In Cartesian coordinates $(x, y, z)$ the Laplacian operator, $∇^2$, is defined by $\nabla^{2} f=\frac{\partial^{2} f}{\partial x^{2}}+\frac{\partial^{2} f}{\partial y^{2}}+\frac{\partial^{2} f}{\partial z^{2}}$. Show that $\nabla^{2}(f g)=f \nabla^{2} g+2(\nabla f) \cdot(\nabla g)+g \nabla^{2} f$.
    (a)(i)$(\nabla f)_i = \dfrac{\partial f}{\partial x_i}⇒(\nabla (fg))_i = \dfrac{\partial (fg)}{\partial x_i} = \dfrac{\partial f}{\partial x_i}g + f\dfrac{\partial g}{\partial x_i} = g(\nabla f)_i + f(\nabla g)_i$ holds for each coordinate $x_i$. Hence $\nabla (fg) = g\nabla f + f \nabla g$.
    (ii)We induct on $n$. When $n=0$, we have 0=0. Assume the property is true for $n-1$, so $∇f^{n-1}=(n-1)f^{n-2}∇f$, using part (i), $∇(f^n)=∇(f^{n-1}f)= f^{n−1}∇f+f∇f^{n-1}=f^{n−1}∇f+f\cdot(n-1)f^{n-2}∇f=nf^{n−1}∇f$. By induction, it is true for all $n\in\mathbb N$.
    (iii)By (i),$\nabla f=\nabla\left(g\cdot\frac{f}{g}\right)=g\nabla\left(\frac{f}{g}\right)+\frac{f}{g}\nabla g$⇒$\nabla\left(\frac{f}{g}\right)=\frac{g \nabla f-f \nabla g}{g^{2}}$.
    (b)$\nabla^{2}(f g)=\nabla(f\nabla g+g\nabla f)=f\nabla^2g+(\nabla f)\cdot(\nabla g)+(\nabla g)\cdot(\nabla f)+g\nabla f^2=f \nabla^{2} g+2(\nabla f) \cdot(\nabla g)+g \nabla^{2} f$.
  8. Use the Taylor series for a function of two variables to expand the following functions about the point $x = 1, y = 1$, to the order shown.
    (a) $f(x, y) = x^3 + y^2 + 3x^2y$, to all orders;
    (b) $f(x, y) = x^2 + y +\cos(2πxy)$, to second order.
    (a) $f(x, y) = x^3 + y^2 + 3x^2y$ is a polynomial. So the Taylor series is itself.
    (b) $f(1, 1) = 3,f_x=2x-2\pi y\sin\left(2\pi xy\right)⇒f_x(1,1)=2,$$f_y=1-2\pi x\sin\left(2\pi xy\right)⇒f_y(1,1)=1$. $f_{xx}=2-4y^2\pi ^2\cos\left(2\pi xy\right)⇒f_{xx}(1,1)=2-4\pi^2,$$f_{xy}=-2\pi \sin\left(2\pi xy\right)-4xy\pi ^2\,\cos\left(2\pi xy\right)⇒f_{xy}(1,1)=-4\pi^2,$$f_{yy}=-4x^2\pi ^2\cos\left(2\pi xy\right)⇒f_{yy}(1,1)=-4\pi^2$. Therefore $p_2(x,y)=3+2(x-1)+(y-1)+(1-2\pi^2)(x-1)^2-4\pi^2(x-1)(y-1)-2\pi^2(y-1)^2=(1-2\pi^2) x^2-4 \pi ^2 x y-2 \pi ^2 y^2+8 \pi ^2 x+(1+8 \pi ^2) y-8 \pi ^2+1$.