Search the corpus

    Multivariable calculus

    A map \(f\colon U\to\RR^m\) on an open set \(U\subseteq\RR^n\) is differentiable at \(a\in U\) if there is a linear map \(Df(a)\colon\RR^n\to\RR^m\) with \(\lim_{h\to0}\abs{f(a+h)-f(a)-Df(a)h}/\abs{h}=0\). The function equal to \(\frac{xy}{x^2+y^2}\) away from the origin and to \(0\) at the origin has both partial derivatives at the origin and is not continuous there. The chain rule \(D(g\circ f)(a)=Dg(f(a))\circ Df(a)\) multiplies Jacobian matrices. For \(F\colon\RR^n\to\RR\) continuously differentiable with \(\nabla F(a)\ne0\), the gradient \(\nabla F(a)\) is orthogonal to the tangent space at \(a\) of the level set \(\{F=F(a)\}\). A line integral \(\int_CP\,dx+Q\,dy\) is computed from a parametrization of \(C\). Green’s theorem: for a positively oriented, piecewise smooth, simple closed curve \(C\) bounding a region \(D\), and \(P,Q\) continuously differentiable on an open set containing \(D\cup C\), \(\oint_CP\,dx+Q\,dy=\iint_D(Q_x-P_y)\,dA\). A continuous vector field on a connected open set has path-independent line integrals if and only if it is the gradient of a function.

    Gradient is orthogonal to level curves

    Let \(z=f(x,y)\) be a smooth surface. Show that the gradient is perpendicular to the level curves.

    Solution
    1. Definitions:
    • \(f: \RR^2 \to \RR, \quad (x,y) \mapsto z = f(x,y)\)

    • Level curves are given by \(f(x, y) = c\);

    • \(\nabla f: \RR^2 \to \RR^2, \quad \nabla f(\vector p) = \thevector{f_x(\vector p), f_y(\vector p)}\)

    • \(\gamma(t): \RR \to \RR^2, \quad \gamma(t) = \thevector{x(t), y(t)}, \quad \gamma_t(t) = \thevector{x_t(t), y_t(t)}\)

    • \(g(t) = f \circ \gamma:\RR \to \RR, \quad (f \circ \gamma)(t) = f(x(t), y(t)), \quad g_t(t) = f_t(\gamma(t))\cdot \gamma_t(t)\)

    • A vector \(v\) is perpendicular to a surface at a point \(p\) iff \(v\) is perpendicular to the tangent vector of every curve passing through \(p\).

    • Proof of actual statement

      • Let \(\vector p = \thevector{x_0, y_0}\) be a point on the level surface, so \(f(\vector p) = c\) for some constant.

      • Let \(\gamma(t) = \thevector{x(t), y(t)}\) be a curve on the level surface, so \(\gamma(t_0) = \vector p\) for some \(t_0\). Let \(\gamma'(t)\) be its tangent vector.

      • Let \(g(t) = f(x(t), y(t)) = (f \circ \gamma)(t)\), and note that for some \(\vector x\) on the level surface, and so we have \(g(t_0) = f(\vector x) = c\) and thus \(\dd{g}{t}(t) = 0\).

      • By the chain rule, compute \[\begin{align*} \dd{g}{t}(t) &= \left(\dd{f}{x}\dd{x}{t} + \dd{f}{y}\dd{y}{t}\right)(t) \\ &= \inner{ \thevector{\dd{f}{x}(x(t), y(t)), \dd{f}{y}(x(t), y(t))} } { \thevector{\dd{x}{t}(t), \dd{y}{t}(t)} } \\ &= \inner{\nabla f(\gamma(t))}{\dd{\gamma}{t} (t)}. \end{align*}\]

      From above, we know that this is zero. Now note that we have \[ \dd{g}{t}(t_0) = \inner{\nabla f(\gamma(t_0))}{\dd{\gamma}{t}(t_0)} = \inner{\nabla f(\vector p)}{\gamma'(t_0)} \] but by the previous statement, \(\dd{g}{t}(t_0) = 0\), which exacty says that the gradient of \(f\) is orthogonal to \(\gamma\) at \(\vector p\). But \(\vector p\) was an arbitrary point on the level surface, and \(\gamma\) was an arbitrary curve through it. So \(\nabla f\) is orthogonal to every level curve through \(\vector p\), and this orthogonal to the tangent plane at \(\vector p\), and thus normal to the surface at \(\vector p\). Since \(\vector p\) was an arbitrary point on the level curve, this holds everywhere on the level curve, and for arbitrary level curves. Thus \(\nabla f\) is orthogonal to every level curve. \(\qed\)

    Solution

    Goal: Prove that for a continuously differentiable function \(f: \mathbb{R}^2 \to \mathbb{R}\), the gradient vector \(\nabla f(\mathbf{p})\) at any point \(\mathbf{p}\) on a level curve \(C = \{(x,y) \in \mathbb{R}^2 \mid f(x,y) = c\}\) is orthogonal to the tangent vector of every smooth curve in \(C\) passing through \(\mathbf{p}\).

    <1>1. Let \(\mathbf{p} = (x_0, y_0) \in C\) such that \(f(\mathbf{p}) = c\). Let \(\gamma: (-\varepsilon, \varepsilon) \to \mathbb{R}^2\) be a differentiable parametrized curve such that \(\gamma(0) = \mathbf{p}\) and \(\gamma(t) \in C\) for all \(t \in (-\varepsilon, \varepsilon)\).

    By definition of a smooth curve on the level set \(C\).

    <1>2. The composite function \(g(t) = (f \circ \gamma)(t) = f(\gamma(t))\) is constant on \((-\varepsilon, \varepsilon)\) with value \(c\).

    Since \(\gamma(t) \in C\) for all \(t\), \(f(\gamma(t)) = c\) identically.

    <1>3. \(g'(0) = 0\).

    The derivative of a constant function is identically zero.

    <1>4. By the multivariable Chain Rule, \(g'(0) = \nabla f(\gamma(0)) \cdot \gamma'(0) = \nabla f(\mathbf{p}) \cdot \gamma'(0)\).

    Since \(f\) is continuously differentiable and \(\gamma\) is differentiable at \(t=0\), the chain rule applies: \[g'(0) = \left.\frac{d}{dt} f(x(t), y(t))\right|_{t=0} = \frac{\partial f}{\partial x}(\mathbf{p}) x'(0) + \frac{\partial f}{\partial y}(\mathbf{p}) y'(0) = \nabla f(\mathbf{p}) \cdot \gamma'(0).\]

    <1>5. \(\nabla f(\mathbf{p}) \cdot \gamma'(0) = 0\).

    Combining <1>3 and <1>4 gives \(\nabla f(\mathbf{p}) \cdot \gamma'(0) = g'(0) = 0\).

    <1>6. Conclusion: \(\nabla f(\mathbf{p})\) is orthogonal to the tangent vector \(\gamma'(0)\) of any curve lying on the level set through \(\mathbf{p}\).

    Since two vectors with zero dot product are orthogonal by definition, and \(\gamma\) was arbitrary. Q.E.D.

    Total differentiability at the origin when $f_x$ is continuous

    Let \(f: \mathbb{R}^2 \to \mathbb{R}\) be continuous.

    1. Define what it means for \(f\) to be (totally) differentiable at the origin.

    2. Suppose \(\partial f/\partial x\) is continuous at \((0,0)\), while \(\partial f/\partial y\) exists at \((0,0)\). Prove that \(f\) is differentiable at \((0,0)\).

    Note: You can “buy” the answer to part (a) for 4 points. Also you can earn partial credit on part (b) by making the stronger assumption both partial derivatives are continuous at \((0,0)\).

    Solution

    A function \(f: \RR^2 \to \RR\) is totally differentiable at \(\vector x\) if there exists a linear map \(D: \RR^2 \to \RR\) such that \[f(\vector x + \vector h)- f(\vector x) = D(\vector x)\vector h + \varepsilon(\vector h) \text{ where } \frac{\varepsilon(\vector h)}{\norm{\vector h}} \to 0. \] Equivalently, it is when the following limit exists and satisfies \[ \lim_{\vector h \to \vector 0} \abs{\frac{f(\vector x + \vector h) - f(\vector x) - D(\vector x)\vector h}{\norm{\vector h}}} = 0, \] in which case we write \(f' = D\), or in this special case, \(f' = \nabla f\).

    Substituting in $\vector x = \vector 0$, being differentiable at zero requires that $\exists D$ such that
    $$
    f(\vector h) - f(\vector 0) = D(\vector 0)\vector h + \varepsilon(\vector h), ~\frac{\varepsilon(\vector h)}{\norm{\vector h}} \to 0, 
    \\ \text{ or } \\ 
    \lim_{\vector h \to \vector 0} \abs{\frac{f(\vector h) - f(\vector 0) - D(\vector 0)\vector h}{\norm{\vector h}}} = 0.
    $$
    We'll make use the mean value theorem. The general statement is
    $$
    f' \text{ exists and continuous on } (a,b)
    \implies \exists A \in [a,b] \suchthat \\
    f(b) - f(a) = f'(c)(b-a)
    $$
    and here we'll use
    $$
    f_x \text{ exists and continuous on } (0, t) 
    \implies \exists A \in [0, t] \suchthat \\ 
    f(t, y) - f(0, y) = f_x(A, y)(t - 0) = tf_x(A, y) \\
    \implies \color{purple} f(t, y) - f(0, y) = tf_x(A, y)
    $$
    where moreover 
    $$
    \lim_{t\to 0} f_x(A, y) = f_x(\lim_{t\to 0} A, y) = f(0, y)
    $$ 
    since $f_x$ was assumed to be continuous.
    
    We'll also use the "best linear approximation" definition of differentiability. In general, it states
    $$
    f' \text{ exists on } (a,b) \\
    \implies f(x) = f(a) + f'(a)(x-a) + o(x-a),~ \frac{o(x-a)}{x-a} \to 0 \\
    \implies f(x) - f(a) = f'(a)(x-a) + o(x-a),~ \frac{o(x-a)}{x-a} \to 0 \\
    \implies f(b) - f(a) = f'(a)(b-a) + o(b-a),~ \frac{o(b-a)}{b-a} \to 0
    $$
    and here we'll take $a=0, b=t$, so $x-a = x$ and $b-a = t$, and use the variant
    $$
    f_y \text{ exists on } (0, t) \\ 
    \implies f(x, t) - f(x, 0) = f_y(x, 0)(t - 0) + o(t),~ \frac{o(t)}{t} \to 0 \\
    \implies \color{green}f(x, t) - f(x, 0) = tf_y(x,0) + o(t), ~\frac{o(t)}{t} \to 0.
    $$
    We can then write
    $$\begin{align*}
    f(h_1, h_2) - f(0, 0)
    &= {\color{green}f(h_1, h_2) - f(h_1, 0)} + {\color{purple}f(h_1, 0) - f(0, 0)} \\
    &= {\color{green}h_2f_y(0, 0) + o(h_2)} + {\color{purple}h_1f_x(A, 0)}\\
    &= (h_1 f_x(0, 0) - {\color{red}h_1 f_x(0, 0)}) + {\color{purple}h_1f_x(A, 0)} + {\color{green}h_2f_y(0, 0) + o(h_2)} \\
    &= h_1 f_x(0, 0) + {\color{green}h_2 f_y(0, 0)} + h_1({\color{purple}f_x(A,0)} - {\color{red}f_x(0,0)}) + {\color{green}o(h_2)}
    \end{align*}$$
    
    Now, since $f_x$ is continuous, ${\color{purple}f_x(A,0)} - {\color{red}f_x(0,0)} \to 0$ and so $h_1(f_x(A,0) - f_x(0,0)) = o(h_1)$. We thus have
    $$\begin{align*}
    f(h_1, h_2) - f(0, 0)
    &= h_1 f_x(0, 0) + h_2 f_y(0, 0) + o(h_1) + o(h_2) \\
    &= h_1 f_x(0, 0) + h_2 f_y(0, 0) + o(\norm{\vector h}) \\ \\
    &\implies 
    f(h_1, h_2) - f(0, 0) - h_1 f_x(0, 0) - h_2 f_y(0, 0) = o(\norm{\vector h})
    \end{align*}$$
    
    and so if we define 
    $$D(\vector h) = h_1 f_x(0, 0) + h_2 f_y(0, 0),
    $$ 
    
    we can take absolute values to find that 
    $$
    \abs{f(\vector h) - f(\vector 0) - D(\vector h)} = o(\norm{\vector h}) \\
    \text{ and so } \\
    \lim_{\vector h \to \vector 0} \abs{\frac{f(\vector h) - f(\vector 0) - D(\vector h)}{\norm{\vector h}}} = 0
    $$
    
    which forces $f$ to be totally differentiable at $\vector 0$ with derivative $D$.
    Solution

    Goal: Prove that if the partial derivatives \(f_x\) and \(f_y\) of \(f: \mathbb{R}^2 \to \mathbb{R}\) exist in an open neighborhood of \((0,0)\) and \(f_x\) is continuous at \((0,0)\), then \(f\) is (totally) differentiable at \((0,0)\) provided \(f_y(0,0)\) exists.

    <1>1. Definition: \(f\) is differentiable at \(\mathbf{0} = (0,0)\) with total derivative \(L = (f_x(\mathbf{0}), f_y(\mathbf{0}))\) if and only if \[\lim_{\mathbf{h} \to \mathbf{0}} \frac{|f(h_1, h_2) - f(0,0) - h_1 f_x(0,0) - h_2 f_y(0,0)|}{\|\mathbf{h}\|} = 0.\]

    <1>2. Decomposition of the difference: For small \(\mathbf{h} = (h_1, h_2)\), \[f(h_1, h_2) - f(0,0) = [f(h_1, h_2) - f(0, h_2)] + [f(0, h_2) - f(0,0)].\]

    Trivial algebraic identity by adding and subtracting \(f(0, h_2)\).

    <1>3. Application of the single-variable Mean Value Theorem: There exists \(\theta \in (0, 1)\) such that \(f(h_1, h_2) - f(0, h_2) = h_1 f_x(\theta h_1, h_2)\).

    For fixed \(h_2\), the function \(g(t) = f(t, h_2)\) is differentiable on the interval between \(0\) and \(h_1\) because \(f_x\) exists in a neighborhood of \((0,0)\). By the single-variable MVT, \(g(h_1) - g(0) = h_1 g'(\theta h_1) = h_1 f_x(\theta h_1, h_2)\).

    <1>4. Linear approximation along the \(y\)-axis: \(f(0, h_2) - f(0,0) = h_2 f_y(0,0) + r(h_2)\) where \(\lim_{h_2 \to 0} \frac{r(h_2)}{h_2} = 0\).

    By definition of the partial derivative \(f_y(0,0) = \lim_{h_2 \to 0} \frac{f(0, h_2) - f(0,0)}{h_2}\).

    <1>5. Bounding the remainder: \[|f(h_1, h_2) - f(0,0) - h_1 f_x(0,0) - h_2 f_y(0,0)| \le |h_1| |f_x(\theta h_1, h_2) - f_x(0,0)| + |r(h_2)|.\]

    Substitute <1>3 and <1>4 into <1>2 and apply the triangle inequality: \[f(\mathbf{h}) - f(\mathbf{0}) - h_1 f_x(\mathbf{0}) - h_2 f_y(\mathbf{0}) = h_1 [f_x(\theta h_1, h_2) - f_x(0,0)] + r(h_2).\]

    <1>6. The limit as \(\|\mathbf{h}\| \to 0\) vanishes: Proof: <2>1. Since \(|h_1| \le \|\mathbf{h}\|\), \(\frac{|h_1| |f_x(\theta h_1, h_2) - f_x(0,0)|}{\|\mathbf{h}\|} \le |f_x(\theta h_1, h_2) - f_x(0,0)|\). <2>2. As \(\mathbf{h} \to \mathbf{0}\), \((\theta h_1, h_2) \to (0,0)\). Since \(f_x\) is continuous at \((0,0)\), \(\lim_{\mathbf{h} \to \mathbf{0}} |f_x(\theta h_1, h_2) - f_x(0,0)| = 0\). <2>3. Since \(|h_2| \le \|\mathbf{h}\|\), \(\frac{|r(h_2)|}{\|\mathbf{h}\|} \le \frac{|r(h_2)|}{|h_2|} \to 0\) as \(h_2 \to 0\) (for \(h_2 \neq 0\); for \(h_2 = 0\), \(r(h_2) = 0\)). <2>4. Combining these bounds shows the quotient in <1>1 tends to \(0\).

    <1>7. Conclusion: \(f\) is totally differentiable at \((0,0)\).

    Follows from <1>1 and <1>6. Q.E.D.

    $\int_0^1\int_y^1\sin(x^2)\,dx\,dy$ by reversing the order of integration

    Evaluate \[ \int_0^1\int_y^1\sin(x^2)\,dx\,dy. \]

    Solution

    The region is \(0\le y\le x\le1\). Reversing the order of integration, \[ \int_0^1\int_y^1\sin(x^2)\,dx\,dy =\int_0^1\int_0^x\sin(x^2)\,dy\,dx =\int_0^1x\sin(x^2)\,dx. \] With \(u=x^2\), \[ \int_0^1x\sin(x^2)\,dx =\frac12\int_0^1\sin u\,du =\frac{1-\cos1}{2} =\boxed{\sin^2\!\left(\frac12\right)}. \]

    The gradient of $xy$ is orthogonal to its level curves

    Let \(f(x,y) = xy\). Show that \(\nabla f\) is orthogonal to the level curves of \(f\).

    Solution

    \(\nabla f = (y, x)\). Along a level curve \(f(x,y) = c\) one may take a parametrization \(\gamma\) with \(f(\gamma(t)) = c\), so \(\frac{d}{dt}f(\gamma(t)) = 0\). By the chain rule this inner product is \(\langle \nabla f(\gamma(t)), \gamma'(t)\rangle\), hence \(\nabla f\) is orthogonal to every tangent of the level curve.

    Differentiability in $\mathbb{R}^n$, and $xy/(x^2+y^2)$ is not differentiable at the origin

    1. Let \(f\) be a real-valued function defined on \(\mathbb{R}^n\). Define differentiability of \(f\) at a point \(p\).
    2. Show that the function \(f: \mathbb{R}^2 \to \mathbb{R}\) defined by \[f(x,y) = \frac{xy}{x^2+y^2} \text{ for } (x,y) \neq (0,0), \text{ and } f(0,0) = 0\] is not differentiable at \((0,0)\).
    Solution

    <1>1. Part (a): Definition of differentiability: <2>1. A function \(f: \mathbb{R}^n \to \mathbb{R}\) is differentiable at a point \(p \in \mathbb{R}^n\) if there exists a linear transformation \(L: \mathbb{R}^n \to \mathbb{R}\) (or equivalently a gradient vector \(\nabla f(p) \in \mathbb{R}^n\) such that \(L(h) = \langle \nabla f(p), h \rangle\)) satisfying: \[ \lim_{h \to 0} \frac{|f(p + h) - f(p) - L(h)|}{\|h\|} = 0. \] Equivalently, \(f(p + h) = f(p) + L(h) + o(\|h\|)\) as \(\|h\| \to 0\).

    standard definition of Fréchet differentiability on \(\mathbb{R}^n\).

    <1>2. Part (b): Non-differentiability of \(f(x, y)\) at \((0, 0)\): <2>1. If a function \(f\) is differentiable at \(p\), then \(f\) is continuous at \(p\).

    \(|f(p+h) - f(p)| \le |L(h)| + o(\|h\|) \le \|L\| \|h\| + o(\|h\|) \to 0\) as \(h \to 0\).

    <2>2. We evaluate the limit of \(f(x, y) = \frac{xy}{x^2 + y^2}\) as \((x, y) \to (0, 0)\) along lines \(y = mx\): For \(x \neq 0\): \[ f(x, mx) = \frac{x(mx)}{x^2 + (mx)^2} = \frac{m x^2}{x^2(1 + m^2)} = \frac{m}{1 + m^2}. \]

    algebraic substitution \(y = mx\).

    <2>3. Along the line \(y = 0\) (\(m = 0\)), \(\lim_{x \to 0} f(x, 0) = 0\). Along the line \(y = x\) (\(m = 1\)), \(\lim_{x \to 0} f(x, x) = \frac{1}{1 + 1^2} = \frac{1}{2} \neq f(0, 0)\). Since the limit depends on the path of approach, \(\lim_{(x, y) \to (0, 0)} f(x, y)\) does not exist. Thus \(f\) is discontinuous at \((0, 0)\).

    non-uniqueness of directional limits.

    <2>4. Since \(f\) is not continuous at \((0, 0)\), by <2>1 \(f\) cannot be differentiable at \((0, 0)\).

    contrapositive of differentiability implies continuity.

    <1>3. Conclusion: \(f\) is defined to be differentiable if its linear approximation error is \(o(\|h\|)\), and \(f(x, y) = \frac{xy}{x^2+y^2}\) is not differentiable at \((0, 0)\) due to discontinuity. Q.E.D.

    <1>1 and <1>2.

    The Jacobian matrix of a map $\mathbb{R}^n\to\mathbb{R}^m$, and the Jacobian of $(r\cos\theta,r\sin\theta)$ at the origin

    Define the Jacobian matrix of a mapping \(f: \mathbb{R}^n \to \mathbb{R}^m\) at a point \(a = (a_1, \dots, a_n)\) of \(\mathbb{R}^n\). Compute the Jacobian matrix of \(f(r,\theta) = (r\cos\theta, r\sin\theta)\) at \(a = (0,0)\).

    Solution

    <1>1. Definition of the Jacobian matrix: <2>1. Let \(f: \mathbb{R}^n \to \mathbb{R}^m\) be given by coordinate functions \(f(x) = (f_1(x), f_2(x), \dots, f_m(x))^T\) for \(x = (x_1, \dots, x_n) \in \mathbb{R}^n\).

    vector-valued function definition.

    <2>2. If the partial derivatives \(\frac{\partial f_i}{\partial x_j}(a)\) exist at \(a \in \mathbb{R}^n\) for all \(1 \le i \le m\) and \(1 \le j \le n\), the Jacobian matrix \(J_f(a) \in M_{m \times n}(\mathbb{R})\) is defined as: \[ J_f(a) = \begin{pmatrix} \frac{\partial f_1}{\partial x_1}(a) & \frac{\partial f_1}{\partial x_2}(a) & \cdots & \frac{\partial f_1}{\partial x_n}(a) \\ \frac{\partial f_2}{\partial x_1}(a) & \frac{\partial f_2}{\partial x_2}(a) & \cdots & \frac{\partial f_2}{\partial x_n}(a) \\ \vdots & \vdots & \ddots & \vdots \\ \frac{\partial f_m}{\partial x_1}(a) & \frac{\partial f_m}{\partial x_2}(a) & \cdots & \frac{\partial f_m}{\partial x_n}(a) \end{pmatrix}. \]

    definition of total derivative matrix representation with respect to standard bases.

    <1>2. Compute the Jacobian matrix for \(f(r, \theta) = (r\cos\theta, r\sin\theta)\): <2>1. The component functions are \(f_1(r, \theta) = r\cos\theta\) and \(f_2(r, \theta) = r\sin\theta\).

    given mapping.

    <2>2. Compute the partial derivatives with respect to \(r\) and \(\theta\): \[ \frac{\partial f_1}{\partial r} = \cos\theta, \qquad \frac{\partial f_1}{\partial \theta} = -r\sin\theta, \] \[ \frac{\partial f_2}{\partial r} = \sin\theta, \qquad \frac{\partial f_2}{\partial \theta} = r\cos\theta. \]

    product and trigonometric differentiation rules.

    <2>3. The general Jacobian matrix at \((r, \theta)\) is: \[ J_f(r, \theta) = \begin{pmatrix} \cos\theta & -r\sin\theta \\ \sin\theta & r\cos\theta \end{pmatrix}. \]

    assembling partial derivatives into \(2 \times 2\) matrix.

    <1>3. Evaluation at \(a = (0, 0)\): <2>1. Setting \((r, \theta) = (0, 0)\): - \(\cos(0) = 1\), - \(-0 \cdot \sin(0) = 0\), - \(\sin(0) = 0\), - \(0 \cdot \cos(0) = 0\).

    trigonometric values \(\cos(0) = 1, \sin(0) = 0\).

    <2>2. Thus: \[ J_f(0, 0) = \begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix}. \]

    substituting values from <2>1 into <2>3.

    <1>4. Q.E.D.

    Step <1>1 gives the definition, and steps <1>2 and <1>3 give \(J_f(0,0) = \boxed{\begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix}}\).

    The chain rule for $f(g(t))$ and perpendicularity of $\nabla f$ to the tangent of an implicit level curve

    1. Let \(f(x, y)\) be a differentiable function from \(\mathbb{R}^2\) to \(\mathbb{R}\) and let \(g(t) = (x(t), y(t))\) be a differentiable curve from \(\mathbb{R}\) to \(\mathbb{R}^2\). State the multivariable chain rule for the derivative of the composite function \(F(t) = (f \circ g)(t) = f(x(t), y(t))\).

    2. Let \(f(x, y)\) be a continuously differentiable function on \(\mathbb{R}^2\), and let \(P = (x_0, y_0) \in \mathbb{R}^2\) be a point. Assume that in a neighborhood of \(P\), the level curve equation \(f(x, y) = f(P)\) implicitly defines \(y\) as a differentiable function of \(x\), say \(y = h(x)\) with \(y_0 = h(x_0)\). Show that the tangent vector to the graph of \(y = h(x)\) at \(P\) is perpendicular (orthogonal) to the gradient vector \(\nabla f(P)\).

    Solution

    Goal: State the multivariable chain rule and prove that level curve tangent lines are orthogonal to the gradient vector \(\nabla f(P)\).

    <1>1. Part (a): Multivariable Chain Rule: Proof: <2>1. Let \(f: \mathbb{R}^2 \to \mathbb{R}\) and \(g: \mathbb{R} \to \mathbb{R}^2\) given by \(g(t) = (x(t), y(t))\) be differentiable functions. <2>2. The derivative of the composite function \(F(t) = (f \circ g)(t) = f(x(t), y(t))\) is given by: \[\frac{dF}{dt}(t) = \frac{\partial f}{\partial x}(x(t), y(t)) \frac{dx}{dt}(t) + \frac{\partial f}{\partial y}(x(t), y(t)) \frac{dy}{dt}(t).\] <2>3. In vector notation using the gradient vector \(\nabla f = \left( \frac{\partial f}{\partial x}, \frac{\partial f}{\partial y} \right)\) and velocity vector \(g'(t) = (x'(t), y'(t))\): \[\frac{d}{dt}(f(g(t))) = \nabla f(g(t)) \cdot g'(t) = \langle \nabla f(g(t)), g'(t) \rangle.\]

    <1>2. Part (b): Perpendicularity of \(\nabla f(P)\) to the Tangent Line: Proof: <2>1. Parameterize the graph of the implicit function \(y = h(x)\) as a smooth curve \(\gamma: I \to \mathbb{R}^2\): \[\gamma(x) = (x, h(x)).\] <2>2. The point \(P = (x_0, y_0) = \gamma(x_0)\). <2>3. The tangent vector to the graph at \(P\) is given by the derivative: \[\mathbf{T} = \gamma'(x_0) = \left( 1, h'(x_0) \right).\] <2>4. Since the graph lies entirely on the level set \(f(x, y) = f(P) = c\) for all \(x\) in a neighborhood of \(x_0\): \[f(\gamma(x)) = f(x, h(x)) = c \quad \text{for all } x \in I.\] <2>5. Differentiating both sides of the identity \(f(\gamma(x)) = c\) with respect to \(x\) using the Chain Rule from Part (a): \[\frac{d}{dx} [f(\gamma(x))] = \nabla f(\gamma(x)) \cdot \gamma'(x) = 0.\] <2>6. Evaluating at \(x = x_0\) where \(\gamma(x_0) = P\): \[\nabla f(P) \cdot \gamma'(x_0) = \nabla f(P) \cdot \mathbf{T} = 0.\] <2>7. Alternatively, by implicit differentiation: \[\frac{\partial f}{\partial x}(P) \cdot 1 + \frac{\partial f}{\partial y}(P) \cdot h'(x_0) = 0 \implies h'(x_0) = -\frac{f_x(P)}{f_y(P)} \quad (\text{if } f_y(P) \ne 0).\] Then: \[\nabla f(P) \cdot \mathbf{T} = (f_x(P), f_y(P)) \cdot \left( 1, -\frac{f_x(P)}{f_y(P)} \right) = f_x(P) - f_x(P) = 0.\] <2>8. Since the dot product \(\nabla f(P) \cdot \mathbf{T} = 0\), the gradient \(\nabla f(P)\) is perpendicular (orthogonal) to the tangent vector \(\mathbf{T}\) of the level curve at \(P\).

    <1>3. Conclusion: The chain rule gives \(\frac{d}{dt} f(g(t)) = \nabla f(g(t)) \cdot g'(t)\); differentiating the level curve identity \(f(x, h(x)) = c\) yields \(\nabla f(P) \cdot (1, h'(x_0)) = 0\). Q.E.D.

    Directional derivatives exist and equal $\nabla f\cdot\mathbf{u}$ when the first partials are continuous

    Suppose \(f:\mathbb R^2\to\mathbb R\) has continuous partial derivatives at \((0,0)\). Prove that \(f\) has directional derivatives in every direction at the origin.

    Solution

    Continuity of \(f_x\) and \(f_y\) at \((0,0)\) presupposes that both partial derivatives exist on some open disc \(B\) about \((0,0)\). Fix a direction \(\mathbf u=(u_1,u_2)\in\mathbb R^2\).

    <1>1. For every sufficiently small \(h\neq0\) there are points \(\xi_h\) between \(0\) and \(hu_1\) and \(\eta_h\) between \(0\) and \(hu_2\) such that \[ f(hu_1,hu_2)-f(0,0)=f_x(\xi_h,hu_2)\,hu_1+f_y(0,\eta_h)\,hu_2. \]

    Choose \(h\) so small that the segments from \((0,hu_2)\) to \((hu_1,hu_2)\) and from \((0,0)\) to \((0,hu_2)\) lie in \(B\), and split \[ f(hu_1,hu_2)-f(0,0)=\bigl[f(hu_1,hu_2)-f(0,hu_2)\bigr]+\bigl[f(0,hu_2)-f(0,0)\bigr]. \] The function \(s\mapsto f(s,hu_2)\) is differentiable on the first segment with derivative \(f_x(s,hu_2)\), so the mean value theorem gives \(\xi_h\) with the first bracket equal to \(f_x(\xi_h,hu_2)\,hu_1\); if \(u_1=0\) the bracket is \(0\) and any \(\xi_h\) works. The same argument applied to \(t\mapsto f(0,t)\) gives \(\eta_h\) for the second bracket.

    <1>2. \(D_{\mathbf u}f(0,0)\) exists and equals \(f_x(0,0)u_1+f_y(0,0)u_2\).

    Dividing <1>1 by \(h\), \[ \frac{f(hu_1,hu_2)-f(0,0)}{h}=f_x(\xi_h,hu_2)\,u_1+f_y(0,\eta_h)\,u_2. \] As \(h\to0\), the points \((\xi_h,hu_2)\) and \((0,\eta_h)\) tend to \((0,0)\) because \(|\xi_h|\le|hu_1|\) and \(|\eta_h|\le|hu_2|\). Continuity of \(f_x\) and \(f_y\) at \((0,0)\) makes the right side tend to \(f_x(0,0)u_1+f_y(0,0)u_2\), so the difference quotient has this limit.

    <1>3. Q.E.D.

    The direction \(\mathbf u\) was arbitrary, so by <1>2 every directional derivative of \(f\) at the origin exists, with \(D_{\mathbf u}f(0,0)=\nabla f(0,0)\cdot\mathbf u\).

    Extrema of $xy$ on the ellipse $x^2+4y^2=8$

    Using the method of Lagrange Multipliers, find the maximum and minimum values of \(f(x,y) = xy\) on the ellipse \(x^2 + 4y^2 = 8\).

    Solution

    Let \[ g(x,y)=x^2+4y^2. \] At an extremum on \(g=8\), Lagrange multipliers give \[ (y,x)=\lambda(2x,8y), \] so \[ y=2\lambda x,\qquad x=8\lambda y. \] Neither \(x\) nor \(y\) can be zero at such a point, so substitution gives \[ 1=16\lambda^2. \] Hence \(\lambda=\pm1/4\).

    If \(\lambda=1/4\), then \(y=x/2\). The constraint becomes \[ x^2+4(x/2)^2=2x^2=8, \] so \(x=\pm2\) and \(y=\pm1\) with matching signs. Thus \(xy=2\).

    If \(\lambda=-1/4\), then \(y=-x/2\), giving the points \((2,-1)\) and \((-2,1)\) and hence \(xy=-2\).

    Therefore the maximum value is \(2\) and the minimum value is \(-2\).

    The line integral $\int_\Delta y\,dx+2x\,dy$

    Let \(\Delta\) be the triangular boundary in \(\mathbb{R}^2\) with vertices \((0,1)\), \((2,0)\), and \((2,1)\), traversed counterclockwise. Evaluate the line integral: \[I = \oint_{\Delta} y \, dx + 2x \, dy.\]

    Solution

    Goal: Evaluate the closed line integral \(\oint_\Delta y\,dx + 2x\,dy\) around the oriented triangle using Green’s Theorem.

    <1>1. Setting up Green’s Theorem: Proof: <2>1. Let \(D \subset \mathbb{R}^2\) be the filled triangular region enclosed by the positively oriented (counterclockwise) boundary curve \(\partial D = \Delta\). <2>2. The vector field components are: \[P(x, y) = y, \qquad Q(x, y) = 2x.\] <2>3. Both \(P\) and \(Q\) have continuous partial derivatives on \(\mathbb{R}^2\): \[\frac{\partial Q}{\partial x} = \frac{\partial}{\partial x}(2x) = 2, \qquad \frac{\partial P}{\partial y} = \frac{\partial}{\partial y}(y) = 1.\] <2>4. By Green’s Theorem: \[\oint_{\Delta} P \, dx + Q \, dy = \iint_D \left( \frac{\partial Q}{\partial x} - \frac{\partial P}{\partial y} \right) dx \, dy = \iint_D (2 - 1) \, dA = \iint_D 1 \, dA = \operatorname{Area}(D).\]

    <1>2. Computation of the Area of the Triangular Region \(D\): Proof: <2>1. The vertices of the triangle are \(A = (0, 1)\), \(B = (2, 0)\), and \(C = (2, 1)\). <2>2. Notice that the side \(AC\) is the horizontal line segment from \((0, 1)\) to \((2, 1)\) of length \(2\). <2>3. The side \(BC\) is the vertical line segment from \((2, 0)\) to \((2, 1)\) of height \(1\). <2>4. Since \(AC\) is horizontal and \(BC\) is vertical, the angle at vertex \(C = (2, 1)\) is a right angle (\(90^\circ\)). <2>5. Thus \(D\) is a right-angled triangle with base \(b = 2\) and height \(h = 1\). <2>6. The area of \(D\) is: \[\operatorname{Area}(D) = \frac{1}{2} \cdot \text{base} \cdot \text{height} = \frac{1}{2} \cdot 2 \cdot 1 = 1.\]

    <1>3. Alternative Direct Line Integral Computation: Proof: <2>1. Path 1 (\(A(0,1) \to B(2,0)\)): Parameterize \(r_1(t) = (2t, 1 - t)\) for \(t \in [0, 1]\). - \(dx = 2\,dt\), \(dy = -dt\). - \(\int_{C_1} y\,dx + 2x\,dy = \int_0^1 (1 - t)(2) + 2(2t)(-1) \, dt = \int_0^1 (2 - 2t - 4t) \, dt = \int_0^1 (2 - 6t) \, dt = 2 - 3 = -1\). <2>2. Path 2 (\(B(2,0) \to C(2,1)\)): Parameterize \(r_2(t) = (2, t)\) for \(t \in [0, 1]\). - \(dx = 0\), \(dy = dt\). - \(\int_{C_2} y\,dx + 2x\,dy = \int_0^1 2(2) \, dt = 4\). <2>3. Path 3 (\(C(2,1) \to A(0,1)\)): Parameterize \(r_3(t) = (2 - 2t, 1)\) for \(t \in [0, 1]\). - \(dx = -2\,dt\), \(dy = 0\). - \(\int_{C_3} y\,dx + 2x\,dy = \int_0^1 (1)(-2) \, dt = -2\). <2>4. Summing all three edges: \[I = (-1) + 4 + (-2) = 1.\]

    <1>4. Conclusion: The value of the line integral is \(1\). Q.E.D.

    The line integral $\int_{\partial R} x\,dy+y\,dx$ on the upper region between $x^2+y^2=4$ and $(x-1)^2+y^2=1$

    Let \(R\) be the planar region between the circles \(x^2 + y^2 = 4\) and \((x-1)^2 + y^2 = 1\), and lying in the halfplane \(y \ge 0\). Let \(\partial R\) be its boundary, oriented so that \(R\) is on its left. Either using the definition or by applying theorems of Calculus, compute the line integral \[\int_{\partial R} x\, dy + y\, dx .\]

    Solution

    The differential form is exact: \[ x\,dy+y\,dx=d(xy). \] Therefore its integral around any closed piecewise smooth curve is zero. Since \(\partial R\) is closed, \[ \int_{\partial R}x\,dy+y\,dx=0. \] Equivalently, Green’s theorem gives the same result because \[ \frac{\partial x}{\partial x}-\frac{\partial y}{\partial y}=1-1=0. \]

    The line integral $\int_\tau x\,dy+y\,dx$ along the unit-circle arc from $(1,0)$ to $(3/5,4/5)$

    Let \(\tau\) be the arc of the unit circle in the first quadrant, from \((1,0)\) to \((3/5, 4/5)\). Compute \[\int_\tau x\,dy + y\,dx.\]

    Solution

    <1>1. Exact differential formulation: <2>1. Consider the differential 1-form \(\omega = y\,dx + x\,dy\). By the product rule for differentials: \[ \omega = d(xy). \] <2>2. Thus \(\omega\) is an exact 1-form on \(\mathbb{R}^2\) with potential function \(f(x, y) = xy\).

    <1>2. Application of the Fundamental Theorem of Line Integrals: <2>1. Let \(\tau\) be any piecewise smooth path starting at \(A = (1, 0)\) and ending at \(B = (3/5, 4/5)\). By the Fundamental Theorem for Line Integrals: \[ \int_\tau (x\,dy + y\,dx) = \int_\tau d(xy) = f(B) - f(A). \] <2>2. Evaluate the potential function at the endpoints: - \(f(A) = f(1, 0) = 1 \cdot 0 = 0\), - \(f(B) = f\left(\frac{3}{5}, \frac{4}{5}\right) = \frac{3}{5} \cdot \frac{4}{5} = \frac{12}{25}\). <2>3. Therefore: \[ \int_\tau (x\,dy + y\,dx) = \frac{12}{25} - 0 = \frac{12}{25}. \]

    <1>3. Alternative verification via trigonometric parametrization: <2>1. Parametrize the arc \(\tau\) by \(x(t) = \cos t, y(t) = \sin t\) for \(t \in [0, t_0]\), where \(\cos t_0 = 3/5\) and \(\sin t_0 = 4/5\). Then \(dx = -\sin t\,dt\) and \(dy = \cos t\,dt\). <2>2. The integrand becomes: \[ x\,dy + y\,dx = (\cos^2 t - \sin^2 t)\,dt = \cos(2t)\,dt. \] <2>3. Integrating: \[ \int_0^{t_0} \cos(2t)\,dt = \left[ \frac{\sin(2t)}{2} \right]_0^{t_0} = \sin(t_0)\cos(t_0) = \frac{4}{5} \cdot \frac{3}{5} = \frac{12}{25}. \]

    <1>4. Conclusion: \(\int_\tau x\,dy + y\,dx = \frac{12}{25}\). Q.E.D.

    Line integral of $2x\,dx+x^2y\,dy$ on the unit square

    Consider the line integral \(\int_C 2x\,dx + x^2y\,dy\), where \(C\) is the boundary of the unit square in the 1st quadrant. Evaluate the line integral (a) directly and (b) by using Green’s theorem.

    Solution

    <1>1. The value depends on the orientation of \(C\). For the positive (counterclockwise) orientation, \[ \int_C 2x\,dx+x^2y\,dy=\frac12. \] For the clockwise orientation the value is \(-\frac12\). The source does not specify an orientation; the steps below compute the positively oriented integral, which is the orientation Green’s theorem uses.

    <1>2. Compute the positively oriented integral directly by traversing the four sides \[ (0,0)\to(1,0)\to(1,1)\to(0,1)\to(0,0). \]

    <1>3. The bottom side contributes \(1\).

    Along \(y=0\), parameterize by \((x,0)\) for \(0\le x\le1\). Then \(dy=0\), so \[ \int_0^1 2x\,dx=1. \]

    <1>4. The right side contributes \(\frac12\).

    Along \(x=1\), parameterize by \((1,y)\) for \(0\le y\le1\). Then \(dx=0\), so \[ \int_0^1 y\,dy=\frac12. \]

    <1>5. The top side contributes \(-1\), and the left side contributes \(0\).

    Along the top side, \(y=1\) and \(x\) runs from \(1\) to \(0\), hence \[ \int_1^0 2x\,dx=-1. \] Along the left side, \(x=0\), so both terms vanish.

    <1>6. Therefore the direct computation gives \[ 1+\frac12-1+0=\frac12. \]

    <1>7. Green’s theorem gives the same value.

    Set \(P(x,y)=2x\) and \(Q(x,y)=x^2y\). For the unit square \(D=[0,1]^2\) with positively oriented boundary, \[ \int_C P\,dx+Q\,dy =\iint_D\left(\frac{\partial Q}{\partial x}-\frac{\partial P}{\partial y}\right)dA =\int_0^1\int_0^1 2xy\,dx\,dy =\frac12. \]

    <1>8. Reversing the orientation changes the sign of every line integral, giving \(-\frac12\) for clockwise orientation.

    Line integral of $2xy\,dx+(x^2+y^2)\,dy$ from $(1,0)$ to $(0,1)$

    1. Let \(\gamma\) be a path in the plane \(\mathbb{R}^2\). Define what is meant by \[\int_\gamma f(x,y)\,dx + g(x,y)\,dy.\]

    2. Compute this line integral in the case where \(f(x,y) = 2xy, g(x,y) = x^2 + y^2\) and \(\gamma\) is the straight-line path from \(P = (1,0)\) to \(Q = (0,1)\).

    3. Is there another path \(\beta\) from \(P\) to \(Q\) such that the corresponding line integral takes a different value?

    Solution

    Part (a).

    <1>1. If \(\gamma: [a,b] \to \RR^2\) is a piecewise-smooth path with \(\gamma(t) = (x(t), y(t))\), then \[\int_\gamma f\,dx + g\,dy = \int_a^b \left[ f(x(t), y(t))\, x'(t) + g(x(t), y(t))\, y'(t) \right] dt.\]

    definition of the line integral of the differential form \(f\,dx + g\,dy\) along \(\gamma\).

    Part (b).

    <1>1. Parametrize \(\gamma(t) = (1-t, t)\) for \(t \in [0,1]\).

    this is the straight line from \((1,0)\) to \((0,1)\).

    <1>2. \(x'(t) = -1\) and \(y'(t) = 1\).

    differentiate.

    <1>3. The integrand is \(f\,x' + g\,y' = 2xy(-1) + (x^2 + y^2)(1) = -2(1-t)t + (1-t)^2 + t^2\).

    substitute \(x = 1-t\), \(y = t\).

    <1>4. \(\int_\gamma f\,dx + g\,dy = \int_0^1 \left[ -2t(1-t) + (1-t)^2 + t^2 \right] dt = \int_0^1 (1 - 4t + 4t^2)\, dt\).

    expand \(-2t + 2t^2 + 1 - 2t + t^2 + t^2 = 1 - 4t + 4t^2\).

    <1>5. \(\int_0^1 (1 - 4t + 4t^2)\, dt = \left[ t - 2t^2 + \tfrac{4}{3}t^3 \right]_0^1 = 1 - 2 + \tfrac{4}{3} = \tfrac{1}{3}\).

    evaluate the antiderivative.

    <1>6. Hence \(\int_\gamma f\,dx + g\,dy = \tfrac{1}{3}\).

    <1>5.

    Part (c).

    <1>1. No such path \(\beta\) exists. <2>1. The form \(f\,dx + g\,dy\) is exact.

    \(\frac{\partial f}{\partial y} = 2x = \frac{\partial g}{\partial x}\), so the form is closed; on the simply connected domain \(\RR^2\) every closed form is exact.

    <2>2. The line integral of an exact form depends only on the endpoints.

    if \(f\,dx + g\,dy = dF\), then \(\int_\gamma f\,dx + g\,dy = F(Q) - F(P)\) by the fundamental theorem of line integrals.

    <2>3. Hence every path from \(P\) to \(Q\) gives the same value \(\tfrac{1}{3}\).

    <2>1 and <2>2.

    <1>2. Q.E.D.

    <1>1.

    Line integral of $y\,dx+2x\,dy$ along a quarter circle closed by the axes

    Let \(\gamma\) be the closed path which goes counterclockwise around the circle \(C(0,2) = \{(x,y) \in \mathbb{R}^2 : x^2+y^2 = 2^2\}\) from the point \((2,0)\) to the point \((0,2)\), then goes to the origin along the y-axis, and then back to \((2,0)\) along the x-axis.

    Compute \(\int_\gamma 2x\,dy + y\,dx\) in one of two ways:

    1. Directly, using the definition of a line integral; or

    2. By using Green’s theorem or the general Stokes’ theorem.

    Solution

    <1>1. The path \(\gamma\) is the positively oriented boundary of the quarter disk \[ D=\{(x,y):x\ge0,\ y\ge0,\ x^2+y^2\le4\}. \]

    The circular arc runs counterclockwise from \((2,0)\) to \((0,2)\), then the path follows the positive \(y\)-axis down to the origin and the positive \(x\)-axis back to \((2,0)\). Thus the enclosed region lies to the left of the traversal.

    <1>2. Write the integrand as \[ P\,dx+Q\,dy \quad\text{with}\quad P(x,y)=y,\qquad Q(x,y)=2x. \] Then \[ \frac{\partial Q}{\partial x}-\frac{\partial P}{\partial y}=2-1=1. \]

    <1>3. By Green’s theorem, \[ \int_\gamma y\,dx+2x\,dy =\iint_D 1\,dA. \]

    <1>4. Therefore \[ \boxed{\int_\gamma y\,dx+2x\,dy=\pi}. \]

    The region \(D\) is one quarter of a disk of radius \(2\), so \[ \operatorname{area}(D)=\frac14\pi(2)^2=\pi. \] Combining this with <1>3 gives the result.

    Line integral of $[2x+y,y]$ from $(2,1)$ to $(3,5)$, and non-conservativeness

    1. Choose a path \(C\) from \((2,1)\) to \((3,5)\) and compute \[ \int_C(2x+y)\,dx+y\,dy. \]

    2. Give and apply a criterion that shows whether this integral is path independent.

    Solution

    Parametrize the line segment by \[ r(t)=(1-t)(2,1)+t(3,5)=(2+t,1+4t),\qquad 0\leq t\leq1. \] Then \[ \int_C(2x+y)\,dx+y\,dy =\int_0^1(9+22t)\,dt =20. \]

    For \(F=(P,Q)=(2x+y,y)\), path independence on \(\mathbb R^2\) would require \(P_y=Q_x\). Here \(P_y=1\) and \(Q_x=0\), so the integral is path dependent.

    Path-independence of $\int_C (x+y^3)\,dx+(e^y+3xy^2)\,dy$

    Prove that the line integral \(\displaystyle\int_C (x+y^3)\,dx + (e^y+3xy^2)\,dy\) is path-independent; i.e., it depends only on the endpoints of \(C\).

    Solution

    Goal: Prove that the vector field \(\mathbf{F}(x, y) = (x + y^3)\mathbf{i} + (e^y + 3xy^2)\mathbf{j}\) is conservative on \(\mathbb{R}^2\) by explicitly finding a scalar potential function \(f(x, y)\), thereby establishing path-independence.

    <1>1. Construction of a potential function \(f(x, y)\): Proof: <2>1. Let \(P(x, y) = x + y^3\) and \(Q(x, y) = e^y + 3xy^2\) be the components of the 1-form \(\omega = P\,dx + Q\,dy\). <2>2. We seek a \(C^1\) function \(f(x, y)\) on \(\mathbb{R}^2\) such that \(\nabla f = (P, Q)\), which requires: \[\frac{\partial f}{\partial x} = x + y^3, \qquad \frac{\partial f}{\partial y} = e^y + 3xy^2.\] <2>3. Integrating \(\frac{\partial f}{\partial x} = x + y^3\) with respect to \(x\) while holding \(y\) constant yields \[f(x, y) = \int (x + y^3)\,dx = \frac{1}{2}x^2 + xy^3 + g(y),\] where \(g(y)\) is an arbitrary differentiable function of \(y\). <2>4. Differentiating this expression with respect to \(y\): \[\frac{\partial f}{\partial y} = 3xy^2 + g'(y).\] <2>5. Setting \(\frac{\partial f}{\partial y} = Q(x, y) = e^y + 3xy^2\) gives \(3xy^2 + g'(y) = e^y + 3xy^2\), so \(g'(y) = e^y\). <2>6. Integrating with respect to \(y\) gives \(g(y) = e^y + C\). Setting \(C = 0\) yields the potential function \[f(x, y) = \frac{1}{2}x^2 + xy^3 + e^y.\] <2>7. Direct verification: \(\frac{\partial f}{\partial x} = x + y^3 = P(x, y)\) and \(\frac{\partial f}{\partial y} = 3xy^2 + e^y = Q(x, y)\), so \(\nabla f = (P, Q)\) on all of \(\mathbb{R}^2\).

    <1>2. Path-independence via the Fundamental Theorem for Line Integrals: Proof: <2>1. Let \(C\) be any piecewise smooth curve in \(\mathbb{R}^2\) parameterized by \(\mathbf{r}(t) = (x(t), y(t))\) for \(a \le t \le b\), with initial point \(A = \mathbf{r}(a)\) and terminal point \(B = \mathbf{r}(b)\). <2>2. By the chain rule: \[\int_C (x + y^3)\,dx + (e^y + 3xy^2)\,dy = \int_a^b \nabla f(\mathbf{r}(t)) \cdot \mathbf{r}'(t)\,dt = \int_a^b \frac{d}{dt}[f(\mathbf{r}(t))]\,dt.\] <2>3. By the Fundamental Theorem of Calculus: \[\int_C (x + y^3)\,dx + (e^y + 3xy^2)\,dy = f(\mathbf{r}(b)) - f(\mathbf{r}(a)) = f(B) - f(A).\] <2>4. The value of the line integral depends solely on the endpoints \(A\) and \(B\), and is completely independent of the path \(C\) connecting them.

    <1>3. Conclusion: Proof: The line integral is path-independent.

    Green's theorem for $\int_C xe^x\,dx+(ye^y+x^2)\,dy$ over the upper half of $(x-1)^2+y^2=1$

    Let \(R\) be the region in the first quadrant bounded by the curves \(x^2 + y^2 = 2x\) and \(y = 0\). Let \(C\) be the boundary of the region \(R\), oriented counterclockwise. Evaluate the line integral \[ \int_C x e^x \, dx + (y e^y + x^2)\, dy. \]

    Solution

    We first note that we can rewrite the equation of the region to obtain something more familiar: \(x^2 + y^2 = 2x \implies (x-1)^2 + y^2 = 1\), which is a translated circle. Integrating over this region will be easy compared to the line integral, so we apply Green’s theorem: \[ \int_C xe^x ~dx + ye^y +x^2 ~dy = \iint_D 2x ~dA. \]

    We can parameterize this region as \[ D = \theset{x^2+y^2-2x = 0 \suchthat (x,y) \in \RR^2, y \geq 0} = \theset{(r(1+ \cos\theta), r\sin\theta) \suchthat \theta \in [0, \pi), r\in [0, 1]}. \]

    Noting that \(dA = r~dr~d\theta\), we can then integrate \[ \iint_D 2x ~dA = \int_0^{\pi} \int_0^1 2(r(1 + \cos\theta)) r ~dr ~d\theta \\ = 2\int_0^{\pi} \int_0^1 r^2(1+\cos \theta) ~dr ~d\theta \\ = 2\int_0^{\pi} \frac 1 3 r^3(1+\cos \theta) \bigg\rvert_0^1 ~d\theta\\ = \frac 2 3 \int_0^{\pi} (1+\cos \theta) ~d\theta\\ = \frac 2 3 ( \theta + \sin \theta) \bigg\rvert_0^\pi \\ = \frac 2 3 [(\pi + 0) - (0 + 0)] = \frac 2 3 \pi. \qed \]

    The winding number of a circle about the origin

    Let \(C\) be a circle in the \(xy\)-plane, oriented counterclockwise, and not passing through the origin. Prove that \[\oint_C \frac{-y}{x^2+y^2}\,dx + \frac{x}{x^2+y^2}\,dy\] equals \(0\) if the origin is outside the circle, and \(2\pi\) if the origin is inside the circle.

    Solution

    Let \[ P(x,y)=\frac{-y}{x^2+y^2}, \qquad Q(x,y)=\frac{x}{x^2+y^2}. \] Away from the origin, \[ \frac{\partial Q}{\partial x}-\frac{\partial P}{\partial y}=0. \]

    If the origin lies outside \(C\), then \(P,Q\) are continuously differentiable on the disk bounded by \(C\). Green’s theorem therefore gives \[ \oint_C P\,dx+Q\,dy=0. \]

    If the origin lies inside \(C\), choose a small positively oriented circle \(C_\varepsilon\) centered at the origin and contained inside \(C\). Apply Green’s theorem to the annular region between \(C\) and \(C_\varepsilon\). Its positively oriented boundary is \(C-C_\varepsilon\), so \[ \oint_C P\,dx+Q\,dy-\oint_{C_\varepsilon}P\,dx+Q\,dy=0. \] Parametrize \(C_\varepsilon\) by \[ x=\varepsilon\cos t,\qquad y=\varepsilon\sin t,\qquad 0\le t\le2\pi. \] Then \[ P\,dx+Q\,dy =\sin^2t\,dt+\cos^2t\,dt=dt. \] Hence \[ \oint_C P\,dx+Q\,dy =\int_0^{2\pi}dt =2\pi. \]